summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2020-09-16 12:53:26 +0100
committerSebastian Berg <sebastian@sipsolutions.net>2020-09-18 11:24:15 -0500
commita368e00114df2e5e3b74f050d4cf7aa04e58a228 (patch)
treed277c30e8d792b974d74e562b5097140414b7d93
parent385575faba79b5c857112199206119bf9ac2277f (diff)
downloadnumpy-a368e00114df2e5e3b74f050d4cf7aa04e58a228.tar.gz
DOC: Fix incorrect `.. deprecated::` syntax that led to this note being invisible.
-rw-r--r--doc/source/reference/arrays.dtypes.rst17
1 files changed, 9 insertions, 8 deletions
diff --git a/doc/source/reference/arrays.dtypes.rst b/doc/source/reference/arrays.dtypes.rst
index 575984707..301e26c55 100644
--- a/doc/source/reference/arrays.dtypes.rst
+++ b/doc/source/reference/arrays.dtypes.rst
@@ -152,14 +152,6 @@ Array-scalar types
>>> dt = np.dtype(np.complex128) # 128-bit complex floating-point number
Generic types
- .. deprecated NumPy 1.19::
-
- The use of generic types is deprecated. This is because it can be
- unexpected in a context such as ``arr.astype(dtype=np.floating)``.
- ``arr.astype(dtype=np.floating)`` which casts an array of ``float32``
- to an array of ``float64``, even though ``float32`` is a subdtype of
- ``np.floating``.
-
The generic hierarchical type objects convert to corresponding
type objects according to the associations:
@@ -172,6 +164,15 @@ Generic types
:class:`generic`, :class:`flexible` :class:`void`
===================================================== ===============
+ .. deprecated:: 1.19
+
+ This conversion of generic scalar types is deprecated.
+ This is because it can be unexpected in a context such as
+ ``arr.astype(dtype=np.floating)``, which casts an array of ``float32``
+ to an array of ``float64``, even though ``float32`` is a subdtype of
+ ``np.floating``.
+
+
Built-in Python types
Several python types are equivalent to a corresponding
array scalar when used to generate a :class:`dtype` object: