@@ -108,27 +108,6 @@ def test_channel_wise(self, im_type):
108108 normalized = normalizer (input_data )
109109 assert_allclose (normalized , im_type (expected ), type_test = "tensor" )
110110
111- @parameterized .expand ([[p ] for p in TEST_NDARRAYS ])
112- def test_channel_wise_int (self , im_type ):
113- normalizer = NormalizeIntensity (nonzero = True , channel_wise = True )
114- input_data = im_type (torch .arange (1 , 25 ).reshape (2 , 3 , 4 ))
115- expected = np .array (
116- [
117- [
118- [- 1.593255 , - 1.3035723 , - 1.0138896 , - 0.7242068 ],
119- [- 0.4345241 , - 0.1448414 , 0.1448414 , 0.4345241 ],
120- [0.7242068 , 1.0138896 , 1.3035723 , 1.593255 ],
121- ],
122- [
123- [- 1.593255 , - 1.3035723 , - 1.0138896 , - 0.7242068 ],
124- [- 0.4345241 , - 0.1448414 , 0.1448414 , 0.4345241 ],
125- [0.7242068 , 1.0138896 , 1.3035723 , 1.593255 ],
126- ],
127- ]
128- )
129- normalized = normalizer (input_data )
130- assert_allclose (normalized , im_type (expected ), type_test = "tensor" , rtol = 1e-7 , atol = 1e-7 ) # tolerance
131-
132111 @parameterized .expand ([[p ] for p in TEST_NDARRAYS ])
133112 def test_value_errors (self , im_type ):
134113 input_data = im_type (np .array ([[0.0 , 3.0 , 0.0 , 4.0 ], [0.0 , 4.0 , 0.0 , 5.0 ]]))
0 commit comments