raj454raj | 29 Aug 16:46 2014
Picon

new to sympy

hello guys i just want to start with sympy can you tell me where can i make changes to the code such that it reflects in python shell directly

--
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 http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/277764bf-02d4-4b4d-89ea-4c2add33883d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
James Crist | 28 Aug 05:07 2014
Picon

ufuncify now creates actual ufuncs

I still need to do some cleanups and add tests, but I finally have this working and thought I'd share. I'm really happy with this:

In [1]: from sympy import *

In [2]: a, b, c = symbols('a, b, c')

In [3]: expr = (sin(a) + sqrt(b)*c**2)/2

In [4]: from sympy.utilities.autowrap import ufuncify

In [5]: func = ufuncify((a, b, c), expr)

In [6]: func(1, 2, 3)
Out[6]: 6.7846965230828769

In [7]: func([1, 2, 3, 4, 5], [6, 7, 8, 9, 10], 3)
Out[7]: array([ 11.44343933,  12.36052961,  12.79848207,  13.12159875,  13.75078733])

In [8]: from numpy import arange

In [9]: a = arange(10).reshape((2, 5))

In [10]: c = arange(10, 20).reshape((2, 5))

In [11]: b = 25

In [12]: func(a, b, c)
Out[12]:
array
([[ 250.        ,  302.92073549,  360.45464871,  422.57056   ,
         
489.62159875],
       
[ 562.02053786,  639.86029225,  722.8284933 ,  810.49467912,
         
902.70605924]])

In [13]: type(func)
Out[13]: numpy.ufunc

This now does everything a numpy `ufunc` does normally, as it *is* a ufunc. Codegen is hooked up to numpy api. Type conversion and broadcasting are done automagically.

Caveats: only functions with a single output are accepted (this could be changed to accept multi-output without much effort though). Also, as with all unfuncs, input/outputs must all be scalars (no matrix/Indexed operations allowed).

--
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 http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/76e0fbbe-5ce4-43b7-855b-6ac821f6b8ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ambar Mehrotra | 27 Aug 21:36 2014
Picon

Use of sympy in Android app

Hi, 

I am working on a proprietary android app that uses sympy for computation purposes.  We are planning to use
sympy in the name of the app. What are the legal implications that I have to take care of to do this? Is it
enough if I mention the sympy BSD licence in the app? 

--

-- 
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@...
To post to this group, send email to sympy@...
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/271c0d7b-2ce4-45cd-9dd1-5db1ab0dacf1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aaron Meurer | 27 Aug 06:10 2014
Picon

SymPy 0.7.6 release

Now that GSoC is over, let's start thinking about doing a 0.7.6 release. Are there any major pull requests from GSoC that are still to be merged?  Any other known changes that should block on the release? 

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 http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6LtVFLB3pTqr2G1%3DvHoFnrQnCqqaxACTVjihToO6f0jeg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Alan Bromborsky | 27 Aug 00:57 2014
Picon
Picon

latex notebook printing of lists of custom classes

I am trying to print a list of instances of a custom class. The input is -

print (o3d.grad, o3d.grad)

the output is (custom latex printer)



however  in ipyrhon notebook I input

(o3d.grad, o3d.grad)

