You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 typeDict at all
Limit additions to typeDict to only include numpy-scalar type objects (and maybe dtype instances). 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 forces quaternion users to change their patterns, as the likely only user).
The text was updated successfully, but these errors were encountered:
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:(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:typeDict
at alltypeDict
to only includenumpy-scalar
type objects (and maybedtype
instances). 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 forcesquaternion
users to change their patterns, as the likely only user).The text was updated successfully, but these errors were encountered: