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