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

bh107: Can't multiply from the left #632

Open
jamesavery opened this issue Aug 2, 2019 · 1 comment
Open

bh107: Can't multiply from the left #632

jamesavery opened this issue Aug 2, 2019 · 1 comment

Comments

@jamesavery
Copy link
Contributor

jamesavery commented Aug 2, 2019

Binary operations with scalars are implemented only when the scalar is on the right.
Negation isn't working either.

Example:

import numpy as np
import bh107 as bh

xs = bh.array(np.linspace(0,10,100)) # Oh, linspace is also missing
g = bh.exp(-xs**2)       # Unsupported operand
g = bh.exp((xs**2)*-1) # Works, is pretty awkward
f = 0.5*g                      # Unsupported operand
f = g*0.5                      # Works
h = 1+f                        # Unsupported operand
h = f+1                        # Works, you get the picture

It's pretty grueling to change this everywhere when I want to test with bh107. It should be easy to fix, but I don't know where to do it.

@dionhaefner
Copy link
Collaborator

It's fixed in my PR. I can clean it up and we can merge that part.

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

No branches or pull requests

2 participants