[Numpy-discussion] AttributeError with shape command

Olivier Delalleau shish@keba...
Mon Mar 26 19:45:19 CDT 2012


It means "array" is a regular Python list and not a numpy array. Use
numpy.array(array) to convert it into an array.

-=- Olivier

Le 26 mars 2012 20:07, Stephanie Cooke <cooke.stephanie@gmail.com> a écrit :

> Hello,
>
> I am new to numpy. When I try to use the command array.shape, I get
> the following error:
>
> AttributeError: 'list' object has no attribute 'shape'
>
> Is anyone familiar with this type of error?
>
> Thanks
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120326/edf798dd/attachment.html 


More information about the NumPy-Discussion mailing list