[SciPy-user] Shape Problem

Sam frizou excellent.frizou at gmail.com
Wed Oct 18 13:57:23 CDT 2006


from scipy import *


N=zeros((20,25))
print N[19:,19:].shape
# >>> (1,6)


M=matrix(N)
print M[19:,19:].shape
# >>> (6,1)


On 10/18/06, Travis Oliphant <oliphant.travis at ieee.org> wrote:
> 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).
> >
> These are the same thing.  There is only one matrix object.    Please
> show the code that is giving you the problem as I cannot reproduce it.
>
> -Travis
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>


-- 
On obtient beaucoup plus avec un mot gentil et une arme qu'avec
seulement un mot gentil - "Al Capone".


More information about the SciPy-user mailing list