Message198383
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)
>>> |
|
Date |
User |
Action |
Args |
2013-09-25 13:06:27 | Claudiu.Popa | set | recipients:
+ Claudiu.Popa, ncoghlan, pitrou, skrah |
2013-09-25 13:06:26 | Claudiu.Popa | set | messageid: <1380114386.96.0.778060230663.issue19078@psf.upfronthosting.co.za> |
2013-09-25 13:06:26 | Claudiu.Popa | link | issue19078 messages |
2013-09-25 13:06:26 | Claudiu.Popa | create | |
|