Le Monday 27 October 2008 12:41:06 Nicolas ROUX, vous avez écrit : > Hello, > > I hope this is not a silly question ;-) > I have a Numpy array, and I want to process it with : > "if the value is lower than Threshold, then increase by Threshold" > > > I would like to translate it as: > y[y<Treshold] = y + Treshold
let's see : y[y<T] += T Is it what you want ? > > To benefit from the Numpy speed. > But this doesn't work, any idea ? > > Thanks, > Cheers, > Nicolas. > > _______________________________________________ > Numpy-discussion mailing list > [email protected] > http://projects.scipy.org/mailman/listinfo/numpy-discussion -- David Douard LOGILAB, Paris (France), +33 1 45 32 03 12 Formations Python, Zope, Debian : http://www.logilab.fr/formations Développement logiciel sur mesure : http://www.logilab.fr/services Informatique scientifique : http://www.logilab.fr/science
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
