Re: Issue 227 in mpmath: mpmath.matrix unhashable?

3 views
Skip to first unread message

mpm...@googlecode.com

unread,
Apr 10, 2012, 2:59:52 PM4/10/12
to mpmath...@googlegroups.com

Comment #1 on issue 227 by archery...@gmail.com: mpmath.matrix
unhashable?
http://code.google.com/p/mpmath/issues/detail?id=227

By the way, I have found a slight workaround for this with the following.
I basically, convert the mpmath matrix to a list, then convert that list
into a sympy or scipy matrix, perform the slicing operation(s), and them
convert back into an mpmath matrix.

>>> mp_matrix(sp_matrix(mp.tolist())[0:2,0:2])
>>> mp_matrix(sm_matrix(mp.tolist())[0:2,0:2])

Both of these _do_ get the job done. But they are extremely inefficient
ways of doing so. I am open to any suggestions, but hopefully there is a
far more elegant (and efficient) means of tackling this.

Thanks,
~~archery~~

Reply all
Reply to author
Forward
0 new messages