Claudiu.Popa added the comment: 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) >>> ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19078> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com