[Numpy-discussion] discussion about array.resize() -- compare to numarray
haase at msg.ucsf.edu
Thu Jan 4 19:15:09 EST 2007
I'm continuing my code conversion to numpy.
Trying to track down a segmentation fault I found
1) ndimage crashed because I was feeding (nan,nan) as shift value .....
2) but where did I get the nan from ? I just found that there is code
like this: (*paraphrased*)
size = N.array(  )
size.resize( 2 )
... trying this interactively I get an exception:
>>> a = N.array()
Traceback (most recent call last):
File "<input>", line 1, in ?
ValueError: cannot resize an array that has been referenced or is referencing
another array in this way. Use the resize function
in any case: inside the script it somehow generated a nan --- is
there a bug in numpy !?
I remember that there was some discussion about resize !?
What should I add to the Scipy Wiki numarray page about this ?
( http://www.scipy.org/Converting_from_numarray )
More information about the NumPy-Discussion