[Numpy-discussion] segmentation fault

Stéfan van der Walt stefan at sun.ac.za
Wed May 28 13:36:26 EDT 2008


2008/5/28 Stéfan van der Walt <stefan at sun.ac.za>:
> 2008/5/28 Charles R Harris <charlesr.harris at gmail.com>:
>> It's shape related.
>>
>> In [7]: x = numpy.random.rand(5,2)
>>
>> In [8]: y = ones((5,2))
>>
>> In [9]: x.cumsum(None,out=y)
>> Out[9]:
>> array([[ 0.76943981,  1.        ],
>>        [ 1.12678411,  1.        ],
>>        [ 1.69498328,  1.        ],
>>        [ 2.50560628,  1.        ],
>>        [ 3.23050034,  1.        ]])
>
> Yes, that first column doesn't stop there :)
>
> So, would it work to use a flattened view on the array in ufuncobject.c?

Scratch that.  Such a hack would just hide the underlying problem.
I'll keep quiet now
until I've parsed construct_reduce and PyArray_UFuncReduce properly.

Regards
Stéfan



More information about the NumPy-Discussion mailing list