Re: [Numpy-discussion] Segfault using "fromstring" and reading variable length string

2011-04-24 Thread Gökhan Sever
On Fri, Apr 22, 2011 at 6:32 PM, Mark Wiebe wrote: > I took a quick look at this issue and committed a fix. PyArray_FromString > was doing a check to exclude object arrays, but that check was incorrect. > Now it should appropriately raise an exception instead of creating an > invalid array. > > >

Re: [Numpy-discussion] Segfault using "fromstring" and reading variable length string

2011-04-22 Thread Mark Wiebe
On Fri, Apr 22, 2011 at 5:08 PM, Christoph Gohlke wrote: > > > On 4/22/2011 2:52 PM, Gökhan Sever wrote: > > > > > > On Fri, Apr 22, 2011 at 12:37 PM, Ralf Gommers > > mailto:ralf.gomm...@googlemail.com>> > wrote: > > > > On Thu, Apr 21, 2011 at 10:06 PM, Gökhan Sever > > mailto:gokhanse.

Re: [Numpy-discussion] Segfault using "fromstring" and reading variable length string

2011-04-22 Thread Christoph Gohlke
On 4/22/2011 2:52 PM, Gökhan Sever wrote: > > > On Fri, Apr 22, 2011 at 12:37 PM, Ralf Gommers > mailto:ralf.gomm...@googlemail.com>> wrote: > > On Thu, Apr 21, 2011 at 10:06 PM, Gökhan Sever > mailto:gokhanse...@gmail.com>> wrote: > > Hello, > > Given this piece of code (I can

Re: [Numpy-discussion] Segfault using "fromstring" and reading variable length string

2011-04-22 Thread Gökhan Sever
On Fri, Apr 22, 2011 at 12:37 PM, Ralf Gommers wrote: > On Thu, Apr 21, 2011 at 10:06 PM, Gökhan Sever > wrote: > > Hello, > > Given this piece of code (I can provide the meg file off-the list for > those > > who wants to reproduce the error) > > Can you instead construct a test as simple as poss

Re: [Numpy-discussion] Segfault using "fromstring" and reading variable length string

2011-04-22 Thread Ralf Gommers
On Thu, Apr 21, 2011 at 10:06 PM, Gökhan Sever wrote: > Hello, > Given this piece of code (I can provide the meg file off-the list for those > who wants to reproduce the error) Can you instead construct a test as simple as possible for this? It sounds like you need only a two line string to repro

[Numpy-discussion] Segfault using "fromstring" and reading variable length string

2011-04-21 Thread Gökhan Sever
Hello, Given this piece of code (I can provide the meg file off-the list for those who wants to reproduce the error) import numpy as np f = open("a08A0122.341071.meg", "rb") dt = np.dtype([('line1', '|S80'), ('line2', np.object_), ('line3', '|S80'), ('line4', '|S80'), ('line5',