[Numpy-discussion] Setting small numbers to zero.

gerardob gberbeglia@gmail....
Wed Mar 17 10:51:54 CDT 2010


How can i modified all the values of a numpy array whose value is smaller
than a given epsilon to zero?

Example
epsilon=0.01
a = [[0.003,2][23,0.0001]] 

output:
[[0,2][23,0]] 

-- 
View this message in context: http://old.nabble.com/Setting-small-numbers-to-zero.-tp27933569p27933569.html
Sent from the Numpy-discussion mailing list archive at Nabble.com.



More information about the NumPy-Discussion mailing list