Skip to content
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

Add broadcasting versions of element-wise binary operators #429

Open
joelberkeley opened this issue Nov 23, 2024 · 0 comments
Open

Add broadcasting versions of element-wise binary operators #429

joelberkeley opened this issue Nov 23, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@joelberkeley
Copy link
Owner

Element-wise operators binary (==), (+) etc. have native support for broadcasting, which may be faster than broadcasting operands first. We don't currently expose this, but could easily do so by adding versions of these operators, say (.+) which broadcast only one operand (two sounds fiddly and unlikely to be used - does numpy/jax even support that?) - here the left one.

Additional operators would prevent user error, and improve clarity of code and type inference. It would be trivial to implement, though tiresome to test.

@joelberkeley joelberkeley added the enhancement New feature or request label Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant