Sorry for nitpicking on this, but I think this line is not necessary. You can simply use `(image > 0).view(np.uint8)` for both branches since the overflow is solely dependent on the dtype of the output array.