>>> import numpy as np
>>> import sympy as sy # I use "sp" as abbreviation for SciPy...
>>> sy.mpmath.taylor(sy.sin,0,0)
[mpf('0.0')]
>>> sy.mpmath.taylor(sy.sin,np.pi,0)
[mpf('0.0')]
# For some strange reason, I cannot expand around sy.pi...
>>> sy.mpmath.taylor(sy.sin,np.pi,1)
[mpf('0.0'), mpf('-0.99999999999998623')]
# ok…
>>> sy.mpmath.taylor(sy.sin,np.pi,2)
[mpf('0.0'), mpf('-1.0'), mpf('0.0')]
# ok
>>> sy.mpmath.taylor(sy.sin,np.pi,3)
Out[8]:
[mpf('0.0'),
mpf('-1.0'),
mpf('31845.854976072664'),
mpf('2.5611218906685583e+23')]
--
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@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
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/4509d8f8-6465-4018-8ce2-7ae3f77d0fac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.