[Numpy-discussion] Bus Error with object arrays on big endian system

Christopher Hanley chanley@stsci....
Mon Jan 21 09:25:54 CST 2008


The following will cause a bus error on a big endian machine (Solaris 10 
Sun in this case):

> Python 2.5.1 (r251:54863, Jun 29 2007, 15:29:55) [C] on sunos5
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import numpy
>>>> o = numpy.ndarray(shape=3,dtype=[('SEGMENT', '|S4'), ('SPEC_FOUND', '|i1')])
>>>> o1 = o.getfield(numpy.dtype('|S4'),0)
>>>> print o1[0]
>>>> print o1[1]
> 4
>>>> print o1[2]
> NT
>>>> print o1
> Bus error (core dumped)

There are no issues on Linux or Mac OS X Intel based systems.

This example was done on the latest svn version of numpy (r1.0.5.dev47360).

Does anyone have an idea of what may have broken?

Thank you for your time and help,


Christopher Hanley
Systems Software Engineer
Space Telescope Science Institute
3700 San Martin Drive
Baltimore MD, 21218
(410) 338-4338

More information about the Numpy-discussion mailing list