- Add patch to fix an invalid usage of the dtype argument. This has already been fixed upstream but since Staging:F is so crowded now with python packages, I think it's better to patch it and update numpy once Staging:F is cleared: * fix-asarray.patch OBS-URL: https://build.opensuse.org/request/show/904174 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=90
35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
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(
|