From ec23c51919e442ccd14cc969020b5fd3be927dda Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Mon, 7 Nov 2022 18:14:03 +0100 Subject: [PATCH] DOC: Try to clarify which dtype instaces are still allowed We still allow the "singleton" instances (which mainly applies to our own dtypes), mainly because it wouldn't really do much good to disallow them, even if they are not specific (since we don't enforce the byte-order, but we never return non-native byte order for example). --- doc/release/upcoming_changes/22540.expired.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/release/upcoming_changes/22540.expired.rst b/doc/release/upcoming_changes/22540.expired.rst index ec445e3764bb..3c5cb11c3a6e 100644 --- a/doc/release/upcoming_changes/22540.expired.rst +++ b/doc/release/upcoming_changes/22540.expired.rst @@ -1,3 +1,5 @@ -* Passing dtype instances other than the default ones to - ``dtype=`` or ``signature=` in ufuncs will now raise a - ``TypeError``. (Initially deprecated in NumPy 1.21.) +* Passing dtype instances other than the canonical (mainly native byte-order) + ones to ``dtype=`` or ``signature=` in ufuncs will now raise a ``TypeError``. + We recommend passing the strings ``"int8"`` or scalar types ``np.int8`` + since the byte-order, datetime/timedelta unit, etc. are never enforced. + (Initially deprecated in NumPy 1.21.)