Hi,
As I needed a byteswap() method for recarray, after a bit of hacking I've
made one myself. This is based on my own version of recarray to take
advantage of the _fields cache so as to both speed-up and simplify the ne=
w
code.
Basically, the new method takes a recarray, checking which columns are
numarray arrays and invoking their byteswap() method if needed. Easy, but
effective. Moreover, a _byteswap() and togglebyteorder() are provided to =
be
compatible with existing methods in NumArray objects.
As a plus, the recarray __str__ has been modified in order to allow a
printing having in mind the byteorder of the recarray, and improving the
speed of printing by a factor of 30, that can be handy in some situations=
=2E
Do with it whatever you want,
--=20
Francesc Alted
|