Use ``np.uint8``.   Also, can't we do all the operations in floating point instead?