From: Sebastian H. <ha...@ms...> - 2003-02-19 20:20:38
|
>>> xx = na.array((1,2,3)) >>> xx array([1, 2, 3]) >>> xx.byteswap() >>> xx array([1, 2, 3]) >>> xx.type() Int32 Hi all, I was reading the documentation for array 0.4 but I get the about results. How do I get the bytes swaped like it says in the manual: numbyteswap() The byteswap method performs a byte swapping operation on all the elements in the array, working inplace (i.e. it returns None). >>> print a [1 2 3] >>> a.byteswap() >>> print a [16777216 33554432 50331648] Thanks, Sebastian |