[Numpy-discussion] Changeset 2222

Sasha ndarray at mac.com
Wed Mar 22 19:20:03 EST 2006


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.




More information about the NumPy-Discussion mailing list