<br><br><div class="gmail_quote">On Fri, Apr 22, 2011 at 12:37 PM, Ralf Gommers <span dir="ltr"><<a href="mailto:ralf.gommers@googlemail.com">ralf.gommers@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Thu, Apr 21, 2011 at 10:06 PM, Gökhan Sever <<a href="mailto:gokhansever@gmail.com">gokhansever@gmail.com</a>> wrote:<br>
> Hello,<br>
> Given this piece of code (I can provide the meg file off-the list for those<br>
> who wants to reproduce the error)<br>
<br>
</div>Can you instead construct a test as simple as possible for this? It<br>
sounds like you need only a two line string to reproduce this. The bug<br>
sounds similar to <a href="http://projects.scipy.org/numpy/ticket/1689" target="_blank">http://projects.scipy.org/numpy/ticket/1689</a>.<br>
<br>
Ralf</blockquote><div><br></div><div>This simple case segfaults as well (The commented line works correctly):</div><div><br></div><div>import numpy as np</div><div>from StringIO import StringIO</div><div><br></div><div>c = StringIO(" hello \r\n world \r\n")</div>
<div><br></div><div>dt = np.dtype([('line1', '|S6'), ('line2', np.object_)])</div><div>#dt = np.dtype([('line1', '|S9'), ('line2', '|S9')])</div><div>k = np.fromstring(c.read(dt.itemsize), dt)[0] </div>
</div><br>-- <br>Gökhan<br>