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
1. Allow inputs to be arrays or dtypes or python scalars
2. Keep the pytorch-specific additions, e.g.
`result_type(int, float) -> float`, `result_type(scalar, scalar) -> dtype`
which are unspecified in the standard
3. Since pytorch only defines a binary `result_type` function, add a version
with multiple inputs.
The latter is a bit tricky because we want to
- keep allowing "unspecified" behaviors
- keep standard-allowed promotions compliant
- (preferably) make result_type independent on the argument order
The latter is important because of `int,float->float` promotions which
break associativity.
So what we do, we always promote all scalars after all array/dtype arguments.
0 commit comments