From b7ab5bccabed6a985fe9dfa1ac3b7b08ed15471f Mon Sep 17 00:00:00 2001 From: monai-bot Date: Thu, 5 Jan 2023 13:06:57 +0000 Subject: [PATCH 1/2] [MONAI] code formatting Signed-off-by: monai-bot --- monai/networks/layers/simplelayers.py | 2 +- monai/transforms/utility/array.py | 2 +- tests/test_image_filter.py | 1 - tests/test_preset_filters.py | 2 -- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/monai/networks/layers/simplelayers.py b/monai/networks/layers/simplelayers.py index ca7997e272..8a5f00fe98 100644 --- a/monai/networks/layers/simplelayers.py +++ b/monai/networks/layers/simplelayers.py @@ -670,7 +670,7 @@ def __init__(self, filter: NdarrayOrTensor) -> None: self.filter = convert_to_tensor(filter, dtype=torch.float32) def forward(self, x: torch.Tensor) -> torch.Tensor: - return apply_filter(x, self.filter) # type: ignore + return apply_filter(x, self.filter) class MeanFilter(ApplyFilter): diff --git a/monai/transforms/utility/array.py b/monai/transforms/utility/array.py index 02688d6604..5edb9536a4 100644 --- a/monai/transforms/utility/array.py +++ b/monai/transforms/utility/array.py @@ -1627,7 +1627,7 @@ def _check_filter_format( elif isinstance(filter, torch.Tensor) or isinstance(filter, np.ndarray): if filter.ndim not in [1, 2, 3]: raise ValueError("Only 1D, 2D, and 3D filters are supported.") - self._check_all_values_uneven(filter.shape) # type: ignore + self._check_all_values_uneven(filter.shape) elif isinstance(filter, (nn.Module, Transform)): pass else: diff --git a/tests/test_image_filter.py b/tests/test_image_filter.py index 007b5e8e2c..20d8a7b58c 100644 --- a/tests/test_image_filter.py +++ b/tests/test_image_filter.py @@ -9,7 +9,6 @@ # See the License for the specific language governing permissions and # limitations under the License. - import unittest import numpy as np diff --git a/tests/test_preset_filters.py b/tests/test_preset_filters.py index 0a6a4e8c50..ea34b2ebae 100644 --- a/tests/test_preset_filters.py +++ b/tests/test_preset_filters.py @@ -18,7 +18,6 @@ TEST_CASES_MEAN = [(3, 3, torch.ones(3, 3, 3)), (2, 5, torch.ones(5, 5))] - TEST_CASES_LAPLACE = [ ( 3, @@ -45,7 +44,6 @@ (2, 3, torch.Tensor([[0, 1, 0], [1, 1, 1], [0, 1, 0]])), ] - TEST_CASES_SHARPEN = [ ( 3, From 4debcd278d8f2d044feabd3c673c7ae863ce305c Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Thu, 5 Jan 2023 13:12:45 +0000 Subject: [PATCH 2/2] fixes logo path Signed-off-by: Wenqi Li --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 8fd33046e9..b8c1e07c8f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -118,7 +118,7 @@ def generate_apidocs(*args): "show_toc_level": 1, "footer_items": ["copyright"], "navbar_align": "content", - "logo": {"image_light": "../images/MONAI-logo-color.png", "image_dark": "../images/MONAI-logo-color.png"}, + "logo": {"image_light": "MONAI-logo-color.png", "image_dark": "MONAI-logo-color.png"}, } html_context = { "github_user": "Project-MONAI",