@@ -10,13 +10,10 @@ from typing import (
1010 SupportsIndex ,
1111 TypeAlias ,
1212 TypedDict ,
13- overload ,
1413 type_check_only ,
1514)
16- from typing_extensions import deprecated
1715
1816import numpy as np
19- from numpy ._globals import _NoValueType
2017from numpy ._typing import NDArray , _CharLike_co , _FloatLike_co
2118
2219__all__ = [
@@ -94,15 +91,13 @@ def set_printoptions(
9491def get_printoptions () -> _FormatOptions : ...
9592
9693# public numpy export
97- @overload # no style
9894def array2string (
9995 a : NDArray [Any ],
10096 max_line_width : int | None = None ,
10197 precision : SupportsIndex | None = None ,
10298 suppress_small : bool | None = None ,
10399 separator : str = " " ,
104100 prefix : str = "" ,
105- style : _NoValueType = ...,
106101 formatter : _FormatDict | None = None ,
107102 threshold : int | None = None ,
108103 edgeitems : int | None = None ,
@@ -112,80 +107,6 @@ def array2string(
112107 * ,
113108 legacy : _Legacy | None = None ,
114109) -> str : ...
115- @overload # style=<given> (positional), legacy="1.13"
116- def array2string (
117- a : NDArray [Any ],
118- max_line_width : int | None ,
119- precision : SupportsIndex | None ,
120- suppress_small : bool | None ,
121- separator : str ,
122- prefix : str ,
123- style : _ReprFunc ,
124- formatter : _FormatDict | None = None ,
125- threshold : int | None = None ,
126- edgeitems : int | None = None ,
127- sign : _Sign | None = None ,
128- floatmode : _FloatMode | None = None ,
129- suffix : str = "" ,
130- * ,
131- legacy : Literal ["1.13" ],
132- ) -> str : ...
133- @overload # style=<given> (keyword), legacy="1.13"
134- def array2string (
135- a : NDArray [Any ],
136- max_line_width : int | None = None ,
137- precision : SupportsIndex | None = None ,
138- suppress_small : bool | None = None ,
139- separator : str = " " ,
140- prefix : str = "" ,
141- * ,
142- style : _ReprFunc ,
143- formatter : _FormatDict | None = None ,
144- threshold : int | None = None ,
145- edgeitems : int | None = None ,
146- sign : _Sign | None = None ,
147- floatmode : _FloatMode | None = None ,
148- suffix : str = "" ,
149- legacy : Literal ["1.13" ],
150- ) -> str : ...
151- @overload # style=<given> (positional), legacy!="1.13"
152- @deprecated ("'style' argument is deprecated and no longer functional except in 1.13 'legacy' mode" )
153- def array2string (
154- a : NDArray [Any ],
155- max_line_width : int | None ,
156- precision : SupportsIndex | None ,
157- suppress_small : bool | None ,
158- separator : str ,
159- prefix : str ,
160- style : _ReprFunc ,
161- formatter : _FormatDict | None = None ,
162- threshold : int | None = None ,
163- edgeitems : int | None = None ,
164- sign : _Sign | None = None ,
165- floatmode : _FloatMode | None = None ,
166- suffix : str = "" ,
167- * ,
168- legacy : _LegacyNoStyle | None = None ,
169- ) -> str : ...
170- @overload # style=<given> (keyword), legacy="1.13"
171- @deprecated ("'style' argument is deprecated and no longer functional except in 1.13 'legacy' mode" )
172- def array2string (
173- a : NDArray [Any ],
174- max_line_width : int | None = None ,
175- precision : SupportsIndex | None = None ,
176- suppress_small : bool | None = None ,
177- separator : str = " " ,
178- prefix : str = "" ,
179- * ,
180- style : _ReprFunc ,
181- formatter : _FormatDict | None = None ,
182- threshold : int | None = None ,
183- edgeitems : int | None = None ,
184- sign : _Sign | None = None ,
185- floatmode : _FloatMode | None = None ,
186- suffix : str = "" ,
187- legacy : _LegacyNoStyle | None = None ,
188- ) -> str : ...
189110
190111def format_float_scientific (
191112 x : _FloatLike_co ,
0 commit comments