-
Notifications
You must be signed in to change notification settings - Fork 153
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
Allow CategoricalComponent to be n-dimensional #2214
Conversation
What is your preferred way for me to make additions to this? A PR into astrofrog:categorical-nd, or just pasting here? You need to update
Proposed addition to
|
This still doesn't do exactly what I would want to it do when you combine a 2D image of some matrix data with a 1D histogram of the categorical components. Specifically, making a subset on the 2D image does make a selection on the categorical array that properly updates the histogram but trying to make a subset on the 1D histogram to (for example) select all the points in the 2D image with a given categorical value does not work:
The interaction I describe above does work if the 2D component is, e.g. a 2D array of 1/0 instead of a full CategoricalComponent. |
The above error message is a bit leading, it is actually coming from the 2D image viewer I had open. The core problem actually seems to be that selecting a portion of a categorical 1D histogram where the underlying data is >1D leads to a 1D subset (at least with to_mask()). NB: this will only work with my fix to autotyped posted above.
I then create a 1D histogram and try to select the Females. This creates a subset without issuing an error, but the subset does not display. This is probably related to the fact that:
Whereas doing it at the command line does the correct thing:
|
I think I have fixed the masking problem with Nd categoricals. The branch/fork here: https://github.com/gluesolutions/glue/tree/categorical-nd Shows that solution (just remove a .ravel() statement) and includes a test that failed before and now works. |
3ef5014
to
efff663
Compare
@jfoster17 - thanks! I've rebased this and included your change here so let's see if everything passes now. |
The CI issues are real, somehow some of the changes here are causing a massive slowdown somewhere which is causing the CI to time out. Trying to determine where this is happening. |
I think I figured it out, let's see what the CI says |
Codecov Report
@@ Coverage Diff @@
## master #2214 +/- ##
==========================================
- Coverage 88.05% 88.01% -0.04%
==========================================
Files 247 247
Lines 23168 23167 -1
==========================================
- Hits 20401 20391 -10
- Misses 2767 2776 +9
Continue to review full report at Codecov.
|
2920829
to
f40ab7f
Compare
3328ba1
to
dbc27db
Compare
@jfoster17 - can you check if this works properly for you?
Fixes #2213