Skip to content

Commit f170e0f

Browse files
authored
Fix typos: argments and theashold (#5727)
### Description Fix typos: - argments -> arguments - theashold -> threshold ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
1 parent 5200cc6 commit f170e0f

24 files changed

Lines changed: 66 additions & 66 deletions

monai/transforms/post/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class AsDiscrete(Transform):
142142
Defaults to ``False``.
143143
to_onehot: if not None, convert input data into the one-hot format with specified number of classes.
144144
Defaults to ``None``.
145-
threshold: if not None, threshold the float values to int number 0 or 1 with specified theashold.
145+
threshold: if not None, threshold the float values to int number 0 or 1 with specified threshold.
146146
Defaults to ``None``.
147147
rounding: if not None, round the data according to the specified option,
148148
available options: ["torchrounding"].

tests/test_crop_foreground.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@
8888

8989
class TestCropForeground(unittest.TestCase):
9090
@parameterized.expand(TEST_COORDS + TESTS)
91-
def test_value(self, argments, image, expected_data):
92-
cropper = CropForeground(**argments)
91+
def test_value(self, arguments, image, expected_data):
92+
cropper = CropForeground(**arguments)
9393
result = cropper(image)
9494
assert_allclose(result, expected_data, type_test=False)
9595
self.assertIsInstance(result, MetaTensor)
@@ -100,10 +100,10 @@ def test_value(self, argments, image, expected_data):
100100
self.assertTupleEqual(inv.shape, image.shape)
101101

102102
@parameterized.expand(TEST_COORDS)
103-
def test_return_coords(self, argments, image, _):
104-
argments["return_coords"] = True
105-
_, start_coord, end_coord = CropForeground(**argments)(image)
106-
argments["return_coords"] = False
103+
def test_return_coords(self, arguments, image, _):
104+
arguments["return_coords"] = True
105+
_, start_coord, end_coord = CropForeground(**arguments)(image)
106+
arguments["return_coords"] = False
107107
np.testing.assert_allclose(start_coord, np.asarray([1, 1]))
108108
np.testing.assert_allclose(end_coord, np.asarray([4, 4]))
109109

tests/test_crop_foregroundd.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@
149149

150150
class TestCropForegroundd(unittest.TestCase):
151151
@parameterized.expand(TEST_POSITION + TESTS)
152-
def test_value(self, argments, input_data, expected_data):
153-
cropper = CropForegroundd(**argments)
152+
def test_value(self, arguments, input_data, expected_data):
153+
cropper = CropForegroundd(**arguments)
154154
result = cropper(input_data)
155155
assert_allclose(result["img"], expected_data, type_test="tensor")
156156
if "label" in input_data and "img" in input_data:
@@ -161,14 +161,14 @@ def test_value(self, argments, input_data, expected_data):
161161
self.assertTupleEqual(inv["label"].shape, input_data["label"].shape)
162162

163163
@parameterized.expand(TEST_POSITION)
164-
def test_foreground_position(self, argments, input_data, _):
165-
result = CropForegroundd(**argments)(input_data)
164+
def test_foreground_position(self, arguments, input_data, _):
165+
result = CropForegroundd(**arguments)(input_data)
166166
np.testing.assert_allclose(result["foreground_start_coord"], np.array([1, 1]))
167167
np.testing.assert_allclose(result["foreground_end_coord"], np.array([4, 4]))
168168

169-
argments["start_coord_key"] = "test_start_coord"
170-
argments["end_coord_key"] = "test_end_coord"
171-
result = CropForegroundd(**argments)(input_data)
169+
arguments["start_coord_key"] = "test_start_coord"
170+
arguments["end_coord_key"] = "test_end_coord"
171+
result = CropForegroundd(**arguments)(input_data)
172172
np.testing.assert_allclose(result["test_start_coord"], np.array([1, 1]))
173173
np.testing.assert_allclose(result["test_end_coord"], np.array([4, 4]))
174174

tests/test_gaussian_sharpen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@
8181

8282
class TestGaussianSharpen(unittest.TestCase):
8383
@parameterized.expand(TESTS)
84-
def test_value(self, argments, image, expected_data):
85-
result = GaussianSharpen(**argments)(image)
84+
def test_value(self, arguments, image, expected_data):
85+
result = GaussianSharpen(**arguments)(image)
8686
assert_allclose(result, expected_data, atol=0, rtol=1e-4, type_test="tensor")
8787

8888

tests/test_gaussian_sharpend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@
8181

8282
class TestGaussianSharpend(unittest.TestCase):
8383
@parameterized.expand(TESTS)
84-
def test_value(self, argments, image, expected_data):
85-
result = GaussianSharpend(**argments)(image)
84+
def test_value(self, arguments, image, expected_data):
85+
result = GaussianSharpend(**arguments)(image)
8686
assert_allclose(result["img"], expected_data, rtol=1e-4, type_test="tensor")
8787

8888

tests/test_gaussian_smooth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@
8585

8686
class TestGaussianSmooth(unittest.TestCase):
8787
@parameterized.expand(TESTS)
88-
def test_value(self, argments, image, expected_data):
89-
result = GaussianSmooth(**argments)(image)
88+
def test_value(self, arguments, image, expected_data):
89+
result = GaussianSmooth(**arguments)(image)
9090
assert_allclose(result, expected_data, atol=1e-4, rtol=1e-4, type_test="tensor")
9191

9292

tests/test_gaussian_smoothd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@
8585

8686
class TestGaussianSmoothd(unittest.TestCase):
8787
@parameterized.expand(TESTS)
88-
def test_value(self, argments, image, expected_data):
89-
result = GaussianSmoothd(**argments)(image)
88+
def test_value(self, arguments, image, expected_data):
89+
result = GaussianSmoothd(**arguments)(image)
9090
assert_allclose(result["img"], expected_data, rtol=1e-4, type_test="tensor")
9191

9292

tests/test_generate_distance_map.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@
3535

3636
class TestGenerateDistanceMap(unittest.TestCase):
3737
@parameterized.expand(EXCEPTION_TESTS)
38-
def test_value(self, argments, mask, probmap, exception_type):
38+
def test_value(self, arguments, mask, probmap, exception_type):
3939
with self.assertRaises(exception_type):
40-
GenerateDistanceMap(**argments)(mask, probmap)
40+
GenerateDistanceMap(**arguments)(mask, probmap)
4141

4242
@parameterized.expand(TESTS)
43-
def test_value2(self, argments, mask, probmap, expected_shape):
44-
result = GenerateDistanceMap(**argments)(mask, probmap)
43+
def test_value2(self, arguments, mask, probmap, expected_shape):
44+
result = GenerateDistanceMap(**arguments)(mask, probmap)
4545
self.assertEqual(result.shape, expected_shape)
4646

4747

tests/test_generate_distance_mapd.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@
5454

5555
class TestGenerateDistanceMapd(unittest.TestCase):
5656
@parameterized.expand(EXCEPTION_TESTS)
57-
def test_value(self, argments, mask, border_map, exception_type):
57+
def test_value(self, arguments, mask, border_map, exception_type):
5858
with self.assertRaises(exception_type):
59-
GenerateDistanceMapd(**argments)({"mask": mask, "border": border_map})
59+
GenerateDistanceMapd(**arguments)({"mask": mask, "border": border_map})
6060

6161
@parameterized.expand(TESTS)
62-
def test_value2(self, argments, mask, border_map, expected_shape):
63-
result = GenerateDistanceMapd(**argments)({"mask": mask, "border": border_map})
62+
def test_value2(self, arguments, mask, border_map, expected_shape):
63+
result = GenerateDistanceMapd(**arguments)({"mask": mask, "border": border_map})
6464
self.assertEqual(result["dist_map"].shape, expected_shape)
6565

6666

tests/test_generate_instance_borderd.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@
4343

4444
class TestGenerateInstanceBorderd(unittest.TestCase):
4545
@parameterized.expand(EXCEPTION_TESTS)
46-
def test_value(self, argments, mask, hover_map, exception_type):
46+
def test_value(self, arguments, mask, hover_map, exception_type):
4747
with self.assertRaises(exception_type):
48-
GenerateInstanceBorderd(**argments)({"mask": mask, "hover_map": hover_map})
48+
GenerateInstanceBorderd(**arguments)({"mask": mask, "hover_map": hover_map})
4949

5050
@parameterized.expand(TESTS)
51-
def test_value2(self, argments, mask, hover_map, expected_shape):
52-
result = GenerateInstanceBorderd(**argments)({"mask": mask, "hover_map": hover_map})
51+
def test_value2(self, arguments, mask, hover_map, expected_shape):
52+
result = GenerateInstanceBorderd(**arguments)({"mask": mask, "hover_map": hover_map})
5353
self.assertEqual(result["border"].shape, expected_shape)
5454

5555

0 commit comments

Comments
 (0)