From dbfe418c03073baf07a0e14cd7606571f3d0de18 Mon Sep 17 00:00:00 2001 From: YunLiu <55491388+KumoLiu@users.noreply.github.com> Date: Tue, 3 Sep 2024 00:35:26 +0800 Subject: [PATCH] Ignore warning from nptyping as workaround (#8062) workaround for #8061 ### Description Ignore warning from nptyping as workaround ### Types of changes - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> Co-authored-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- monai/data/image_reader.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/monai/data/image_reader.py b/monai/data/image_reader.py index f5e199e2a3..aab1e03898 100644 --- a/monai/data/image_reader.py +++ b/monai/data/image_reader.py @@ -34,6 +34,9 @@ ) from monai.utils import MetaKeys, SpaceKeys, TraceKeys, ensure_tuple, optional_import, require_pkg +# workaround for https://github.com/Project-MONAI/MONAI/issues/8061 +warnings.filterwarnings("ignore", category=DeprecationWarning, module="nptyping") + if TYPE_CHECKING: import itk import nibabel as nib