Ticket #648 (closed defect: duplicate)
Bus Error with object arrays on big endian system
| Reported by: | chanley | Owned by: | somebody |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1.0 |
| Component: | numpy.core | Version: | devel |
| Keywords: | object arrays | Cc: | chanley@… |
Description
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]
> UXÐ
>>>> 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).
Change History
Note: See
TracTickets for help on using
tickets.
