Is there a way to get the range of a numpy type?  I'd like to clamp a
parameter to be within the range of a numpy type, np.uint8, np.uint32...

Something like:
if x > max_value_of(np.uint8):
   x = max_value_of(np.uint8)


-- 
Christopher Burns
Computational Infrastructure for Research Labs
10 Giannini Hall, UC Berkeley
phone: 510.643.4014
http://cirl.berkeley.edu/
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to