Skip to content

Commit d8e4ee3

Browse files
benediktjohannesKumoLiuericspod
authored
Fixes several typos (#8712)
Hope this helps a bit πŸ‘ @ericspod Thanks as always for reviewing! --------- Signed-off-by: benediktjohannes <benedikt.johannes.hofer@gmail.com> Co-authored-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> Co-authored-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
1 parent 2f10e18 commit d8e4ee3

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

β€Žmonai/data/image_writer.pyβ€Ž

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ def set_data_array(
405405
``None`` indicates data without any channel dimension.
406406
squeeze_end_dims: if ``True``, any trailing singleton dimensions will be removed.
407407
kwargs: keyword arguments passed to ``self.convert_to_channel_last``,
408-
currently support ``spatial_ndim`` and ``contiguous``, defauting to ``3`` and ``False`` respectively.
408+
currently support ``spatial_ndim`` and ``contiguous``, defaulting to ``3`` and ``False`` respectively.
409409
"""
410410
n_chns = data_array.shape[channel_dim] if channel_dim is not None else 0
411411
self.data_obj = self.convert_to_channel_last(
@@ -424,7 +424,7 @@ def set_data_array(
424424

425425
def set_metadata(self, meta_dict: Mapping | None = None, resample: bool = True, **options):
426426
"""
427-
Resample ``self.dataobj`` if needed. This method assumes ``self.data_obj`` is a 'channel-last' ndarray.
427+
Resample ``self.data_obj`` if needed. This method assumes ``self.data_obj`` is a 'channel-last' ndarray.
428428
429429
Args:
430430
meta_dict: a metadata dictionary for affine, original affine and spatial shape information.
@@ -575,7 +575,7 @@ def set_data_array(
575575
``None`` indicates data without any channel dimension.
576576
squeeze_end_dims: if ``True``, any trailing singleton dimensions will be removed.
577577
kwargs: keyword arguments passed to ``self.convert_to_channel_last``,
578-
currently support ``spatial_ndim``, defauting to ``3``.
578+
currently support ``spatial_ndim``, defaulting to ``3``.
579579
"""
580580
self.data_obj = self.convert_to_channel_last(
581581
data=data_array,
@@ -586,7 +586,7 @@ def set_data_array(
586586

587587
def set_metadata(self, meta_dict: Mapping | None, resample: bool = True, **options):
588588
"""
589-
Resample ``self.dataobj`` if needed. This method assumes ``self.data_obj`` is a 'channel-last' ndarray.
589+
Resample ``self.data_obj`` if needed. This method assumes ``self.data_obj`` is a 'channel-last' ndarray.
590590
591591
Args:
592592
meta_dict: a metadata dictionary for affine, original affine and spatial shape information.
@@ -726,7 +726,7 @@ def set_data_array(
726726
squeeze_end_dims: if ``True``, any trailing singleton dimensions will be removed.
727727
contiguous: if ``True``, the data array will be converted to a contiguous array. Default is ``False``.
728728
kwargs: keyword arguments passed to ``self.convert_to_channel_last``,
729-
currently support ``spatial_ndim``, defauting to ``2``.
729+
currently support ``spatial_ndim``, defaulting to ``2``.
730730
"""
731731
self.data_obj = self.convert_to_channel_last(
732732
data=data_array,
@@ -738,7 +738,7 @@ def set_data_array(
738738

739739
def set_metadata(self, meta_dict: Mapping | None = None, resample: bool = True, **options):
740740
"""
741-
Resample ``self.dataobj`` if needed. This method assumes ``self.data_obj`` is a 'channel-last' ndarray.
741+
Resample ``self.data_obj`` if needed. This method assumes ``self.data_obj`` is a 'channel-last' ndarray.
742742
743743
Args:
744744
meta_dict: a metadata dictionary for affine, original affine and spatial shape information.

β€Žtests/data/test_cachedataset.pyβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test_shape(self, transform, expected_shape):
5757
self.assertEqual(len(data3), 1)
5858

5959
if transform is None:
60-
# Check without providing transfrom
60+
# Check without providing transform
6161
dataset2 = CacheDataset(data=test_data, cache_rate=0.5, as_contiguous=True)
6262
for k in ["image", "label", "extra"]:
6363
self.assertEqual(dataset[0][k], dataset2[0][k])

β€Žtests/data/test_smartcachedataset.pyβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def test_shape(self, replace_rate, num_replace_workers, transform):
6161
num_replace_workers=num_replace_workers,
6262
)
6363
if transform is None:
64-
# Check without providing transfrom
64+
# Check without providing transform
6565
dataset2 = SmartCacheDataset(
6666
data=test_data,
6767
replace_rate=replace_rate,

0 commit comments

Comments
Β (0)