-
Notifications
You must be signed in to change notification settings - Fork 207
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
assign_subclass and signal with one value? #2766
Comments
I would have thought that |
If the array is a zero-dimensional array, then I'd say it should probably go to basesignal or a "Signal0D". |
HyperSpy does not support array scalars (i.e. 0-dimensional arrays) because scalar arrays, unlike ndarrays, are immutable. That's why HyperSpy converts any array scalar in a 1D array of shape This is indeed a corner case. Considering that, as pointed out by @jlaehne, most |
Done in #2773. |
In #2703, one of the tests is failing due to how
s._assign_subclass
works.Essentially, should a signal with one value be a
BaseSignal
, or aSignal1D
? Currently,_assign_subclass
turns a signal with one value into aSignal1D
, but the test expects it to be aBaseSignal
.To replicate this:
The question is then which signal type should a signal with one value be?
BaseSignal
orSignal1D
?The text was updated successfully, but these errors were encountered: