@@ -162,8 +162,8 @@ def test_insert_multiple_values_into_multichannel_image_2d_nearest():
162
162
[torch .float32 , torch .float64 , torch .complex64 , torch .complex128 ]
163
163
)
164
164
def test_insert_into_image_2d_type_consistency (dtype ):
165
- image = torch .rand ((28 , 28 , 28 ), dtype = dtype )
166
- coords = torch .tensor (np .random .uniform (low = 0 , high = 27 , size = (3 , 4 , 5 , 3 )))
165
+ image = torch .rand ((4 , 4 , 4 ), dtype = dtype )
166
+ coords = torch .tensor (np .random .uniform (low = 0 , high = 3 , size = (3 , 4 , 5 , 3 )))
167
167
values = torch .rand (size = (3 , 4 , 5 ), dtype = dtype )
168
168
# cast the dtype to corresponding float for weights
169
169
weights = torch .zeros_like (image , dtype = torch .float64 )
@@ -181,8 +181,8 @@ def test_insert_into_image_2d_type_consistency(dtype):
181
181
182
182
183
183
def test_insert_into_image_3d_type_error ():
184
- image = torch .rand ((28 , 28 , 28 ), dtype = torch .complex64 )
185
- coords = torch .tensor (np .random .uniform (low = 0 , high = 27 , size = (3 , 4 , 5 , 3 )))
184
+ image = torch .rand ((4 , 4 , 4 ), dtype = torch .complex64 )
185
+ coords = torch .tensor (np .random .uniform (low = 0 , high = 3 , size = (3 , 4 , 5 , 3 )))
186
186
values = torch .rand (size = (3 , 4 , 5 ), dtype = torch .complex128 )
187
187
# cast the dtype to corresponding float for weights
188
188
with pytest .raises (ValueError ):
0 commit comments