mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: tensorflow: Patch one more instance of "collections".
* gnu/packages/machine-learning.scm (tensorflow)[arguments]: Add one more patch of "collections" to "collections.abc" to the 'python3.10-compatibility phase.
This commit is contained in:
parent
91e07cc5bf
commit
b4e37a3972
1 changed files with 3 additions and 1 deletions
|
@ -2435,6 +2435,8 @@ (define-public tensorflow
|
||||||
(substitute* "tensorflow/python/keras/callbacks.py"
|
(substitute* "tensorflow/python/keras/callbacks.py"
|
||||||
(("from collections import Iterable")
|
(("from collections import Iterable")
|
||||||
"from collections.abc import Iterable"))
|
"from collections.abc import Iterable"))
|
||||||
|
(substitute* "tensorflow/python/ops/variable_scope.py"
|
||||||
|
(("collections_lib.Sequence") "collections_lib.abc.Sequence"))
|
||||||
|
|
||||||
;; XXX: it is not clear if this is a good idea, but the build
|
;; XXX: it is not clear if this is a good idea, but the build
|
||||||
;; system tries to overwrite the __or__ and __ror__ methods of
|
;; system tries to overwrite the __or__ and __ror__ methods of
|
||||||
|
@ -2453,7 +2455,7 @@ (define-public tensorflow
|
||||||
"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
|
;; ...and for numpy >= 1.23
|
||||||
(substitute* '("tensorflow/python/framework/tensor_util.py")
|
(substitute* "tensorflow/python/framework/tensor_util.py"
|
||||||
(("np.asscalar\\(x\\[0\\]\\)") "x[0].item()")
|
(("np.asscalar\\(x\\[0\\]\\)") "x[0].item()")
|
||||||
(("np.asscalar\\(x\\)") "x.item()")
|
(("np.asscalar\\(x\\)") "x.item()")
|
||||||
(("np.asscalar\\(v\\)") "np.ndarray.item(v)")
|
(("np.asscalar\\(v\\)") "np.ndarray.item(v)")
|
||||||
|
|
Loading…
Reference in a new issue