[Numpy-discussion] segmentation fault

Perry Greenfield perry at stsci.edu
Tue Aug 3 07:22:14 CDT 2004


On 8/3/04 12:09 AM, "Shin" <sdhyok at email.unc.edu> wrote:

> The followind code generates "Process Python segmentation fault".
> Is it expected, or a bug?
> 
I'd hazard that it is a bug since I'm not sure when a seg fault is really
desired, but maybe that's just me ;-)

> from numarray import *
> from numarray.ieeespecial import *
> 
> x = arange(10, typecode='d')
> x[5] = nan
> del x[getnan(x)]
> 
But note that this is an error of usage. You shouldn't be trying to delete a
part of an array. You can delete the array but here you appear to be trying
to delete a nan value. Arrays don't work like lists in this regard. What are
you trying to do?

Perry Greenfield





More information about the Numpy-discussion mailing list