numpy.fastCopyAndTranspose Segfaults
I tried posting to the numpy mailing list but it didn't seem to make it through so I'm re-posting in case it's of interest to the scipy community. As the subject says the below code will crash the Python interpreter. I'm running 32-bit Win XP on an x64 xeon cpu. Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. from datetime import datetime, timedelta from numpy import asarray, fastCopyAndTranspose import numpy numpy.__version__ '1.0.5.dev5008' timestamps = [datetime(2007,1,1)] while timestamps[-1] < datetime(2007,12,31): timestamps.append(timestamps[-1] + timedelta(1)) x = [asarray(timestamps),asarray(range(len(timestamps)))] fastCopyAndTranspose(x) -Dave
Dave wrote:
I tried posting to the numpy mailing list but it didn't seem to make it through so I'm re-posting in case it's of interest to the scipy community.
As the subject says the below code will crash the Python interpreter. I'm running 32-bit Win XP on an x64 xeon cpu.
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.
from datetime import datetime, timedelta from numpy import asarray, fastCopyAndTranspose import numpy numpy.__version__ '1.0.5.dev5008' timestamps = [datetime(2007,1,1)] while timestamps[-1] < datetime(2007,12,31): timestamps.append(timestamps[-1] + timedelta(1))
x = [asarray(timestamps),asarray(range(len(timestamps)))] fastCopyAndTranspose(x)
It looks like the segfault occurs in the printing of the result. If you set y = fastCopyAndTranspose(x) you don't get a segfault until you try to print it (actually __repr__ it). This should be filed as a ticket. -Travis
Travis E. Oliphant <oliphant <at> enthought.com> writes:
It looks like the segfault occurs in the printing of the result. If you set y = fastCopyAndTranspose(x) you don't get a segfault until you try to print it (actually __repr__ it).
This should be filed as a ticket.
-Travis
Ticket #766 created. My first ticket so I hope it's ok! -Dave
participants (2)
-
Dave -
Travis E. Oliphant