summaryrefslogtreecommitdiff
path: root/numpy/core/arrayprint.pyi
diff options
context:
space:
mode:
authorAntony Lee <anntzer.lee@gmail.com>2021-09-29 20:09:32 +0200
committerGitHub <noreply@github.com>2021-09-29 13:09:32 -0500
commita6f7d14e60e3d56fe1c0073730a06e23cf696c5a (patch)
tree4f836f1bb7532f7b9265f9d07a868a61c4e79bbe /numpy/core/arrayprint.pyi
parente7f5d62f793379a62d1c351eedaa3a59f6f542d5 (diff)
downloadnumpy-a6f7d14e60e3d56fe1c0073730a06e23cf696c5a.tar.gz
ENH: Add spaces after punctuation in dtype repr/str. (#19686)
Before: ``` In [1]: np.dtype({"names": ["a"], "formats": [int], "offsets": [2]}) Out[1]: dtype({'names':['a'], 'formats':['<i8'], 'offsets':[2], 'itemsize':10}) ``` After: ``` In [1]: np.dtype({"names": ["a"], "formats": [int], "offsets": [2]}) Out[1]: dtype({'names': ['a'], 'formats': ['<i8'], 'offsets': [2], 'itemsize': 10}) ``` * Allow switching back to old dtype printing format. * Add changelog.
Diffstat (limited to 'numpy/core/arrayprint.pyi')
-rw-r--r--numpy/core/arrayprint.pyi8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/arrayprint.pyi b/numpy/core/arrayprint.pyi
index 3731e6578..0d338206f 100644
--- a/numpy/core/arrayprint.pyi
+++ b/numpy/core/arrayprint.pyi
@@ -53,7 +53,7 @@ class _FormatOptions(TypedDict):
formatter: Optional[_FormatDict]
sign: Literal["-", "+", " "]
floatmode: _FloatMode
- legacy: Literal[False, "1.13"]
+ legacy: Literal[False, "1.13", "1.21"]
def set_printoptions(
precision: Optional[SupportsIndex] = ...,
@@ -67,7 +67,7 @@ def set_printoptions(
sign: Optional[Literal["-", "+", " "]] = ...,
floatmode: Optional[_FloatMode] = ...,
*,
- legacy: Optional[Literal[False, "1.13"]] = ...
+ legacy: Optional[Literal[False, "1.13", "1.21"]] = ...
) -> None: ...
def get_printoptions() -> _FormatOptions: ...
def array2string(
@@ -87,7 +87,7 @@ def array2string(
sign: Optional[Literal["-", "+", " "]] = ...,
floatmode: Optional[_FloatMode] = ...,
suffix: str = ...,
- legacy: Optional[Literal[False, "1.13"]] = ...,
+ legacy: Optional[Literal[False, "1.13", "1.21"]] = ...,
) -> str: ...
def format_float_scientific(
x: _FloatLike_co,
@@ -137,5 +137,5 @@ def printoptions(
sign: Optional[Literal["-", "+", " "]] = ...,
floatmode: Optional[_FloatMode] = ...,
*,
- legacy: Optional[Literal[False, "1.13"]] = ...
+ legacy: Optional[Literal[False, "1.13", "1.21"]] = ...
) -> _GeneratorContextManager[_FormatOptions]: ...