-
-
Notifications
You must be signed in to change notification settings - Fork 12.1k
Closed as not planned
Description
Currently users, mainly downstream libraries adding new dtypes, can add a string to np.typeDict. This string should (but does not have to) point to a dtype or numpy-scalar type (which is associated with a dtype).
This is the hook at allows packages such as quaternion to give the user the chance to write:
np.array(..., dtype="quaternion")
(note the string). Quaternion is the likely only user, but it is brittle that typeDict is a imple dictionary. It would be nice to either:
- Deprecate any modification of
typeDictat all - Limit additions to
typeDictto only includenumpy-scalartype objects (and maybedtypeinstances). Looking forward to new dtypes, this limit could be extended to only "old style" dtypes, so that it gets naturally weeded out (even if it forcesquaternionusers to change their patterns, as the likely only user).
Reactions are currently unavailable