[SciPy-user] Shape Problem

Louis Pecora pecora at anvil.nrl.navy.mil
Wed Oct 18 12:25:07 CDT 2006

Sam frizou wrote:
> Actually, my matrix M comes from a ndarray N:
> M=asmatrix(N)
> So, M is not a numpy.matrix object (for which I do not have this shape
> problem), but a numpy.core.defmatrix.matrix object (for wich I have
> the shape problem).
Oh.  I don't know about ndarrays.
> Maybe there exists a way to really cast a ndarray into a numpy.matrix object ?
Only thing I can think of is the usual  array(M), but not sure that 
would work and it creates a numpy copy of M.


Lou Pecora

Code 6362
Naval Research Lab
Washington, DC  20375
Ph:  +202-767-6002
email:  pecora at anvil.nrl.navy.mil

More information about the SciPy-user mailing list