Alan G Isaac wrote: > Does this do what you want? > idx = np.abs(a)<min_value > a[idx] = min_value
out of interest, is there any performance difference between: a[np.abs(a)<min_value] = min_value and: a = np.where(np.abs(a)<min_value, min_value, a) I think the former is more readable. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
