Travis Oliphant wrote:
> 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.
> 
So then the question is: what is the easiest way to say:
give me the equivalent type of dtype, but with byteorder '<' (or '=') !?
I would be cumbersome (and ugly ;-) ) if one would have to "manually 
assemble" such a construct every time ...

> 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.
I understand. I need something that I can feed into my C routines that 
are to dumb to handle non-contiguous or byte-swapped data .

- Sebastian

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to