In article 
<[EMAIL PROTECTED]>,
 "Sebastian Haase" <[EMAIL PROTECTED]> wrote:

>...But maybe even more worry some for the converting from numarray is 
this:
> >>> a = N.array([5])
> >>> 999  # to kill '_' - reference
> 999
> >>> a.resize(2)
> >>> a
> [5 0]
> 
> in numarray you would get
> >>> a = na.array([5])
> >>> a.resize(2)
> [5 5]
> >>> a
> [5 5]

I also checked the numpy 1.0.1 help and I confess I don't understand at 
all what it claims to do if the new size is larger. It first says it 
repeats a and then it says it zero-fills the output.

>>> help(numpy.resize)
Help on function resize in module numpy.core.fromnumeric:

resize(a, new_shape)
    resize(a,new_shape) returns a new array with the specified shape.
    The original array's total size can be any size. It
    fills the new array with repeated copies of a.
    
    Note that a.resize(new_shape) will fill array with 0's
    beyond current definition of a.

_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to