[Numpy-discussion] Changeset 2222

Travis Oliphant oliphant.travis at ieee.org
Wed Mar 22 20:09:15 CST 2006


Sasha wrote:
> Changeset 2222 redefines several oldnumeric functions according to the
> following template:
>
>            try:
> 	        result = a.FUNC(...)
> 	    except AttributeError:
> 	        result = _wrapit(a, 'FUNC', ...)
> 	    return result
>
> I believe it should be:
>
>            try:
> 	        FUNC = a.FUNC
> 	    except AttributeError:
> 	        return _wrapit(a, 'FUNC', ...)
> 	    return FUNC(...)
>
> In most cases it should not matter, but some FUNCs can throw
> AttributeError on object arrays.
>   
Good point.     Needs to be changed.

-Travis





More information about the Numpy-discussion mailing list