array-api
array-api copied to clipboard
Should broadcast_arrays return a tuple instead of a list?
Currently, broadcast_arrays is mandated to return a list. A tuple appears more appropriate on face value, though. NumPy and Dask are, in fact, returning tuples from this function. However, cupy follows the letter of the standard and returns a list. ndonnx is currently returning a list, too, but we would be willing to migrate over to returning a tuple.
Would you mind filing a bug to CuPy? Maybe this is part of the NumPy 2.0 change and we'll follow.
Looks like NumPy's behavior does stem from NumPy 2.0: https://numpy.org/doc/1.26/reference/generated/numpy.broadcast_arrays.html. Previously, it returned a list.