From: Sebastian H. <ha...@ms...> - 2004-10-27 16:58:22
|
Hi, I have a (UInt16) 3d data stack and want to get to it's underlying buffer (to (later) feed it into memmap) ... I noticed that len(pr2._flat) is half of len(pr2._data) - like it doesn't multiply itemsize in. >>> pr2.shape (40, 512, 512) >>> pr2.flat.shape (10485760) >>> 512*512*40 10485760 >>> len(pr2.flat) 10485760 >>> pr2.flat._itemsize 2 >>> len(pr2._data) 20971520 >>> pr2._byteoffset 0 Is this a bug or am I missunderstanding ? Thanks, Sebastian Haase |