Skip to content

Add radd, rsub and rmul#31

Merged
wadetb merged 1 commit intowadetb:masterfrom
ben-z:master
Jul 31, 2020
Merged

Add radd, rsub and rmul#31
wadetb merged 1 commit intowadetb:masterfrom
ben-z:master

Conversation

@ben-z
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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