From e2df6fc91df5cc4ee06855de39f2ff792e333152 Mon Sep 17 00:00:00 2001 From: Younes Strittmatter Date: Thu, 25 Jul 2024 12:52:55 -0400 Subject: [PATCH 1/2] fix: add versioning to numpy --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 38ae7752..44b5b477 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ classifiers = [ # Optional ] dependencies = [ - "numpy", + "numpy>=1,<2", "matplotlib", "pandas", "scikit-learn", From 0e1f76c35e3a442c8d8fb85070f6ea6d1b4efbab Mon Sep 17 00:00:00 2001 From: Younes Strittmatter Date: Thu, 25 Jul 2024 13:04:05 -0400 Subject: [PATCH 2/2] fix: fix tests to numpy <2 --- src/autora/experimentalist/utils.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/autora/experimentalist/utils.py b/src/autora/experimentalist/utils.py index 0c37d325..aafb29e5 100644 --- a/src/autora/experimentalist/utils.py +++ b/src/autora/experimentalist/utils.py @@ -47,11 +47,11 @@ def sequence_to_recarray(iterable): Examples: A simple range object is converted into a recarray of dimension 2: - >>> sequence_to_recarray(range(5)) # doctest: +NORMALIZE_WHITESPACE + >>> sequence_to_recarray(range(5)) # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS rec.array([(0,), (1,), (2,), (3,), (4,)], dtype=[('f0', '>> sequence_to_recarray(zip(range(5), "abcde")) # doctest: +NORMALIZE_WHITESPACE + >>> sequence_to_recarray(zip(range(5), "abcde")) # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS rec.array([(0, 'a'), (1, 'b'), (2, 'c'), (3, 'd'), (4, 'e')], dtype=[('f0', '>> a1 = np.rec.fromarrays([range(5), list("abcde")]) - >>> a1 + >>> a1 # doctest: +ELLIPSIS rec.array([(0, 'a'), (1, 'b'), (2, 'c'), (3, 'd'), (4, 'e')], dtype=[('f0', '>> l1 = list(array_to_sequence(a1)) >>> l1 # doctest: +NORMALIZE_WHITESPACE - [np.record((0, 'a'), dtype=[('f0', '>> type(l1[0])