You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Even though the constructor of sp.Spectrum expects for the parameter wavelengths an args of type np.ndarray, the resulting attribute wavelengths of the created spectrum instance is of type torch.Tensor. The problem is that if you want to copy the wavelengths of one spectrum to a new spectrum instance, you would have to convert the wavelengths attribute tensor to np.ndarray first (otherwise it causes an error).
Solution
Decide on the same type for both constructor parameter and instance attribute, then update the implementation accordingly. If other parameters/attributes also have this issue, update these too.
The text was updated successfully, but these errors were encountered:
Describe the bug
Even though the constructor of sp.Spectrum expects for the parameter wavelengths an args of type np.ndarray, the resulting attribute wavelengths of the created spectrum instance is of type torch.Tensor. The problem is that if you want to copy the wavelengths of one spectrum to a new spectrum instance, you would have to convert the wavelengths attribute tensor to np.ndarray first (otherwise it causes an error).
Solution
Decide on the same type for both constructor parameter and instance attribute, then update the implementation accordingly. If other parameters/attributes also have this issue, update these too.
The text was updated successfully, but these errors were encountered: