Open GoogleCodeExporter opened 9 years ago
Are you working on this?
Original comment by fredrik....@gmail.com
on 31 Jul 2009 at 7:27
I was not, but I probably will do it soon, as this is imho important and easy
to fix.
Original comment by Vinzent.Steinberg@gmail.com
on 5 Aug 2009 at 3:59
Should this be fixed in sympy (adding an _mpmath_ attribute, for which
mpmathify is
already checking) or in mpmath?
Original comment by Vinzent.Steinberg@gmail.com
on 6 Aug 2009 at 8:21
Adding _mpmath_ to sympy is certainly preferrable, as otherwise mpmath will
need to
worry about sympy internals.
Original comment by fredrik....@gmail.com
on 6 Aug 2009 at 8:26
There is already Number._as_mpf_val(prec), which should do the job. Which
precision
should be used when converting to mpf? Should mpmathify convert sympy integers
to
Python integers?
Original comment by Vinzent.Steinberg@gmail.com
on 6 Aug 2009 at 9:00
> which should do the job. Which precision should be used when converting to
mpf?
What do you mean? mpmathify calls x._mpmath_ with the appropriate precision.
> Should mpmathify convert sympy integers to Python integers?
The easiest solution might be to add an _mpf_ property to sympy integers (not
sure if
that will break anything).
Original comment by fredrik....@gmail.com
on 6 Aug 2009 at 9:18
So why not rename _as_mpf_val to _mpmath_? (Should work for Rational.)
I'd add just add an _mpmath_ property to Integer.
Original comment by Vinzent.Steinberg@gmail.com
on 6 Aug 2009 at 9:50
I sent a patch to the sympy list. What about complex numbers? This has to be
implemented in mpmath, unless Add grows an _mpmath_ method.
Original comment by Vinzent.Steinberg@gmail.com
on 13 Aug 2009 at 12:03
[deleted comment]
It fixed it in sympy HEAD, and added support in mpmathify for matrices.
I'm not sure how to support complex numbers.
Original comment by Vinzent.Steinberg@gmail.com
on 14 Aug 2009 at 8:07
Easiest way to enable conversion for any SymPy object is to add _mpmath_ to
Basic and
have it call evalf.
Original comment by fredrik....@gmail.com
on 22 Aug 2009 at 8:41
Original issue reported on code.google.com by
Vinzent.Steinberg@gmail.com
on 30 Jul 2009 at 11:16