Joseph Morgan | 10 Feb 10:35 2016
Picon

Regarding to proposal submission

i want to know how many proposal are allowed to submite in ```sympy``` ?(one or more then one(up to Five)) 

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/6c635b41-8f50-4740-ad4c-4aba30b6e4cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Alexander Lindsay | 10 Feb 04:28 2016
Picon
Gravatar

Collect not working as desired

Hi all,

I am making my first in-depth foray into sympy (and also my first in-depth foray into using winpdb). I am trying to collect terms that have R in expression. Hopefully the pasted screen shot gives an idea of what the expression looks like. As hopefully you can see, the expression inside the parentheses has multiple terms containing R; however, running collect doesn't collect these terms together. I am wondering whether the fact that expr is listed as being of type sympy.core.add.Add has something to do with this problem. Instinctively I feel like expr should be of type sympy.core.mul.Mul since we have the multiplicative term A outside of the parentheses.


--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/5a323a62-5b48-45a9-b11a-683414543a2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jonathan Crall | 9 Feb 21:45 2016
Picon

Fractions of sympy.Product of sympy.tensor.Indexed variables seem to not cancel correctly.

I'm having an issue where an expresion with sympy.tensor.Indexed variables does not seem to simplify correctly. 
It is likely that I'm just doing something incorrect, so I was wondering if anyone could help me figure this out.

I'm using sympy to just generate some simple equations based on Bayes rule. 

N is an event and I'm given a set of observations \set{X} = \{\ldots d_i \ldots }\. 

