From: Travis O. <oli...@ie...> - 2006-08-11 01:45:16
|
Sebastian Haase wrote: > Hi, > Does numpy.ascontiguousarray(arr) "fix" the byteorder when arr is non-native > byteorder ? > > If not, what functions does ? > It can if you pass in a data-type with the right byteorder (or use a native built-in data-type). In NumPy, it's the data-type that carries the "byte-order" information. So, there are lot's of ways to "fix" the byte-order. Of course there is still the difference between "fixing" the byte-order and simply "viewing" the memory in the correct byte-order. The former physically flips bytes around, the latter just flips them on calculation and presentation. -Travis |