Well, @stefanv and the powers-that-be told me not to do int castings ;)

But you're right, this can be done better. `m = np.round(m).astype(new_type)` would be efficient.