Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 2155 by [email protected]: lambdify() does not convert complex quantities properly with the "numpy" option
http://code.google.com/p/sympy/issues/detail?id=2155

The following example illustrates the problem:

import numpy as np
import sympy

x = sympy.var('x')
y = x**2 + sympy.I*2
y_func = sympy.lambdify((x), y, "numpy")
a = np.arange(10)
res = y_func(a)

It causes an error because "I" is an unrecognised global symbol. I am using sympy 0.6.7. I have been able to get my code to work by replacing "numpy" with ("numpy", {"I":1j}), however I would expect this conversion to be made automatically.


--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to