-
Notifications
You must be signed in to change notification settings - Fork 304
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
Scalar multiplication #355
Scalar multiplication #355
Conversation
Thanks! It feels a bit inelegant to arbitrarily multiply the matrix on the right (rather than the left, or sqrt(scalar) on both), but it's probably best as is - users aren't supposed to use individual components of the factoredmatrix in general, and this avoids numerical errors of sqrt. I left some nits, but overall LGTM |
Looks like you have some formatting errors |
Agreed. Aside from the numerical error my main resoning was to reduce the amount of computation required.
Yes, I forgot to set up my development environment properly. I'm on it. |
Resolved the nits, and fixed the formatting. 👍 |
Thanks! |
Description
Implemented mul and rmul for Factoredmatrix to support scalar multiplication with *.
Supports floats, ints and single-element Tensors.
Approriate error messages and test are in place.
Fixes #348
Type of change
Please delete options that are not relevant.
Checklist: