This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Claudiu.Popa
Recipients Claudiu.Popa, ncoghlan, pitrou, skrah
Date 2013-09-25.13:06:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1380114386.96.0.778060230663.issue19078@psf.upfronthosting.co.za>
In-reply-to
Content
So, in the following case, len shouldn't return 4, but the number of items? Also, is it ok to assume that the number of items is
((*shape)[0] * ... * (*shape)[ndims-1])?

>>> x = np.array([[1, 2, 3], [4, 5, 6], [4,5,6], [4,4,4]], np.int32)
>>> x.shape
(4, 3)
>>> x.shape[0] * x.shape[1]
12
>>> len(x)
4
>>> memoryview(x)
<memory at 0x0217C378>
>>> len(memoryview(x))
4
>>> memoryview(x).shape
(4, 3)
>>>
History
Date User Action Args
2013-09-25 13:06:27Claudiu.Popasetrecipients: + Claudiu.Popa, ncoghlan, pitrou, skrah
2013-09-25 13:06:26Claudiu.Popasetmessageid: <1380114386.96.0.778060230663.issue19078@psf.upfronthosting.co.za>
2013-09-25 13:06:26Claudiu.Popalinkissue19078 messages
2013-09-25 13:06:26Claudiu.Popacreate