Re: [Numpy-discussion] Striding on NumArray objects
![](https://secure.gravatar.com/avatar/faf9400121dca9940496a7473b1d8179.jpg?s=120&d=mm&r=g)
I wouldn't. I had a veritable stroke of genius and talked to JC Hsu... He suggested doing concrete examples and also indicated that full multi-dimensional RecArray support is almost all (except for repr'ing) there. To be clear, in general, _bytestride != _itemsize. For a RecArray field (of a contiguous RecArray) where each row contains just one element, generally _strides[-1] == _bytestride != _itemsize:
For a RecArray field where each row contains more than one element, _strides[-1] == itemsize:
The situation gets more complicated still when someone starts slicing the field or RecArray:
Multi-dimensional RecArrays add their own twist:
HTH, Todd
![](https://secure.gravatar.com/avatar/5c7407de6b47afcd3b3e2164ff5bcd45.jpg?s=120&d=mm&r=g)
A Dimarts 21 Desembre 2004 21:21, Todd Miller va escriure:
Multidimensional RecArrays? Nice!. Is part of the code already in CVS?
Thanks for the examples. That has clarified *a lot* where to find the interesting data: it's clear now that what I need is _strides[0] (because I need to access elements in a column sequentially). And that even works for forthcoming multidimensional RecArrays which is good. Regards, -- Francesc Altet
![](https://secure.gravatar.com/avatar/5c7407de6b47afcd3b3e2164ff5bcd45.jpg?s=120&d=mm&r=g)
A Dimarts 21 Desembre 2004 21:21, Todd Miller va escriure:
Multidimensional RecArrays? Nice!. Is part of the code already in CVS?
Thanks for the examples. That has clarified *a lot* where to find the interesting data: it's clear now that what I need is _strides[0] (because I need to access elements in a column sequentially). And that even works for forthcoming multidimensional RecArrays which is good. Regards, -- Francesc Altet
participants (2)
-
Francesc Altet
-
Todd Miller