I'm currently thinking on ways to improved numpy numerical stack typing
(dtype mostly), when it comes to mixing the types. For example if you add
an int32 to a float64, you'll get a float64.
There is a quick and dirty way to deal with all this: use overloading, but
I won't see it scaling at all (think pytorch / tensorflow that are using
numpy dtypes and defining a ton of new functions). Also if we want to
abstract over these dtype, for example with something like
def my_add(x : dtype0, y: dtype1) -> ???:
In this case, overloading won't help. So I was thining of maybe adding a
type operator, something like
def my_add(x: dtype0, y:dtype1) -> typing.numpy.join(dtype0, dtype1):
I'm not sure that the right approach too, but since I'm new to python
typing, I wondered if such "type" operators already existed in the wild ?