summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2020-09-18 12:29:09 -0500
committerGitHub <noreply@github.com>2020-09-18 12:29:09 -0500
commit3b294521a7394c2195e6b2980555c6b27258bac9 (patch)
treed277c30e8d792b974d74e562b5097140414b7d93
parent385575faba79b5c857112199206119bf9ac2277f (diff)
parenta368e00114df2e5e3b74f050d4cf7aa04e58a228 (diff)
downloadnumpy-3b294521a7394c2195e6b2980555c6b27258bac9.tar.gz
Merge pull request #17329 from eric-wieser/fix-bad-rst
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: