Maximum Allowed Value For A Numpy Data Type
I am working with numpy arrays of a range of data types (uint8, uint16, int16, etc.). I would like to be able to check whether a number can be represented within the limits of an a
Solution 1:
min_value = np.iinfo(im.dtype).min
max_value = np.iinfo(im.dtype).max
docs:
Post a Comment for "Maximum Allowed Value For A Numpy Data Type"