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

Adding scalar Addition and Substraction #685

Closed
wants to merge 3 commits into from
Closed

Adding scalar Addition and Substraction #685

wants to merge 3 commits into from

Conversation

migu0
Copy link

@migu0 migu0 commented Jul 27, 2014

Currently, the Matrix class supports scalar (real number) multiplication, division and exponentiation, e.g. 5 * Matrix[ [25, 93], [-1, 66] ]. This PR adds scalar addition and subtraction, which is supported by major scientific tools including Matlab, Octave and Python (numpy).

@migu0
Copy link
Author

migu0 commented Jul 27, 2014

Closing this to add some more code

@migu0 migu0 closed this Jul 27, 2014
@boris-s
Copy link

boris-s commented Jul 27, 2014

I think that adding this feature is a net loss. We are losing the error message, which is the expected vanila behavior. The feature should be published as a gem, and not forced onto everyone by adding it to the core.

matzbot pushed a commit that referenced this pull request Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants