diff options
| author | Matti Picus <matti.picus@gmail.com> | 2022-10-07 09:51:17 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-07 09:51:17 +0300 |
| commit | ae6a3524acc38edfdc3951622fcc598414cc78ec (patch) | |
| tree | 5903ee1c4116d0171edc31c6af592c65762aa1be /numpy/linalg | |
| parent | 384c13e3fc5e5c9cb6340209f763dc421b4c301b (diff) | |
| parent | 06c380cec7d0ffb5ccbc15f43241bee94c287219 (diff) | |
| download | numpy-ae6a3524acc38edfdc3951622fcc598414cc78ec.tar.gz | |
Merge pull request #22313 from rossbar/deprecate-fastCopyAndTranspose
DEP: Deprecate fastCopyAndTranspose
Diffstat (limited to 'numpy/linalg')
| -rw-r--r-- | numpy/linalg/linalg.py | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index 48904b560..697193321 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -21,7 +21,7 @@ import warnings from numpy.core import ( array, asarray, zeros, empty, empty_like, intc, single, double, csingle, cdouble, inexact, complexfloating, newaxis, all, Inf, dot, - add, multiply, sqrt, fastCopyAndTranspose, sum, isfinite, + add, multiply, sqrt, sum, isfinite, finfo, errstate, geterrobj, moveaxis, amin, amax, product, abs, atleast_2d, intp, asanyarray, object_, matmul, swapaxes, divide, count_nonzero, isnan, sign, argsort, sort, @@ -158,10 +158,6 @@ def _commonType(*arrays): return t, result_type -# _fastCopyAndTranpose assumes the input is 2D (as all the calls in here are). - -_fastCT = fastCopyAndTranspose - def _to_native_byte_order(*arrays): ret = [] for arr in arrays: @@ -174,16 +170,6 @@ def _to_native_byte_order(*arrays): else: return ret -def _fastCopyAndTranspose(type, *arrays): - cast_arrays = () - for a in arrays: - if a.dtype.type is not type: - a = a.astype(type) - cast_arrays = cast_arrays + (_fastCT(a),) - if len(cast_arrays) == 1: - return cast_arrays[0] - else: - return cast_arrays def _assert_2d(*arrays): for a in arrays: @@ -1172,7 +1158,7 @@ def eigvalsh(a, UPLO='L'): def _convertarray(a): t, result_t = _commonType(a) - a = _fastCT(a.astype(t)) + a = a.astype(t).T.copy() return a, t, result_t |
