From: Travis O. <oli...@ie...> - 2006-08-22 16:36:21
|
Sebastian Haase wrote: > Hi, > We just spend some time debugging some numpy image analysis code > where we finally noticed that our file was byte-swapped ;-). > Even though we got much crazier numbers, > the test below already shows one bug in the a.real.max() line. > My numpy.__version__ is '1.0b3.dev3015' and this is run on pentium (little > endian) Linux (both 64bit and 32bit version give same results): > > I just fixed two bugs with respect to this issue which were introduced at various stages of development 1) The real and imag attribute getting functions were not respecting the byte-order of the data-type object of the array on creation of the "floating-point" equivalent data-type --- this one was introduced on the change to have byteorder part of the data-type object itself. 2) The copyswapn function for complex arrays was not performing two sets of swaps. It was performing one large swap (which had the effect of moving the real part to the imaginary part and vice-versa). These bug-fixes will be in 1.0b4 -Travis |