-
Notifications
You must be signed in to change notification settings - Fork 3
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
Vector times array #173
Comments
This is meant to be a shorthand for I'm fully in support of explicit matrix-vector multiplication. scale = jnp.array([1, 0.9, 0.85])
jnp.diag(scale) @ vector IMO less so for implicit m-v multiplication when it looks like a scalar-vector multiplication. |
I hear you, but it seems like a waste to fill out a 2D matrix with zeros for a simple diagonal scaling operation! Vectors have a |
That seems like a good workaround! We get to keep the mathematical rigour in multiplication, but offer the same convenience through a specific method |
On a related note, sparse array support would be useful here! |
Currently, this does not work:
I think this should be supported when the shape of a multiplicative array is broadcastable with the vector shape, and it should do the same as
q * scale
.(thinking about this as I work on a PR for a new
AnisotropicScalingOperator
)The text was updated successfully, but these errors were encountered: