Open ev-br opened 4 days ago
TODO:
add(x1: Array, x2: Array)
; do we want to update (and if yes, how? ArrayOrScalar
or verbose explicit Array | bool | int | float | complex
)What's here now is likely too simple because this way python scalars can upcast arrays. So depending on what ends up in the standard this might need a tweak for "weak scalars" in the NEP 50 sense.
We need to make sure this properly disallows cross-kind combinations that aren't supported. That will presumably match the text here https://data-apis.org/array-api/latest/API_specification/type_promotion.html#mixing-arrays-with-python-scalars (if https://github.com/data-apis/array-api/issues/841 is implemented, real -> complex will also be allowed).
towards #96