summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2020-06-17 21:21:58 +0300
committerGitHub <noreply@github.com>2020-06-17 21:21:58 +0300
commit02883d85b5d3f68c12cb1df75f96e0fed741d4a4 (patch)
tree17d344fa051f564d360ef0726018fba99fde64cf /doc
parent95a6774007d1d7898c7da40d9989e9f1dd1b0f40 (diff)
parentd985e8ca2fca154d3770c842a2da1ba6dc3aaf1c (diff)
downloadnumpy-02883d85b5d3f68c12cb1df75f96e0fed741d4a4.tar.gz
Merge pull request #16558 from person142/typing-runtime
ENH: make typing module available at runtime
Diffstat (limited to 'doc')
-rw-r--r--doc/release/upcoming_changes/16558.new_feature.rst9
-rw-r--r--doc/source/reference/index.rst1
-rw-r--r--doc/source/reference/typing.rst2
3 files changed, 12 insertions, 0 deletions
diff --git a/doc/release/upcoming_changes/16558.new_feature.rst b/doc/release/upcoming_changes/16558.new_feature.rst
new file mode 100644
index 000000000..9bd508e83
--- /dev/null
+++ b/doc/release/upcoming_changes/16558.new_feature.rst
@@ -0,0 +1,9 @@
+``numpy.typing`` is accessible at runtime
+-----------------------------------------
+The types in ``numpy.typing`` can now be imported at runtime. Code
+like the following will now work:
+
+.. code:: python
+
+ from numpy.typing import ArrayLike
+ x: ArrayLike = [1, 2, 3, 4]
diff --git a/doc/source/reference/index.rst b/doc/source/reference/index.rst
index 2e1dcafa2..661a08ffa 100644
--- a/doc/source/reference/index.rst
+++ b/doc/source/reference/index.rst
@@ -22,6 +22,7 @@ For learning how to use NumPy, see the :ref:`complete documentation <numpy_docs_
constants
ufuncs
routines
+ typing
global_state
distutils
distutils_guide
diff --git a/doc/source/reference/typing.rst b/doc/source/reference/typing.rst
new file mode 100644
index 000000000..c948bc4be
--- /dev/null
+++ b/doc/source/reference/typing.rst
@@ -0,0 +1,2 @@
+.. _typing:
+.. automodule:: numpy.typing