mpmath matrix to numpy ndarray casting

915 views
Skip to first unread message

Alexander J. Ows

unread,
Feb 10, 2015, 11:38:12 PM2/10/15
to mpm...@googlegroups.com
Hi to everybody!

I'm working with mpmath python library to gain precision during some computations, but i need to cast the result in a numpy native type. More precisely i need to cast an mpmath matrix (that contains mpmath.mpf object types) in an numpy.ndarray (that contains float types).

I've implemented my "raw" solution, but my question is: Is there a simple and elegant way to do it?

I've just opened a topic in stackoverflow.com to explain the issue in a better way (syntax highlight etc.):

http://stackoverflow.com/questions/28446555/how-to-cast-mpmath-matrix-to-numpy-ndarray

Thank you!


Alexander 


Reply all
Reply to author
Forward
0 new messages