scarlet
scarlet copied to clipboard
Bug in notebook wavelet_model.ipynb - unsupported operand type(s) for @
trafficstars
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_
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.