@@ -13,10 +13,8 @@ from typing import (
1313 overload ,
1414 type_check_only ,
1515)
16- from typing_extensions import deprecated
1716
1817import numpy as np
19- from numpy ._globals import _NoValueType
2018from numpy ._typing import NDArray , _CharLike_co , _FloatLike_co
2119
2220__all__ = [
@@ -94,15 +92,14 @@ def set_printoptions(
9492def get_printoptions () -> _FormatOptions : ...
9593
9694# public numpy export
97- @overload # no style
95+ @overload
9896def array2string (
9997 a : NDArray [Any ],
10098 max_line_width : int | None = None ,
10199 precision : SupportsIndex | None = None ,
102100 suppress_small : bool | None = None ,
103101 separator : str = " " ,
104102 prefix : str = "" ,
105- style : _NoValueType = ...,
106103 formatter : _FormatDict | None = None ,
107104 threshold : int | None = None ,
108105 edgeitems : int | None = None ,
@@ -112,15 +109,14 @@ def array2string(
112109 * ,
113110 legacy : _Legacy | None = None ,
114111) -> str : ...
115- @overload # style=<given> (positional), legacy="1.13"
112+ @overload
116113def array2string (
117114 a : NDArray [Any ],
118115 max_line_width : int | None ,
119116 precision : SupportsIndex | None ,
120117 suppress_small : bool | None ,
121118 separator : str ,
122119 prefix : str ,
123- style : _ReprFunc ,
124120 formatter : _FormatDict | None = None ,
125121 threshold : int | None = None ,
126122 edgeitems : int | None = None ,
@@ -130,62 +126,6 @@ def array2string(
130126 * ,
131127 legacy : Literal ["1.13" ],
132128) -> 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 : ...
189129
190130def format_float_scientific (
191131 x : _FloatLike_co ,
0 commit comments