@@ -1076,32 +1076,17 @@ def test_shape_zoom_affine():
1076
1076
zooms = (3 , 2 , 1 )
1077
1077
res = shape_zoom_affine (shape , zooms )
1078
1078
exp = np .array (
1079
- [
1080
- [- 3.0 , 0.0 , 0.0 , 3.0 ],
1081
- [0.0 , 2.0 , 0.0 , - 4.0 ],
1082
- [0.0 , 0.0 , 1.0 , - 3.0 ],
1083
- [0.0 , 0.0 , 0.0 , 1.0 ],
1084
- ]
1079
+ [[- 3.0 , 0.0 , 0.0 , 3.0 ], [0.0 , 2.0 , 0.0 , - 4.0 ], [0.0 , 0.0 , 1.0 , - 3.0 ], [0.0 , 0.0 , 0.0 , 1.0 ],]
1085
1080
)
1086
1081
assert_array_almost_equal (res , exp )
1087
1082
res = shape_zoom_affine ((3 , 5 ), (3 , 2 ))
1088
1083
exp = np .array (
1089
- [
1090
- [- 3.0 , 0.0 , 0.0 , 3.0 ],
1091
- [0.0 , 2.0 , 0.0 , - 4.0 ],
1092
- [0.0 , 0.0 , 1.0 , - 0.0 ],
1093
- [0.0 , 0.0 , 0.0 , 1.0 ],
1094
- ]
1084
+ [[- 3.0 , 0.0 , 0.0 , 3.0 ], [0.0 , 2.0 , 0.0 , - 4.0 ], [0.0 , 0.0 , 1.0 , - 0.0 ], [0.0 , 0.0 , 0.0 , 1.0 ],]
1095
1085
)
1096
1086
assert_array_almost_equal (res , exp )
1097
1087
res = shape_zoom_affine (shape , zooms , False )
1098
1088
exp = np .array (
1099
- [
1100
- [3.0 , 0.0 , 0.0 , - 3.0 ],
1101
- [0.0 , 2.0 , 0.0 , - 4.0 ],
1102
- [0.0 , 0.0 , 1.0 , - 3.0 ],
1103
- [0.0 , 0.0 , 0.0 , 1.0 ],
1104
- ]
1089
+ [[3.0 , 0.0 , 0.0 , - 3.0 ], [0.0 , 2.0 , 0.0 , - 4.0 ], [0.0 , 0.0 , 1.0 , - 3.0 ], [0.0 , 0.0 , 0.0 , 1.0 ],]
1105
1090
)
1106
1091
assert_array_almost_equal (res , exp )
1107
1092
@@ -1179,16 +1164,7 @@ def assert_rt(
1179
1164
if have_nans and nan_fill is None and not out_dtype .type == "f" :
1180
1165
raise ValueError ("Cannot handle this case" )
1181
1166
_write_data (
1182
- to_write ,
1183
- sio ,
1184
- out_dtype ,
1185
- order ,
1186
- in_cast ,
1187
- pre_clips ,
1188
- inter ,
1189
- slope ,
1190
- post_clips ,
1191
- nan_fill ,
1167
+ to_write , sio , out_dtype , order , in_cast , pre_clips , inter , slope , post_clips , nan_fill ,
1192
1168
)
1193
1169
arr = np .ndarray (shape , out_dtype , buffer = sio .getvalue (), order = order )
1194
1170
expected = to_write .copy ()
0 commit comments