summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/typing/__init__.py6
-rw-r--r--numpy/typing/_add_docstring.py6
-rw-r--r--numpy/typing/mypy_plugin.py6
3 files changed, 15 insertions, 3 deletions
diff --git a/numpy/typing/__init__.py b/numpy/typing/__init__.py
index 3f5bb204f..05efe61df 100644
--- a/numpy/typing/__init__.py
+++ b/numpy/typing/__init__.py
@@ -3,6 +3,8 @@
Typing (:mod:`numpy.typing`)
============================
+.. versionadded:: 1.20
+
.. warning::
Some of the types in this module rely on features only present in
@@ -22,6 +24,8 @@ the two below:
Mypy plugin
-----------
+.. versionadded:: 1.21
+
.. automodule:: numpy.typing.mypy_plugin
Differences from the runtime NumPy API
@@ -180,6 +184,8 @@ class NBitBase:
Each subsequent subclass is herein used for representing a lower level
of precision, *e.g.* ``64Bit > 32Bit > 16Bit``.
+ .. versionadded:: 1.20
+
Examples
--------
Below is a typical usage example: `NBitBase` is herein used for annotating a
diff --git a/numpy/typing/_add_docstring.py b/numpy/typing/_add_docstring.py
index 56ef41cfd..846b67042 100644
--- a/numpy/typing/_add_docstring.py
+++ b/numpy/typing/_add_docstring.py
@@ -67,6 +67,8 @@ add_newdoc('ArrayLike', 'typing.Union[...]',
* (Nested) sequences.
* Objects implementing the `~class.__array__` protocol.
+ .. versionadded:: 1.20
+
See Also
--------
:term:`array_like`:
@@ -94,6 +96,8 @@ add_newdoc('DTypeLike', 'typing.Union[...]',
* Character codes or the names of :class:`type` objects.
* Objects with the ``.dtype`` attribute.
+ .. versionadded:: 1.20
+
See Also
--------
:ref:`Specifying and constructing data types <arrays.dtypes.constructing>`
@@ -119,6 +123,8 @@ add_newdoc('NDArray', repr(NDArray),
Can be used during runtime for typing arrays with a given dtype
and unspecified shape.
+ .. versionadded:: 1.21
+
Examples
--------
.. code-block:: python
diff --git a/numpy/typing/mypy_plugin.py b/numpy/typing/mypy_plugin.py
index d698673fc..02bd18887 100644
--- a/numpy/typing/mypy_plugin.py
+++ b/numpy/typing/mypy_plugin.py
@@ -12,9 +12,9 @@ Its functionality can be split into three distinct parts:
likes of `~numpy.float128` and `~numpy.complex256`. Without the plugin *all*
extended-precision types will, as far as mypy is concerned, be available
to all platforms.
-* Assigning the (platform-dependent) precision of `~numpy.ctypeslib.c_intp`.
- Without the plugin aforementioned type will default to `ctypes.c_int64`.
-
+* .. versionadded:: 1.22
+ Assigning the (platform-dependent) precision of `~numpy.ctypeslib.c_intp`.
+ Without the plugin aforementioned type will default to `ctypes.c_int64`.
Examples
--------