summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Wilson <person142@users.noreply.github.com>2020-10-07 21:14:06 -0700
committerJosh Wilson <person142@users.noreply.github.com>2020-10-07 21:14:06 -0700
commit7e952c739ca9ac123f2e8568c5ded7693be058da (patch)
tree4e5ccc2c1c90196bd9b7a01a79cc81e6f14424a6
parent58fe5c6d371dd76e9163dff5467f9f3bc328ce4a (diff)
downloadnumpy-7e952c739ca9ac123f2e8568c5ded7693be058da.tar.gz
MAINT: add str0 as an alias of str_ on the typing level
-rw-r--r--numpy/__init__.pyi3
-rw-r--r--numpy/typing/tests/data/reveal/scalars.py1
2 files changed, 2 insertions, 2 deletions
diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi
index 1a3116d83..b8c881fd1 100644
--- a/numpy/__init__.pyi
+++ b/numpy/__init__.pyi
@@ -444,7 +444,6 @@ sort_complex: Any
source: Any
split: Any
stack: Any
-str0: Any
string_: Any
sys: Any
take_along_axis: Any
@@ -1526,7 +1525,7 @@ class str_(character, str):
self, __value: bytes, encoding: str = ..., errors: str = ...
) -> None: ...
-unicode_ = str_
+unicode_ = str0 = str_
# TODO(alan): Platform dependent types
# longcomplex, longdouble, longfloat
diff --git a/numpy/typing/tests/data/reveal/scalars.py b/numpy/typing/tests/data/reveal/scalars.py
index b0dd762df..0168ebed8 100644
--- a/numpy/typing/tests/data/reveal/scalars.py
+++ b/numpy/typing/tests/data/reveal/scalars.py
@@ -16,3 +16,4 @@ reveal_type(np.complex64().real) # E: numpy.float32
reveal_type(np.complex128().imag) # E: numpy.float64
reveal_type(np.unicode_('foo')) # E: numpy.str_
+reveal_type(np.str0('foo')) # E: numpy.str_