Can't exponentiate zero in NumPy

Rick Muller rpm at wag.caltech.edu
Wed Sep 4 13:38:01 EDT 2002


I'm hoping someone can help me track down a potential bug that one of my 
users is reporting.

This user claims that exponentiating zero in Numeric raises an 
exception. It isn't clear to me whether the violating code is a single 
value or an array of zeros. That is

from Numeric import *
a = zeros(3,Float)
b = 0
print a**(4./3.)
print b**(4./3.)

I have not been able to get back in contact with this user to double 
check how and when this fails, and everything works on all of the 
machines I have at my disposal here.

Has anyone seen this before? Can anyone verify that it fails? Can anyone 
suggest an elegant workaround for the array case?

Thanks in advance,

Rick




More information about the Python-list mailing list