diff --git a/docs/source/whats_new.rst b/docs/source/whats_new.rst index 660b5bf24..03f64c01e 100644 --- a/docs/source/whats_new.rst +++ b/docs/source/whats_new.rst @@ -23,6 +23,7 @@ Bugs - Fix Stieger2021 dataset bugs (:gh:`651` by `Martin Wimpff`_) - Unpinning major version Scikit-learn and numpy (:gh:`652` by `Bruno Aristimunha`_) +- Replacing the func:`numpy.string_` to func:`numpy.bytes_` (:gh:`665` by `Bruno Aristimunha`_) API changes ~~~~~~~~~~~ diff --git a/moabb/analysis/meta_analysis.py b/moabb/analysis/meta_analysis.py index 620607107..b1a15c7ad 100644 --- a/moabb/analysis/meta_analysis.py +++ b/moabb/analysis/meta_analysis.py @@ -322,8 +322,8 @@ def find_significant_differences(df, perm_cutoff=20): nsubs = np.array([df.loc[df.dataset == d, "nsub"].mean() for d in dsets]) P_full = df.pivot_table(values="p", index=["dataset", "pipe1"], columns="pipe2") T_full = df.pivot_table(values="smd", index=["dataset", "pipe1"], columns="pipe2") - P = np.full((len(algs), len(algs)), np.NaN) - T = np.full((len(algs), len(algs)), np.NaN) + P = np.full((len(algs), len(algs)), np.nan) + T = np.full((len(algs), len(algs)), np.nan) for i in range(len(algs)): for j in range(len(algs)): if i != j: diff --git a/moabb/analysis/results.py b/moabb/analysis/results.py index a5e467936..e3f224e41 100644 --- a/moabb/analysis/results.py +++ b/moabb/analysis/results.py @@ -112,7 +112,7 @@ def __init__( if not osp.isfile(self.filepath): with h5py.File(self.filepath, "w") as f: - f.attrs["create_time"] = np.string_( + f.attrs["create_time"] = np.bytes_( "{:%Y-%m-%d, %H:%M}".format(datetime.now()) ) diff --git a/moabb/evaluations/evaluations.py b/moabb/evaluations/evaluations.py index 9a795b113..9685bb543 100644 --- a/moabb/evaluations/evaluations.py +++ b/moabb/evaluations/evaluations.py @@ -254,7 +254,7 @@ def _evaluate( if _carbonfootprint: emissions = tracker.stop() if emissions is None: - emissions = np.NaN + emissions = np.nan duration = time() - t_start nchan = X.info["nchan"] if isinstance(X, BaseEpochs) else X.shape[1] diff --git a/pyproject.toml b/pyproject.toml index 88f69868b..61a9b4595 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ license = "BSD-3-Clause" [tool.poetry.dependencies] python = ">=3.9,<3.13" -numpy = ">=1.22" +numpy = "^1.22" scipy = "^1.9.3" mne = "^1.7.0" pandas = ">=1.5.2"