[Numpy-discussion] Bus Error with string in ndarray with named fields

Charles R Harris charlesr.harris at gmail.com
Tue Apr 24 13:34:04 EDT 2007


On 4/20/07, Per B. Sederberg <persed at princeton.edu> wrote:
>
> Hi Folks:
>
> I'm getting a very strange bus error in the recent versions of numpy
> (almost current svn).  Here's how you can (hopefully) replicate it:
>
> On my MacBook:
>
> Python 2.4.3 (#1, Apr  7 2006, 10:54:33)
> [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import numpy as N
> >>> N.version.version
> '1.0.2.dev3569'
> >>> fields = [('x',(N.str,40))]
> >>> dat = N.zeros(1,fields)
> >>> dat
> Bus error
>
>
> On my linux cluster:
>
> Python 2.4.3 (#1, May  8 2006, 11:36:25)
> [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-49)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import numpy as N
> >>> N.version.version
> '1.0.2.dev3567'
> >>> fields = [('x',(N.str,40))]
> >>> dat = N.zeros(1,fields)
> >>> dat
> Segmentation fault


Works here running 1.0.3.dev3679 on 32 bit linux. You might want to upgrade
to release 1.0.2, as your version is prior to that. Are you running a 64 bit
OS on the problem machines? That might be another source of the problem.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20070424/7dbdf2e4/attachment.html>


More information about the NumPy-Discussion mailing list