Maybe use [`dtype_limits`](https://github.com/tonysyu/scikit-image/blob/master/skimage/util/dtype.py#L31) here instead? (And maybe `np.diff` as well)