<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scale_dtype(arr, dtype):
 """Convert an array from 0..1 to dtype, scaling up linearly """

    max_int = np.iinfo(dtype).max
    return (arr * max_int).astype(dtype)