function_base.pyi
1 from typing import ( 2 Literal as L, 3 overload, 4 Any, 5 SupportsIndex, 6 TypeVar, 7 ) 8 9 from numpy import floating, complexfloating, generic 10 from numpy._typing import ( 11 NDArray, 12 DTypeLike, 13 _DTypeLike, 14 _ArrayLikeFloat_co, 15 _ArrayLikeComplex_co, 16 ) 17 18 _SCT = TypeVar("_SCT", bound=generic) 19 20 __all__: list[str] 21 22 @overload 23 def linspace( 24 start: _ArrayLikeFloat_co, 25 stop: _ArrayLikeFloat_co, 26 num: SupportsIndex = ..., 27 endpoint: bool = ..., 28 retstep: L[False] = ..., 29 dtype: None = ..., 30 axis: SupportsIndex = ..., 31 ) -> NDArray[floating[Any]]: ... 32 @overload 33 def linspace( 34 start: _ArrayLikeComplex_co, 35 stop: _ArrayLikeComplex_co, 36 num: SupportsIndex = ..., 37 endpoint: bool = ..., 38 retstep: L[False] = ..., 39 dtype: None = ..., 40 axis: SupportsIndex = ..., 41 ) -> NDArray[complexfloating[Any, Any]]: ... 42 @overload 43 def linspace( 44 start: _ArrayLikeComplex_co, 45 stop: _ArrayLikeComplex_co, 46 num: SupportsIndex = ..., 47 endpoint: bool = ..., 48 retstep: L[False] = ..., 49 dtype: _DTypeLike[_SCT] = ..., 50 axis: SupportsIndex = ..., 51 ) -> NDArray[_SCT]: ... 52 @overload 53 def linspace( 54 start: _ArrayLikeComplex_co, 55 stop: _ArrayLikeComplex_co, 56 num: SupportsIndex = ..., 57 endpoint: bool = ..., 58 retstep: L[False] = ..., 59 dtype: DTypeLike = ..., 60 axis: SupportsIndex = ..., 61 ) -> NDArray[Any]: ... 62 @overload 63 def linspace( 64 start: _ArrayLikeFloat_co, 65 stop: _ArrayLikeFloat_co, 66 num: SupportsIndex = ..., 67 endpoint: bool = ..., 68 retstep: L[True] = ..., 69 dtype: None = ..., 70 axis: SupportsIndex = ..., 71 ) -> tuple[NDArray[floating[Any]], floating[Any]]: ... 72 @overload 73 def linspace( 74 start: _ArrayLikeComplex_co, 75 stop: _ArrayLikeComplex_co, 76 num: SupportsIndex = ..., 77 endpoint: bool = ..., 78 retstep: L[True] = ..., 79 dtype: None = ..., 80 axis: SupportsIndex = ..., 81 ) -> tuple[NDArray[complexfloating[Any, Any]], complexfloating[Any, Any]]: ... 82 @overload 83 def linspace( 84 start: _ArrayLikeComplex_co, 85 stop: _ArrayLikeComplex_co, 86 num: SupportsIndex = ..., 87 endpoint: bool = ..., 88 retstep: L[True] = ..., 89 dtype: _DTypeLike[_SCT] = ..., 90 axis: SupportsIndex = ..., 91 ) -> tuple[NDArray[_SCT], _SCT]: ... 92 @overload 93 def linspace( 94 start: _ArrayLikeComplex_co, 95 stop: _ArrayLikeComplex_co, 96 num: SupportsIndex = ..., 97 endpoint: bool = ..., 98 retstep: L[True] = ..., 99 dtype: DTypeLike = ..., 100 axis: SupportsIndex = ..., 101 ) -> tuple[NDArray[Any], Any]: ... 102 103 @overload 104 def logspace( 105 start: _ArrayLikeFloat_co, 106 stop: _ArrayLikeFloat_co, 107 num: SupportsIndex = ..., 108 endpoint: bool = ..., 109 base: _ArrayLikeFloat_co = ..., 110 dtype: None = ..., 111 axis: SupportsIndex = ..., 112 ) -> NDArray[floating[Any]]: ... 113 @overload 114 def logspace( 115 start: _ArrayLikeComplex_co, 116 stop: _ArrayLikeComplex_co, 117 num: SupportsIndex = ..., 118 endpoint: bool = ..., 119 base: _ArrayLikeComplex_co = ..., 120 dtype: None = ..., 121 axis: SupportsIndex = ..., 122 ) -> NDArray[complexfloating[Any, Any]]: ... 123 @overload 124 def logspace( 125 start: _ArrayLikeComplex_co, 126 stop: _ArrayLikeComplex_co, 127 num: SupportsIndex = ..., 128 endpoint: bool = ..., 129 base: _ArrayLikeComplex_co = ..., 130 dtype: _DTypeLike[_SCT] = ..., 131 axis: SupportsIndex = ..., 132 ) -> NDArray[_SCT]: ... 133 @overload 134 def logspace( 135 start: _ArrayLikeComplex_co, 136 stop: _ArrayLikeComplex_co, 137 num: SupportsIndex = ..., 138 endpoint: bool = ..., 139 base: _ArrayLikeComplex_co = ..., 140 dtype: DTypeLike = ..., 141 axis: SupportsIndex = ..., 142 ) -> NDArray[Any]: ... 143 144 @overload 145 def geomspace( 146 start: _ArrayLikeFloat_co, 147 stop: _ArrayLikeFloat_co, 148 num: SupportsIndex = ..., 149 endpoint: bool = ..., 150 dtype: None = ..., 151 axis: SupportsIndex = ..., 152 ) -> NDArray[floating[Any]]: ... 153 @overload 154 def geomspace( 155 start: _ArrayLikeComplex_co, 156 stop: _ArrayLikeComplex_co, 157 num: SupportsIndex = ..., 158 endpoint: bool = ..., 159 dtype: None = ..., 160 axis: SupportsIndex = ..., 161 ) -> NDArray[complexfloating[Any, Any]]: ... 162 @overload 163 def geomspace( 164 start: _ArrayLikeComplex_co, 165 stop: _ArrayLikeComplex_co, 166 num: SupportsIndex = ..., 167 endpoint: bool = ..., 168 dtype: _DTypeLike[_SCT] = ..., 169 axis: SupportsIndex = ..., 170 ) -> NDArray[_SCT]: ... 171 @overload 172 def geomspace( 173 start: _ArrayLikeComplex_co, 174 stop: _ArrayLikeComplex_co, 175 num: SupportsIndex = ..., 176 endpoint: bool = ..., 177 dtype: DTypeLike = ..., 178 axis: SupportsIndex = ..., 179 ) -> NDArray[Any]: ... 180 181 # Re-exported to `np.lib.function_base` 182 def add_newdoc( 183 place: str, 184 obj: str, 185 doc: str | tuple[str, str] | list[tuple[str, str]], 186 warn_on_python: bool = ..., 187 ) -> None: ...