I'm trying to plot a statistical expression using the following code

from sympy.stats import *
X = StudentT("X", 50)
t = Symbol('t', positive=True)
plot(simplify(E(exp(I*t*X))), (t, 1e-6, 1e-2))

and I get this error

--> 455                 elif p[1] is None or q[1] is None or not flat(p,
new_point, q):
TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'
-> 1009     vector_a = x - y

The expression I'm plotting is challenging (contains meijer-g functions)
and produces little complex parts which I suspect are throwing off the
plotting function

In [48]: simplify(E(exp(I*t*X))).subs(t, .000001).evalf()
Out[48]: 0.999999999999479 + 1.56564942264937e-29⋅ⅈ

Is there a way to just plot the real part of this expression?
Is there a way to avoid the small complex numbers?

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

Reply via email to