From f7a3964312af344694f8547e9ecf48440172d854 Mon Sep 17 00:00:00 2001 From: Talmo Pereira Date: Tue, 12 Sep 2023 13:15:15 -0700 Subject: [PATCH] Fallback on import newer numpy.testing module --- pyproject.toml | 2 +- sleap_io/io/nwb.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d8f1c616..1c385f2c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.9" ] dependencies = [ - "numpy>=1.19.5", + "numpy>=1.19.2", "attrs>=21.2.0", "h5py>=3.1.0", "pynwb", diff --git a/sleap_io/io/nwb.py b/sleap_io/io/nwb.py index c018da5c..6618eb74 100644 --- a/sleap_io/io/nwb.py +++ b/sleap_io/io/nwb.py @@ -8,7 +8,11 @@ import pandas as pd # type: ignore[import] import numpy as np -from numpy.typing import ArrayLike + +try: + from numpy.typing import ArrayLike +except ImportError: + ArrayLike = np.ndarray from pynwb import NWBFile, NWBHDF5IO, ProcessingModule # type: ignore[import] from ndx_pose import PoseEstimationSeries, PoseEstimation # type: ignore[import]