I'm using an indexed base to represent the set of observations as an array. 
I'm then using sympy.Product to multiply the probability of these observations together
(I'm assuming independence), so I create an Idx variable ``i`` and several sets of varaiables
that are indexed by ``i``. However, at the end of this script. It looks like ``P(di)[i]`` should be canceled out by a
simplification step, but it is not. 

Here is the script: 


import sympy
from sympy.tensor import IndexedBase, Idx  # NOQA
from sympy import tensor
from sympy import *  # NOQA
cardX = sympy.symbols('|X|', integer=True, positive=True, finite=True)
start, stop = 1, cardX
i = Idx(sympy.symbols('i', integer=True, finite=True))


def psym(expr):
    s = symbols(expr, real=True, finite=True, negative=False)
    return s


def IdxBase(expr):
    #s = tensor.IndexedBase(expr, shape=(cardX,))[i]
    s = tensor.IndexedBase(expr, shape=(1,))[i]
    return s


if 1:
    def Prod(s):
        return sympy.Product(s, (i, start, stop))
else:
    def Prod(s):
        return sympy.prod([s.subs(i, i_) for i_ in range(1, 4)])

P_N          = psym('P(N)')
P_X          = psym('P(X)')
P_X_given_N  = psym('P(X|N)')
P_N_given_X  = psym('P(N|X)')
P_di         = IdxBase('P(di)')
P_N_given_di = IdxBase('P(N|di)')
P_di_given_N = IdxBase('P(di|N)')

pprint = sympy.pretty_print
print('''
-----------------------
OUTPUT OF SVM: P(N | di)
-----------------------
''')
P_N_given_di_ = (P_di_given_N * P_N) / P_di
pprint(Eq(P_N_given_di, P_N_given_di_))

print('''
-----------------------
REARANGE USING BAYES P(di | N)
-----------------------
''')
P_di_given_N_ = (P_N_given_di * P_di) / P_N
pprint(Eq(P_di_given_N, P_di_given_N_))

print('''
-----------------------
AGGREGATE USING INDEPENDENCE
-----------------------
''')
prod_P_di_given_N  = Prod(P_di_given_N)
prod_P_di_given_N_ = Prod(P_di_given_N_)
P_X_given_N__ = prod_P_di_given_N
P_X_given_N_ = prod_P_di_given_N_
pprint(Eq(P_X_given_N, P_X_given_N__))
pprint(Eq(P_X_given_N, P_X_given_N_))

print('''
   === ALSO ===
      ''')
prod_P_di = Prod(P_di)
P_X_      = prod_P_di
pprint(Eq(P_X, P_X_))

print('''
-----------------------
REARANGE TO LIKELIHOOD USING BAYES AGAIN
-----------------------
''')
P_N_given_X__ = (P_X_given_N * P_N) / (P_X)
P_N_given_X_ = (P_X_given_N_ * P_N) / (P_X_)
pprint(Eq(P_N_given_X, P_N_given_X__))
print('---')
pprint(Eq(P_N_given_X, P_N_given_X_))
print('--- simplify --- ')
P_N_given_X_done = P_N_given_X_.doit(deep=True)
pprint(Eq(P_N_given_X, P_N_given_X_done))

# Does not seem to cancel out the P(di)[i] variable
#pprint(Eq(P_N_given_X, sympy.simplify(P_N_given_X_done)))


The output of this script is: 

-----------------------
OUTPUT OF SVM: P(N | di)
-----------------------

             P(N)⋅P(di|N)[i]
P(N|di)[i] = ───────────────
                 P(di)[i]   

-----------------------
REARANGE USING BAYES P(di | N)
-----------------------

             P(N|di)[i]⋅P(di)[i]
P(di|N)[i] = ───────────────────
                     P(N)       

-----------------------
AGGREGATE USING INDEPENDENCE
-----------------------

          |X|            
         ┬───┬           
P(X|N) = │   │ P(di|N)[i]
         │   │           
         i = 1           
           |X|                       
         ┬──────┬                    
         │      │ P(N|di)[i]⋅P(di)[i]
P(X|N) = │      │ ───────────────────
         │      │         P(N)       
         │      │                    
          i = 1                      

   === ALSO ===
      
        |X|          
       ┬───┬         
P(X) = │   │ P(di)[i]
       │   │         
       i = 1         

-----------------------
REARANGE TO LIKELIHOOD USING BAYES AGAIN
-----------------------

         P(N)⋅P(X|N)
P(N|X) = ───────────
             P(X)   
---
                |X|                       
              ┬──────┬                    
              │      │ P(N|di)[i]⋅P(di)[i]
         P(N)⋅│      │ ───────────────────
              │      │         P(N)       
              │      │                    
               i = 1                      
P(N|X) = ─────────────────────────────────
                    |X|                   
                   ┬───┬                  
                   │   │ P(di)[i]         
                   │   │                  
                   i = 1                  
--- simplify --- 
                        |X|                     
                  -|X| ┬───┬                    
         P(N)⋅P(N)    ⋅│   │ P(N|di)[i]⋅P(di)[i]
                       │   │                    
                       i = 1                    
P(N|X) = ───────────────────────────────────────
                       |X|                      
                      ┬───┬                     
                      │   │ P(di)[i]            
                      │   │                     
                      i = 1                     

There are no additions in this formula, so the denominator should completely cancel. 

Any ideas why the bottom term is not canceled by the top term? 

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/e7d3ea7d-831e-4236-bd44-a81e22f5468a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Nitin Chaudhary | 9 Feb 18:44 2016
Picon
Gravatar

GSOC 2016: Implementation of multiple types of coordinate systems

Hii,

I am Nitin Chaudhary , and I will be applying to GSOC 2016.

 

As I went through your GSOC16’s idea page, I found this https://github.com/sympy/sympy/wiki/GSoC-2016-Ideas#implementation-of-multiple-types-of-coordinate-systems pretty interesting. I have already read the whole document so was able to find the various needs of this project and if possible could you push me in the right direction.


Thank You

 

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/5014d947-cd2d-4ff3-9c9a-ee0cc195c71c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
shubham tibra | 9 Feb 09:20 2016
Picon

GSoC 16 : Ordinary Differential Equations

Hi everyone,
I am Shubham Tibra, and I will be applying for GSoC this year.

I went through GSoC'16 ideas page and found this interesting https://github.com/sympy/sympy/wiki/GSoC-2016-Ideas#ordinary-differential-equations ,
Currently, Sympy supports many basic types of Differential Equations, but there are methods which can be implemented :
  1. Separation ansatz
  2. "Solving Differential Equations in Terms of Bessel Functions" by Ruben Debeerst
  3. Lie groups and symmetry related
What are the things I need to know before getting into this? Does this project have a willing mentor?

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/159ae175-911f-4457-bc2d-ca50bb5b952f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
shubham tibra | 9 Feb 07:47 2016
Picon

GSoC 16 :Ordinary Differential Equations

Hi Developers,
I am Shubham Tibra, and will be applying for GSoC this year.

I went through GSoC'16 ideas page and found this interesting https://github.com/sympy/sympy/wiki/GSoC-2016-Ideas#ordinary-differential-equations
Currently, Sympy only supports basic types of Differential Equation, but there methods to implement listed on the ideas page.

Are there any more things which I need to know for this project? Is there any potential mentor for this project?

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/74376807-45fb-48bb-b5b4-f402a2a43646%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
meghana.madhyastha | 9 Feb 05:08 2016
Picon

GSOC 2016: Implementation of vector integration

Hi everyone,
I'm Meghana Madhyastha, and I will be applying for GSOC this year. Sympy currently has a good vector module, but it has a few missing functionalities in vector calculus. I took a look at the ideas page and Pull request #2208 which was opened by Prasoon Shukla for his GSOC 13 project. I have gathered the following:
1. A basic skeletal structure has been implemented in the PR. Ishould take this as a starting point.
2. Line, volume and surface integrals should  be implemented using this structure.
Is there anything else I am missing on ? Are there more functionalities that could be implemented in this area (of vector integration)? Also, are there people who will mentor  the vector package this year ?

-Meghana

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/c8d89ac4-9f0b-4055-9431-e756c8df624f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Aaron Meurer | 8 Feb 21:59 2016
Picon
Gravatar

Who can mentor for GSoC?

GSoC organization applications are now open. We can apply as an org, but before we do, I want to know how many people we have who can mentor. If you are able to mentor (even if just for certain specific projects), please add your name at https://github.com/sympy/sympy/wiki/GSoC-2016-Ideas#potential-mentors.  

Ondrej, what do you plan with GSoC for SymEngine? 

Students, if you are interested in doing GSoC with SymPy, please read https://github.com/sympy/sympy/wiki/GSoC-2016-Ideas and introduce yourself in another thread on this list. 

Aaron Meurer

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6JdzsL6yXi2kZMj%3D7LTjMK1KQZrPCOX%3Drru6cbg5hLaXQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
hercidav | 8 Feb 17:37 2016
Picon

Integral(v,t).doit() differs from integrate(v,t)

Hi,

I want to lambdify an integral including vector (sympy.Matrix) and I am expecting to get a vector as well. I used the doit() function on Integral, however the results are somewhat strange. Below is a simple example in the sympy online shell (I hope it works just like that).
Basically, having a vector v = (a*t,b,c), I do integrate(v,t), which gives me (a*t**2/2, b*t,c*t), an expected result. Doing Integral(v,t).doit() gives a*t**4/3+b*t**2/2+c*t... Any suggestions? Do I have some wrong assumptions?
Thanks a lot in advance,

David

http://live.sympy.org/?evaluate=a%2Cb%2Cc%3Dsymbols%28%27a%20b%20c%27%29%0A%23--%0Av%3DMatrix%28[a%2Cb%2Cc]%29%0A%23--%0Avt%3DMatrix%28[a*t%2Cb%2Cc]%29%0A%23--%0Aintegrate%28vt%2Ct%29%0A%23--%0AIntegral%28vt%2Ct%29.doit%28%29%0A%23--%0A

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/43e7ee85-ba53-49e3-80f9-730469ca77ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Imam Tashdid ul Alam | 8 Feb 07:28 2016
Picon

Permission to steal

Hello all,

Recent sympy user here. Need advice on license issues. I am thinking of writing a library with much in common with sympy but the plan is nowhere near complete at the moment.
What I would like to know more about is the implications of sympy license. I am thinking of indiscriminately copying the sympy codebase when and where I need it. If I read the license correctly, that should be fine if I license my code under BSD as well. But the problem is, I think I like GPL more for my purpose. I do not understand the subtlety involved in deciding between GPLv2 and GPLv3, but let's say I go for GLPv3.

Wikipedia (https://en.wikipedia.org/wiki/GNU_General_Public_License#Compatibility_and_multi-licensing) seems to suggest that it is okay for me to release my code under GPLv3 (since sympy is BSD-3), but I would appreciate guidance regarding where not to go overboard with this. For the sake of argument, can I just fork sympy and just change the license to GPLv3? Does not seem quite right to me.

Also, acknowledgements. Let's say I appropriate a sizable part of sympy (as I intend to). And maybe I have a file called AUTHORS. I think BSD-3 says that I do not put the names in AUTHORS in the sympy tree in it. I will of course acknowledge the heavy reliance on sympy in the documentation and elsewhere, but is there anything more I should do to give credit to individuals?

End of questions. Just a bit more on what I am trying to do just in case. I am not currently interested in all the sympy modules but just the core. My primary goal I think is to experiment with a more simplified representation of expressions at the expense of usability so that I can provide more control over the generation of LaTeX code.

Thanks in advance and thanks for this awesome program.

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/9cf26a4a-c748-41f3-975c-5b5722e17c83%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ravi Janjam | 7 Feb 20:27 2016
Picon

Can Sympy convert latex input to sympy functions?

Pretty much the same I typed in the subject line. 

Can sympy convert late input to a function ? 

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/b4eb1f82-06fe-4ad6-81fb-117147a950bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gmane