Re: [sage-support] Re: Mpmath and matrix from "normal" matrix

2014-12-05 Thread Jori Mantysalo
On Thu, 4 Dec 2014, Nils Bruin wrote: It's more surprising to me that Scipy can eat a Sage matrix, actually.  Fredrik, any thoughts?  Indeed mpmath can do this too but is a little picky about lists/tuples  vs. iterables: sage: mp.matrix(tuple(tuple(m) for m in M)) You wouldn't want to do

[sage-support] Re: Mpmath and matrix from "normal" matrix

2014-12-04 Thread Nils Bruin
On Thursday, December 4, 2014 6:43:40 AM UTC-8, kcrisman wrote: > > > It's more surprising to me that Scipy can eat a Sage matrix, actually. > Fredrik, any thoughts? > My guess is that it's this: sage: M=matrix(ZZ,5,5,[1..25]); sage: [a for a in M] [(1, 2, 3, 4, 5), (6, 7, 8, 9, 10), (11, 12,

[sage-support] Re: Mpmath and matrix from "normal" matrix

2014-12-04 Thread kcrisman
> > M1=Matrix([[1,2],[3,4]]) > > import scipy > M2=scipy.matrix(M1) > > import mpmath as mp > M3=mp.matrix(M1) > > --> > > TypeError: could not interpret given arguments > > Is there some reason why mpmath matrix constructor can not use "normal" > matrix of Sage as input just like scipy do