Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Should broadcast_arrays return a tuple instead of a list? #934

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cbourjau opened this issue Apr 26, 2025 · 2 comments
Open

Should broadcast_arrays return a tuple instead of a list? #934

cbourjau opened this issue Apr 26, 2025 · 2 comments

Comments

@cbourjau
Copy link
Contributor

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.

@leofang
Copy link
Contributor

leofang commented Apr 26, 2025

Would you mind filing a bug to CuPy? Maybe this is part of the NumPy 2.0 change and we'll follow.

@kgryte
Copy link
Contributor

kgryte commented Apr 27, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants