|
16 | 16 | 'eig_banded', 'eigvals_banded',
|
17 | 17 | 'eigh_tridiagonal', 'eigvalsh_tridiagonal', 'hessenberg', 'cdf2rdf']
|
18 | 18 |
|
19 |
| -import warnings |
20 |
| - |
21 | 19 | import numpy as np
|
22 | 20 | from numpy import (array, isfinite, inexact, nonzero, iscomplexobj,
|
23 | 21 | flatnonzero, conj, asarray, argsort, empty,
|
|
26 | 24 | from scipy._lib._util import _asarray_validated
|
27 | 25 | from ._misc import LinAlgError, _datacopied, norm
|
28 | 26 | from .lapack import get_lapack_funcs, _compute_lwork
|
29 |
| -from scipy._lib.deprecation import _NoValue, _deprecate_positional_args |
30 | 27 |
|
31 | 28 |
|
32 | 29 | _I = np.array(1j, dtype='F')
|
@@ -283,11 +280,9 @@ def eig(a, b=None, left=False, right=True, overwrite_a=False,
|
283 | 280 | return w, vr
|
284 | 281 |
|
285 | 282 |
|
286 |
| -@_deprecate_positional_args(version="1.14.0") |
287 | 283 | def eigh(a, b=None, *, lower=True, eigvals_only=False, overwrite_a=False,
|
288 |
| - overwrite_b=False, turbo=_NoValue, eigvals=_NoValue, type=1, |
289 |
| - check_finite=True, subset_by_index=None, subset_by_value=None, |
290 |
| - driver=None): |
| 284 | + overwrite_b=False, type=1, check_finite=True, subset_by_index=None, |
| 285 | + subset_by_value=None, driver=None): |
291 | 286 | """
|
292 | 287 | Solve a standard or generalized eigenvalue problem for a complex
|
293 | 288 | Hermitian or real symmetric matrix.
|
@@ -355,16 +350,6 @@ def eigh(a, b=None, *, lower=True, eigvals_only=False, overwrite_a=False,
|
355 | 350 | Whether to check that the input matrices contain only finite numbers.
|
356 | 351 | Disabling may give a performance gain, but may result in problems
|
357 | 352 | (crashes, non-termination) if the inputs do contain infinities or NaNs.
|
358 |
| - turbo : bool, optional, deprecated |
359 |
| - .. deprecated:: 1.5.0 |
360 |
| - `eigh` keyword argument `turbo` is deprecated in favour of |
361 |
| - ``driver=gvd`` keyword instead and will be removed in SciPy |
362 |
| - 1.14.0. |
363 |
| - eigvals : tuple (lo, hi), optional, deprecated |
364 |
| - .. deprecated:: 1.5.0 |
365 |
| - `eigh` keyword argument `eigvals` is deprecated in favour of |
366 |
| - `subset_by_index` keyword instead and will be removed in SciPy |
367 |
| - 1.14.0. |
368 | 353 |
|
369 | 354 | Returns
|
370 | 355 | -------
|
@@ -460,17 +445,6 @@ def eigh(a, b=None, *, lower=True, eigvals_only=False, overwrite_a=False,
|
460 | 445 | (5, 1)
|
461 | 446 |
|
462 | 447 | """
|
463 |
| - if turbo is not _NoValue: |
464 |
| - warnings.warn("Keyword argument 'turbo' is deprecated in favour of '" |
465 |
| - "driver=gvd' keyword instead and will be removed in " |
466 |
| - "SciPy 1.14.0.", |
467 |
| - DeprecationWarning, stacklevel=2) |
468 |
| - if eigvals is not _NoValue: |
469 |
| - warnings.warn("Keyword argument 'eigvals' is deprecated in favour of " |
470 |
| - "'subset_by_index' keyword instead and will be removed " |
471 |
| - "in SciPy 1.14.0.", |
472 |
| - DeprecationWarning, stacklevel=2) |
473 |
| - |
474 | 448 | # set lower
|
475 | 449 | uplo = 'L' if lower else 'U'
|
476 | 450 | # Set job for Fortran routines
|
@@ -516,19 +490,12 @@ def eigh(a, b=None, *, lower=True, eigvals_only=False, overwrite_a=False,
|
516 | 490 | cplx = True if iscomplexobj(b1) else (cplx or False)
|
517 | 491 | drv_args.update({'overwrite_b': overwrite_b, 'itype': type})
|
518 | 492 |
|
519 |
| - # backwards-compatibility handling |
520 |
| - subset_by_index = subset_by_index if (eigvals in (None, _NoValue)) else eigvals |
521 |
| - |
522 | 493 | subset = (subset_by_index is not None) or (subset_by_value is not None)
|
523 | 494 |
|
524 | 495 | # Both subsets can't be given
|
525 | 496 | if subset_by_index and subset_by_value:
|
526 | 497 | raise ValueError('Either index or value subset can be requested.')
|
527 | 498 |
|
528 |
| - # Take turbo into account if all conditions are met otherwise ignore |
529 |
| - if turbo not in (None, _NoValue) and b is not None: |
530 |
| - driver = 'gvx' if subset else 'gvd' |
531 |
| - |
532 | 499 | # Check indices if given
|
533 | 500 | if subset_by_index:
|
534 | 501 | lo, hi = (int(x) for x in subset_by_index)
|
@@ -943,11 +910,9 @@ def eigvals(a, b=None, overwrite_a=False, check_finite=True,
|
943 | 910 | homogeneous_eigvals=homogeneous_eigvals)
|
944 | 911 |
|
945 | 912 |
|
946 |
| -@_deprecate_positional_args(version="1.14.0") |
947 | 913 | def eigvalsh(a, b=None, *, lower=True, overwrite_a=False,
|
948 |
| - overwrite_b=False, turbo=_NoValue, eigvals=_NoValue, type=1, |
949 |
| - check_finite=True, subset_by_index=None, subset_by_value=None, |
950 |
| - driver=None): |
| 914 | + overwrite_b=False, type=1, check_finite=True, subset_by_index=None, |
| 915 | + subset_by_value=None, driver=None): |
951 | 916 | """
|
952 | 917 | Solves a standard or generalized eigenvalue problem for a complex
|
953 | 918 | Hermitian or real symmetric matrix.
|
@@ -1010,15 +975,6 @@ def eigvalsh(a, b=None, *, lower=True, overwrite_a=False,
|
1010 | 975 | "evd", "evr", "evx" for standard problems and "gv", "gvd", "gvx" for
|
1011 | 976 | generalized (where b is not None) problems. See the Notes section of
|
1012 | 977 | `scipy.linalg.eigh`.
|
1013 |
| - turbo : bool, optional, deprecated |
1014 |
| - .. deprecated:: 1.5.0 |
1015 |
| - 'eigvalsh' keyword argument `turbo` is deprecated in favor of |
1016 |
| - ``driver=gvd`` option and will be removed in SciPy 1.14.0. |
1017 |
| -
|
1018 |
| - eigvals : tuple (lo, hi), optional |
1019 |
| - .. deprecated:: 1.5.0 |
1020 |
| - 'eigvalsh' keyword argument `eigvals` is deprecated in favor of |
1021 |
| - `subset_by_index` option and will be removed in SciPy 1.14.0. |
1022 | 978 |
|
1023 | 979 | Returns
|
1024 | 980 | -------
|
@@ -1066,11 +1022,10 @@ def eigvalsh(a, b=None, *, lower=True, overwrite_a=False,
|
1066 | 1022 | array([-3.74637491, -0.76263923, 6.08502336, 12.42399079])
|
1067 | 1023 |
|
1068 | 1024 | """
|
1069 |
| - return eigh(a, b=b, lower=lower, eigvals_only=True, |
1070 |
| - overwrite_a=overwrite_a, overwrite_b=overwrite_b, |
1071 |
| - turbo=turbo, eigvals=eigvals, type=type, |
1072 |
| - check_finite=check_finite, subset_by_index=subset_by_index, |
1073 |
| - subset_by_value=subset_by_value, driver=driver) |
| 1025 | + return eigh(a, b=b, lower=lower, eigvals_only=True, overwrite_a=overwrite_a, |
| 1026 | + overwrite_b=overwrite_b, type=type, check_finite=check_finite, |
| 1027 | + subset_by_index=subset_by_index, subset_by_value=subset_by_value, |
| 1028 | + driver=driver) |
1074 | 1029 |
|
1075 | 1030 |
|
1076 | 1031 | def eigvals_banded(a_band, lower=False, overwrite_a_band=False,
|
|
0 commit comments