-
Notifications
You must be signed in to change notification settings - Fork 9
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
1110 join single point error #1111
base: master
Are you sure you want to change the base?
Conversation
Code seems good, only move |
Just a moment, a new issue may appear with this fix. What if the variable of shape |
I am realizing that I have thus far only considered when the variable of shape (1,) is the transformed axis along which you are joining. In this case, it is fine if the values are different. If the shape (1,) variable is not your transformed axis along which you join, I want to say there's still no problem, but I have not tested and do not have a strong intuition. |
Yes, I should have stated the |
It looks good. |
I'm a little confused as to how you got a scalar in the first place... I don't think we officially have supported such data objects, as their behavior is just different enough in all of these situations... (Certainly you can have a size 1 data object with shape |
note that scalar and shape |
I would tend to want a test to show the failing behavior (and prevent it from recurring in the future... if we missed an edge case once, we could do so again) |
The variable was originally shaped |
This misconception is the heart of the issue. We do np.ndim(var.points), and np.ndim(var.points)==0, so scalar and shape(1,) get treated the same in the code. Maybe we should change the code to do np.ndim(var) instead? @ksunden |
Changes
Allowing join to succeed with data of shape (1,). Previously failed due to specific handling of data where np.ndim(data.variable) = 0. See issue #1110 for more info and the example failure case. Unsure of the motivation behind this specific handling of (1,) shape data, but this fix makes the join method work as expected.
Checklist