[Numpy-discussion] Behavior of array scalars

Travis Oliphant oliphant.travis at ieee.org
Fri Feb 17 20:11:17 EST 2006


Sasha wrote:

>On 2/17/06, Travis Oliphant <oliphant at ee.byu.edu> wrote:
>  
>
>>>>from numpy 
>>>>
>
>The patch passes all the tests, but I would like to hear from others
>before commit.  Personally, I am unhappy that I had to change C-API
>function.
>  
>
Sorry we worked on the same code.  I already comitted a changed that 
solves the problem.  It doesn't change the C-API function but instead 
changes the _find_wrap code which needed changing anyway so that other 
objects passed in as output arrays work cause the returned object to be

obj.__array_wrap__(<ndarray_ufunc_result>)

no matter what the array priority was.

Now. 

a += b

doesn't change type no matter what a is.

-Travis







More information about the NumPy-Discussion mailing list