[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/06: gnu: tensorflow: Patch for numpy >= 1.23.
From: |
guix-commits |
Subject: |
02/06: gnu: tensorflow: Patch for numpy >= 1.23. |
Date: |
Tue, 20 Jun 2023 17:41:51 -0400 (EDT) |
rekado pushed a commit to branch master
in repository guix.
commit ffb30ffb6e3c57157855e8edbbb66da740b35ade
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Tue Jun 20 18:37:54 2023 +0200
gnu: tensorflow: Patch for numpy >= 1.23.
* gnu/packages/machine-learning.scm (tensorflow)[arguments]: Remove
np.asscalar in 'python3.10-compatibility phase.
---
gnu/packages/machine-learning.scm | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/machine-learning.scm
b/gnu/packages/machine-learning.scm
index ac2ac417e7..74b08aa020 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -2450,7 +2450,20 @@ Python.")
(("void BinaryUFunc\\(char\\*\\* args, npy_intp\\* dimensions,
npy_intp\\* steps,")
"void BinaryUFunc(char** args, npy_intp const* dimensions,
npy_intp const* steps,")
(("void CompareUFunc\\(char\\*\\* args, npy_intp\\* dimensions,
npy_intp\\* steps,")
- "void CompareUFunc(char** args, npy_intp const* dimensions,
npy_intp const* steps,"))))
+ "void CompareUFunc(char** args, npy_intp const* dimensions,
npy_intp const* steps,"))
+
+ ;; ...and for numpy >= 1.23
+ (substitute* '("tensorflow/python/framework/tensor_util.py")
+ (("np.asscalar\\(x\\[0\\]\\)") "x[0].item()")
+ (("np.asscalar\\(x\\)") "x.item()")
+ (("np.asscalar\\(v\\)") "np.ndarray.item(v)")
+ (("return np.asscalar") "return np.ndarray.item"))
+ (substitute* "tensorflow/python/kernel_tests/cwise_ops_test.py"
+ (("np.asscalar\\(np.random.rand\\(1\\) \\* 100.\\)")
+ "(np.random.rand(1) * 100.).item()"))
+ (substitute* '("tensorflow/python/framework/fast_tensor_util.pyx"
+
"tensorflow/python/estimator/canned/linear_testing_utils.py")
+ (("np.asscalar") "np.ndarray.item"))))
(add-after 'python3.10-compatibility 'chdir
(lambda _ (chdir "tensorflow/contrib/cmake")))
(add-after 'chdir 'disable-downloads
- branch master updated (24fc0d506a -> 6a91d4b8e0), guix-commits, 2023/06/20
- 02/06: gnu: tensorflow: Patch for numpy >= 1.23.,
guix-commits <=
- 05/06: gnu: python-keras: Update to 2.3.1., guix-commits, 2023/06/20
- 04/06: gnu: tensorflow: Patch one more instance of "collections"., guix-commits, 2023/06/20
- 06/06: gnu: python-dask: Add missing input., guix-commits, 2023/06/20
- 01/06: gnu: tensorflow: Drop package labels from propagated-inputs., guix-commits, 2023/06/20
- 03/06: gnu: tensorflow: Drop trailing #T from build phase., guix-commits, 2023/06/20