[SciPy-user] replacing numpy.inf in an array fast with 0.0 ?
nwagner at iam.uni-stuttgart.de
Thu Nov 23 08:03:21 CST 2006
> I have a big array which contains some inf/nan's and want to replace them with 0.0 . How to do? - robert
> SciPy-user mailing list
> SciPy-user at scipy.org
from scipy import *
z = random.rand(10)
z = nan
z[-1] = inf
Maybe there is a more efficient way.
More information about the SciPy-user