From 1e85cbaab5250125fbe86989929aec6e094adf8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 07:49:27 +0000 Subject: [PATCH 1/2] Update numpy requirement from <1.27,>=1.26.3 to >=1.26.3,<2.1 Updates the requirements on [numpy](https://github.com/numpy/numpy) to permit the latest version. - [Release notes](https://github.com/numpy/numpy/releases) - [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst) - [Commits](https://github.com/numpy/numpy/compare/v1.26.3...v2.0.0) --- updated-dependencies: - dependency-name: numpy dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8df9f01..2cf6532 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ classifiers = [ requires-python = ">=3.9,<3.13" dependencies = [ "matplotlib>=3.8.2,<3.10", - "numpy>=1.26.3,<1.27", + "numpy>=1.26.3,<2.1", "requests>=2.31.0,<2.33", "scipy>=1.12.0,<1.14", "tqdm>=4.66.1,<5.0", From edd6f689c3f10db41d160fb9aeda2d9d24a8603f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20C=C3=A9spedes=20Sisniega?= Date: Wed, 24 Jul 2024 22:13:05 +0200 Subject: [PATCH 2/2] Replace np.math with math --- frouros/utils/stats.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frouros/utils/stats.py b/frouros/utils/stats.py index f7e80aa..58f6756 100644 --- a/frouros/utils/stats.py +++ b/frouros/utils/stats.py @@ -2,6 +2,7 @@ import abc import itertools +import math from functools import partial from multiprocessing import Pool from typing import Any, Callable, Optional, Tuple, Union @@ -248,7 +249,7 @@ def permutation( # pylint: disable=too-many-arguments,too-many-locals X_num_samples, Y_num_samples = X.shape[0], Y.shape[0] # noqa: N806 data = np.concatenate([X, Y]) - max_num_permutations = np.math.factorial(data.shape[0]) + max_num_permutations = math.factorial(data.shape[0]) if num_permutations >= max_num_permutations: logger.warning( "Number of permutations (%s) is greater or equal "