Skip to content

Commit

Permalink
DOC: Try to clarify which dtype instaces are still allowed
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
seberg committed Nov 7, 2022
1 parent fdb858d commit ec23c51
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions 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.)

0 comments on commit ec23c51

Please sign in to comment.