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

Bug in notebook wavelet_model.ipynb - unsupported operand type(s) for @ #271

Closed
rsav opened this issue Jul 6, 2022 · 1 comment
Closed
Labels

Comments

@rsav
Copy link

rsav commented Jul 6, 2022

When running the notebook wavelet_model.ipynb, I get this error in the very last cell when computing the scalar product:

TypeError: unsupported operand type(s) for @: 'TabulatedSpectrum' and 'TabulatedSpectrum'

The offending line is:

C[j] = spectrum @ spectrum_ / np.sqrt(spectrum @ spectrum) / np.sqrt(spectrum_ @ spectrum_)

Workaround: use spectrum.get_model() and spectrum_.get_model() instead of spectrum and spectrum_

@pmelchior pmelchior added the docs label Jul 6, 2022
@pmelchior
Copy link
Owner

Thanks for reporting. I confirm the bug, this is a leftover from a conversion of spectrum as a direct Parameter to it being a Model that has a parameter. The former one behaves like an array, so @ works, while the latter one doesn't.

The solution is to update the docs.

pmelchior added a commit that referenced this issue May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants