>>> Alan G Isaac wrote:
>>>> Does this do what you want? 
>>>> idx = np.abs(a)<min_value 
>>>> a[idx] = min_value 

Christopher Barker wrote:
> -1 should go to -2

ok then:
a[idx] = min_value*np.sign(a[idx])
I think that's what you are saying?

Cheers,
Alan Isaac


_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to