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 radd, rsub and rmul #31

Merged
merged 1 commit into from
Jul 31, 2020
Merged

Add radd, rsub and rmul #31

merged 1 commit into from
Jul 31, 2020

Conversation

ben-z
Copy link
Contributor

@ben-z ben-z commented Jul 27, 2020

This is a supplement PR to #29.

This PR adds the r versions of __add__, __sub__ and __mul__ so that pre-(add/sub/mul) by a scalar works.

@wadetb wadetb merged commit 0d23d22 into wadetb:master Jul 31, 2020
@wadetb
Copy link
Owner

wadetb commented Jul 31, 2020

Thanks for the PR- in the future please try to add tests, to confirm (at least limited) numpy compatibility.

@ben-z
Copy link
Contributor Author

ben-z commented Jul 31, 2020

Sounds good! This was just something really quick that I needed for my project. Also I found that the add/mul/div implementations don't work well in the current master. Something about _data not being the right size (forgot the error message and I don't have too much time to reproduce this). I switched it to your implementations from #25 and they worked out a lot better.

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

Successfully merging this pull request may close these issues.

2 participants