30 Aug
2008
30 Aug
'08
11:24 p.m.
Stéfan van der Walt wrote:
Maybe
(np.sign(a) | 1) * np.maximum(np.abs(a), min_value)
is a little bit easier on the eye.
nice! that does it. somehow I never think of using or. Alan G Isaac wrote:
idx = np.abs(a)
that's do it too, but it's a bit more wordy, and I'm guessing slower, though that's really irrelevant here. thanks all, -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception