|
1 | 1 | from typing import Final, Generic, Self, SupportsIndex, overload, override |
2 | | -from typing_extensions import TypeVar |
| 2 | +from typing_extensions import TypeVar, deprecated |
3 | 3 |
|
4 | 4 | import numpy as np |
5 | 5 | import optype.numpy as onp |
@@ -106,22 +106,28 @@ class KDTree(cKDTree[_BoxSizeT_co, _BoxSizeDataT_co], Generic[_BoxSizeT_co, _Box |
106 | 106 | ) -> tuple[float, np.intp] | tuple[onp.ArrayND[np.float64], onp.ArrayND[np.intp]]: ... |
107 | 107 |
|
108 | 108 | @overload |
| 109 | +@deprecated("This function is deprecated in favor of `scipy.spatial.distance.minkowski` and will be removed in SciPy 1.20.0.") |
109 | 110 | def minkowski_distance_p(x: onp.ToFloatND, y: onp.ToFloatND, p: float = 2.0) -> onp.ArrayND[np.float64]: ... |
110 | 111 | @overload |
| 112 | +@deprecated("This function is deprecated in favor of `scipy.spatial.distance.minkowski` and will be removed in SciPy 1.20.0.") |
111 | 113 | def minkowski_distance_p(x: onp.ToComplexND, y: onp.ToComplexND, p: float = 2.0) -> onp.ArrayND[np.float64 | np.complex128]: ... |
112 | 114 |
|
113 | 115 | # |
114 | 116 | @overload |
| 117 | +@deprecated("This function is deprecated in favor of `scipy.spatial.distance.minkowski` and will be removed in SciPy 1.20.0.") |
115 | 118 | def minkowski_distance(x: onp.ToFloatND, y: onp.ToFloatND, p: float = 2.0) -> onp.ArrayND[np.float64]: ... |
116 | 119 | @overload |
| 120 | +@deprecated("This function is deprecated in favor of `scipy.spatial.distance.minkowski` and will be removed in SciPy 1.20.0.") |
117 | 121 | def minkowski_distance(x: onp.ToComplexND, y: onp.ToComplexND, p: float = 2.0) -> onp.ArrayND[np.float64 | np.complex128]: ... |
118 | 122 |
|
119 | 123 | # |
120 | 124 | @overload |
| 125 | +@deprecated("This function is deprecated in favor of `scipy.spatial.distance.cdist` and will be removed in SciPy 1.20.0.") |
121 | 126 | def distance_matrix( |
122 | 127 | x: onp.ToFloatND, y: onp.ToFloatND, p: float = 2.0, threshold: int = 1_000_000 |
123 | 128 | ) -> onp.Array2D[np.float64]: ... |
124 | 129 | @overload |
| 130 | +@deprecated("This function is deprecated in favor of `scipy.spatial.distance.cdist` and will be removed in SciPy 1.20.0.") |
125 | 131 | def distance_matrix( |
126 | 132 | x: onp.ToComplexND, y: onp.ToComplexND, p: float = 2.0, threshold: int = 1_000_000 |
127 | 133 | ) -> onp.Array2D[np.float64 | np.complex128]: ... |
0 commit comments