def test_sanitize_dtype_numpy(): for dtype in ['float', 'float32', np.float32, int]: assert sanitize_dtype_numpy(dtype) == np.float32, dtype for dtype in [float, 'float64', np.float64]: assert sanitize_dtype_numpy(dtype) == np.float64, dtype for dtype in ['int8', np.int8]: assert sanitize_dtype_numpy(dtype) == np.int8, dtype
def test_sanitize_dtype_numpy(): for dtype in ['float', 'float32', np.float32, int]: assert sanitize_dtype_numpy(dtype) == np.float32, dtype for dtype in [float, 'float64', np.float64]: assert sanitize_dtype_numpy(dtype) == np.float64, dtype for dtype in ['int8', np.int8]: assert sanitize_dtype_numpy(dtype) == np.int8, dtype for dtype in ['int16', np.int16]: assert sanitize_dtype_numpy(dtype) == np.int16, dtype