Re: [sympy] How to equip a Symbol with an additional attribute?

2015-05-19 Thread Carsten Knoll
On 05/19/2015 07:48 AM, Joachim Durchholz wrote: An external dictionary isn't ideal but better than this, at least from the maintainer's perspective. Maybe we can give you better help if you describe your use case in some more detail. At some point I create symbols from which I know,

Re: [sympy] How to equip a Symbol with an additional attribute?

2015-05-19 Thread Carsten Knoll
On 05/19/2015 02:39 AM, Aaron Meurer wrote: On Mon, May 18, 2015 at 12:29 PM, Joachim Durchholz j...@durchholz.org wrote: Am 18.05.2015 um 15:56 schrieb Carsten Knoll: I want to equip an Symbol with an additional attribute to store some specific information right in place. For 'normal'

[sympy] Bug with solve

2015-05-19 Thread Arnaud Usciati
Hello, I tried to find the roots of : 2*sqrt(x)*sqrt(x**3 - x**2 + 1) + 2*x**3 - x**2 + x*sqrt(x**3 - x**2 + 1) + 2*x**1.5 + 2*x**2.5*sqrt(x**3 - x**2 + 1) - 3*x**2.5 - 4*x**3.5*sqrt(x**3 - x**2 + 1) - 2*x**3.5 + 5*x**4.5 - 3*x**5.5 - 1 = 0. x = symbols('x', real=True) f = Lambda(x,

Re: [sympy] Bug with solve

2015-05-19 Thread Arnaud Usciati
Hi, I have : Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:15:05) [MSC v.1600 32 bit (Intel)] on win32 Le mardi 19 mai 2015 18:25:33 UTC+2, Aaron Meurer a écrit : What version of SymPy is this? On master I get In [1]: x = symbols('x', real=True) In [2]: f = Lambda(x,

Re: [sympy] Bug with solve

2015-05-19 Thread Denis Akhiyarov
You gave Python version not sympy.__version__ -- 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+unsubscr...@googlegroups.com. To post to this group, send email to

Re: [sympy] Bug with solve

2015-05-19 Thread Arnaud Usciati
Right, I have sympy-0.7.6.win32. -- 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+unsubscr...@googlegroups.com. To post to this group, send email to

Re: [sympy] How to equip a Symbol with an additional attribute?

2015-05-19 Thread Joachim Durchholz
Good points. So I conclude that it would be nice if somebody came up with a way to allow user-defined attributes without running into namespace conflicts. Oh, and the mechanism should be easy to use for the casual user. I have some ideas in that direction, but I'd like to see what others think

Re: [sympy] How to equip a Symbol with an additional attribute?

2015-05-19 Thread Aaron Meurer
On Tue, May 19, 2015 at 4:41 AM, Carsten Knoll carstenkn...@gmx.de wrote: On 05/19/2015 07:48 AM, Joachim Durchholz wrote: An external dictionary isn't ideal but better than this, at least from the maintainer's perspective. Maybe we can give you better help if you describe your use case in

[sympy] Magnitude of a complex number

2015-05-19 Thread Oscar Benjamin
Am I misunderstanding something here (using master): $ isympy Couldn't locate IPython. Having IPython installed is greatly recommended. ... z = (4+3*I)/(3-4*I) z 4 + 3⋅ⅈ ─── 3 - 4⋅ⅈ abs(z) │ 1 │ 5⋅│───│ │3 - 4⋅ⅈ│ simplify(abs(z)) │ 1 │ 5⋅│───│ │3 - 4⋅ⅈ│

Re: [sympy] theano and sympy

2015-05-19 Thread Jason Moore
Theano is doing floating point computations whereas SymPy does the computation using arbitrary precision. Jason moorepants.info +01 530-601-9791 On Tue, May 19, 2015 at 3:14 PM, drazi...@gmail.com wrote: Hi, I was experimenting with the following code: import sympy from sympy.abc import

Re: [sympy] Bug with substituting derivatives

2015-05-19 Thread Jonathan Lindgren
Well, that is exactly the problem, and what I think is a bugit should not work like that.. Den tisdag 19 maj 2015 kl. 22:00:46 UTC+2 skrev Alexander Lindsay: Not to hijack this post, but why does subs(phi(z,t).diff(z),...) work when phi(z,t).diff(t,2) does not contain any derivatives of

[sympy] theano and sympy

2015-05-19 Thread drazioti
Hi, I was experimenting with the following code: import sympy from sympy.abc import x expr = sympy.exp(-x ** 2) from sympy.printing.theanocode import theano_function fn_theano = theano_function([x], [expr], dims={x: 1}, dtypes={x: 'float64'}) print fn_theano([29.]),sympy.exp(-29.**2) I got

Re: [sympy] Bug with substituting derivatives

2015-05-19 Thread Alex Lindsay
Not to hijack this post, but why does subs(phi(z,t).diff(z),...) work when phi(z,t).diff(t,2) does not contain any derivatives of phi with respect to z? It seems like this substitution is saying that phi(z,t).diff(z) = phi(z,t) I'm new to sympy, so I apologize if this is a stupid question.

Re: [sympy] Bug with solve

2015-05-19 Thread Aaron Meurer
What version of SymPy is this? On master I get In [1]: x = symbols('x', real=True) In [2]: f = Lambda(x, 2*sqrt(x)*sqrt(x**3 - x**2 + 1) + 2*x**3 - x**2 + x*sqrt(x**3 - x**2 + 1) + 2*x**1.5 + 2*x**2.5*sqrt(x**3 - x**2 + 1) - 3*x**2.5 - 4*x**3.5*sqrt(x**3 - x**2 + 1) - 2*x**3.5 + 5*x**4.5 -

Re: [sympy] How to equip a Symbol with an additional attribute?

2015-05-19 Thread G B
Hi-- This seems as good a place as any to mention something I'd been trying to do some time ago where I ran into the same battle versus __slots__. I wanted to add a description attribute to my Symbols for documentation purposes. I use Sympy almost exclusively inside of the IPython notebook

[sympy] Bug with substituting derivatives

2015-05-19 Thread Jonathan Lindgren
I recently updated from sympy 0.7.4 (I tihnk) to 0.7.6 and now I have some very strange behaviour with subs. The following code from sympy.abc import phi import sympy as sp z=sp.Symbol('z') t=sp.Symbol('t') sp.pprint((phi(z,t).diff(t,2)).subs(phi(z,t).diff(z),sp.Symbol('b')(z,t)).expand())