diff --git a/src/napari_deeplabcut/__init__.py b/src/napari_deeplabcut/__init__.py index 7b49e80..3e34644 100644 --- a/src/napari_deeplabcut/__init__.py +++ b/src/napari_deeplabcut/__init__.py @@ -4,6 +4,14 @@ # FIXME: Circumvent the need to access window.qt_viewer warnings.filterwarnings("ignore", category=FutureWarning) +import re +# Suppress RuntimeWarnings caused by NaN values in dataframe +# (encountered during model-predicted labels refinement stage) +warnings.filterwarnings( + "ignore", + category=RuntimeWarning, + message=re.escape("invalid value encountered in cast"), +) class VispyWarningFilter(logging.Filter): def filter(self, record):