I get out
(e_{x} \frac{\partial}{\partial x} + e_{y} \frac{\partial}{\partial y} + e_{z} \frac{\partial}{\partial z}, e_{x} \frac{\partial}{\partial x} + e_{y} \frac{\partial}{\partial y} + e_{z} \frac{\partial}{\partial z}) Also the standard latex tuple and list printer is not using \left ( \right  and \left [ \right ) to enclose
the tuple or list.  How can I write a custom latex tuple and list printer that will also work in ipython notebook.

--
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 http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/53FD10D1.6080309%40verizon.net.
For more options, visit https://groups.google.com/d/optout.

vaibhav kumar | 26 Aug 18:28 2014
Picon

student looking for contribution

hello,
i am a newcomer and i would like to contribute to this project.
Could anybody guide me through the same.


thanks in advance

--
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 http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/db85db60-3401-4f34-9e2e-a186a4bf732d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
vaibhav kumar | 26 Aug 18:15 2014
Picon

starter looking for contribution

Hi,

this is Vaibhav Kumar. I am a student of Computer Science from IIIT Hyderabad. I am keenly instersted to contribute to this project.
Could anyone help me out with the same. 

--
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 http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/b4aa924f-9bb2-4869-96b0-5ab3322082d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Aaron Meurer | 24 Aug 19:46 2014
Picon

A plan for the assumptions

Some of you may have seen Sergey started a pull request to remove uses of the new assumptions in the code, because it's confusing to users who set the old assumptions and it doesn't work.

He asked me there

How the random mix of old and new assumptions can look for you as this transition (or a step in this direction, whatever)? I think - this only can surprise our users. And that's a bad idea to do so, esp. in the core modules (e.g., the sets module).

I wrote up a response there, but then I realized that it would be better to discuss this on the mailing list, so I am posting it here instead. 

You make a good point. However, if you are going to spend time on this, it would be better spent improving the new assumptions (and let's finally merge my branch as a start to this), or merging the two. I still maintain that this pull request is a step backwards. With these changes, the new assumptions aren't used at all, meaning they are tested much less, and more importantly, there is no more motivation to improve them. The old assumptions syntax isn't going away, so why don't we focus on making it so that the new assumptions can read the old assumptions. 

This is what <at> mrocklin and I attempted to do last summer (https://github.com/sympy/sympy/pull/2210). It didn't work, because we tried to do a two-way merge of the assumptions, i.e., so that both `x.is_integer` and `ask(Q.Integer(x))` were always identical (the logic I used was https://github.com/sympy/sympy/pull/2210/files#r5463892, which required both assumptions to be the same). 

Maybe an easier approach would be along the lines of what I have done at #2508. Have ask call a bunch of things, in order, until it gets an answer. In my branch, `ask` calls the current new assumptions, and then my satask. We could make it so that ask first calls the old assumptions, then the new assumptions. Furthermore, the new assumptions should gain trivial handlers for Symbols to so that `ask(Q.real(Symbol('x', real=True)))` is True. 

The first step though will be to go through all the assumptions and make sure they are identical in all systems. This is a good opportunity to clean up some of the contradictory or unexpected assumptions, so it should involve some community input. So I would do it on the mailing list. 

So I what I would recommend doing:

- [ ] Merge my branch #2508. We can maybe wait until after the release to do this so it is minimally disruptive, but this is important, as it will be much easier to add new facts to the new assumptions with satask (and I also want people to start thinking about how to improve the speed of it).
- [ ] Go through all the assumptions facts and make a note of what is different, and also what is confusing. A lot of this is already written down in various places (https://github.com/sympy/sympy/issues/5976, https://github.com/sympy/sympy/pull/2538, probably some of the issues mentioned in https://github.com/sympy/sympy/issues/6730, https://github.com/sympy/sympy/pull/2508/files#diff-e0f95401c86d07d90903363122990de0R172, https://github.com/sympy/sympy/wiki/assumptions_handlers), but we should gather them all down in one place. I think the main thing will be how we handle infinity. 
- [ ] Discuss with the community on the mailing list how we should handle the differences, until we come to a consensus. 
- [ ] Make the new assumptions call the old assumptions first. Also make the handlers access the old assumptions, so that everything sees `Symbol('x', real=True)` as real. This will be the hard part, and lead to lots of test failures. It might be worth trying this first, to really see what facts are different in the two systems.

Note that absent from my plan is making `x.is_real` call the new assumptions. This is what I tried at #2210, and it failed, because it requires everything to work perfectly, and there are so many places that the assumptions are used that it's too much work to get it all in one go. We should get the above working first before we consider this. I don't think there's a big issue with this, because already `ask(Q.real(x))` and `x.is_real` are different. My proposal is to have the first call the second but not the other way around.  

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 http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6JGa_hpe8FFNqht2dAG9-YpfO%2BS3Dx6wfoz_-tfF6i9jg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Alan Bromborsky | 24 Aug 18:34 2014
Picon
Picon

Custom latex printing in ipython notebook

For regular latex printing I have a custom _print_Derivative  in my 
GaLatexPrinter class and that works fine.  But for latex printing in 
ipython notebook I need a _repr_latex in the correct class.  If I want 
to print custom formated derivatives in latex in ipython notebook what 
should I do?

--

-- 
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@...
To post to this group, send email to sympy@...
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/53FA1402.5030006%40verizon.net.
For more options, visit https://groups.google.com/d/optout.

Ondřej Čertík | 23 Aug 01:38 2014
Picon

Finding if expression can be manipulated to contain certain subexpressions

Hi,

We have the following problem: given a (complicated) expression "e",
and a set of known expressions s1, s2, s3, ..., we would like to
rewrite "e", so that it can be written in terms of any subset of s1,
s2, s3, ..... Some examples:

e = x^2+2*x*y+z^2
s1 = x+y

then we would like to get e == s1^2. Or:

e = a*x+a*y
s1 = x+y

then e == a*s1.

Actually, what we really need is given an integral, like this (much
more complicated in practice):

e = c*Integral(x**2, (x, a, b))
s1 = Integral(y**2, (y, a, b))

then it would give me e==c*s1. Notice the different dummy variable.
Here is another example, it would be able to recognize variable
substitutions:

e = c*Integral(x**2, (x, a, b))
s1 = Integral(sin(y)**2, (y, asin(a), asin(b)))
# I hope I substituted correctly

The goal is to have a large database of known expressions s1, s2, s3,
... s10000, and then if given a new expression, SymPy would be able to
figure out a way to write it in terms of them (I understand that it
might not always succeed).

This came up when discussing a particular application with Wang-Kong,
a colleague of mine at LANL. It would be used in condensed matter
physics, regarding conductivity calculations, that it would be nice to
write expressions for new materials ("e") in terms of known ones ("s1,
s2, ...").

Ondrej

--

-- 
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@...
To post to this group, send email to sympy@...
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CADDwiVDKEqNtxBSHmxTBQZi2t6OjMj5HmWbJWnQpkTykysY%3DdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Rohit Shinde | 22 Aug 19:22 2014
Picon

Student looking to contribute to Sympy

Hello,

I am a CS student from VIT, Pune. I came across SymPy in the GSoC 2014 accepted organizations page and have been wanting to contribute since then. I am an average student in maths. What level of mathematics would I need to be knowing in order to contribute to this library?

I am good with Calculus till the +2 level. I can do differentiate easily. Also, I am quite comfortable with geometrical algebra.

Thanks in advance.

--
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 http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/2396c2a1-29e5-4804-8650-726ed54bf029%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gmane