Files
python-numpy/fix-asarray.patch

35 lines
1.3 KiB
Diff
Raw Normal View History

From: Antonio Larrosa <alarrosa@suse.com>
Subject: dtype is not a positional argument
Index: numpy-1.20.3/numpy/core/_asarray.py
===================================================================
--- numpy-1.20.3.orig/numpy/core/_asarray.py
+++ numpy-1.20.3/numpy/core/_asarray.py
@@ -99,7 +99,7 @@ def asarray(a, dtype=None, order=None, *
if like is not None:
return _asarray_with_like(a, dtype=dtype, order=order, like=like)
- return array(a, dtype, copy=False, order=order)
+ return array(a, dtype=dtype, copy=False, order=order)
_asarray_with_like = array_function_dispatch(
@@ -168,7 +168,7 @@ def asanyarray(a, dtype=None, order=None
if like is not None:
return _asanyarray_with_like(a, dtype=dtype, order=order, like=like)
- return array(a, dtype, copy=False, order=order, subok=True)
+ return array(a, dtype=dtype, copy=False, order=order, subok=True)
_asanyarray_with_like = array_function_dispatch(
@@ -278,7 +278,7 @@ def asfortranarray(a, dtype=None, *, lik
if like is not None:
return _asfortranarray_with_like(a, dtype=dtype, like=like)
- return array(a, dtype, copy=False, order='F', ndmin=1)
+ return array(a, dtype=dtype, copy=False, order='F', ndmin=1)
_asfortranarray_with_like = array_function_dispatch(