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
{{ message }}
Repository navigation
Embed the dtype-like types in the scalar types #138
Similar to the NEP 50 embeddings that are powering the _numtype.CastsWith* type alias, it should be possible to create an dynamically specializing dtype-like alias. This unifies all 24 individual _numtype.ToDType* as a single generic type, without loss of specificity.
The idea is to define a type-check only method in each scalar-type, e.g in int8:
The LikeT is optional, but can be used to dynamically constrain OutT. It can also be provided manually, which is less verbose than having to re-define the entire "typevar with constraints".
It's not certain whether this will work in practice, as it requires pretty powerful constraint solving. I guess there's only one way to find out 🤷🏻
Activity
[-]Embed the dtype-likes in the dtype types[/-][+]Embed the possible dtype-likes in the scalar types[/+][-]Embed the possible dtype-likes in the scalar types[/-][+]embed the possible dtype-likes in the scalar types[/+][-]embed the possible dtype-likes in the scalar types[/-][+]Embed the possible dtype-likes in the scalar types[/+][-]Embed the possible dtype-likes in the scalar types[/-][+]Embed the dtype-like types in the scalar types[/+]