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
In #3842@jonmmease made a nice proposal for adding an argument to control a selection_mode to the Dataset.select method. The problem is that .select for connected entities like Curve/Area/Spread etc. will introduce gaps in the data which will simply be connected if there are no nans in the data. For linked_selections we therefore implemented a Interface.mask method. To generalize this we should expose the option to mask from .select. I'll also reproduce the original proposal here:
To handle selections on continuous elements (Curve, Area, etc.) it is important to maintain NaN value(s) where data were rejected by the selection criteria, otherwise it's not possible to break the element properly. Here's an example of the problem that arises with an Area element with the default selection behavior.
area*area.select(y=(0.5, None))
The proposal here is to add a new kwarg to .select to control how rejected data is handle. Naming is still up for discussion, but something like selection_mode, with three options
'filter': Remove all rows that don't satisy the criteria (current and default behavior)
'mask': Replace values in all rows that don't satisfy criteria with NaNs. This would behave somewhat like the pandas where method.
'nan_join': Replace contiguous blocks of rows that don't satisfy criteria with a single row containing NaNs. This is what the selection framework would use.
Hello, we cannot find the Interface.mask method that you are talking about. Maybe you refer to Interface.select_mask method? Thanks in advance. @philippjfr
In #3842 @jonmmease made a nice proposal for adding an argument to control a selection_mode to the Dataset.select method. The problem is that .select for connected entities like Curve/Area/Spread etc. will introduce gaps in the data which will simply be connected if there are no nans in the data. For linked_selections we therefore implemented a
Interface.mask
method. To generalize this we should expose the option to mask from .select. I'll also reproduce the original proposal here:The proposal here is to add a new kwarg to
.select
to control how rejected data is handle. Naming is still up for discussion, but something likeselection_mode
, with three options'filter'
: Remove all rows that don't satisy the criteria (current and default behavior)'mask'
: Replace values in all rows that don't satisfy criteria withNaN
s. This would behave somewhat like the pandaswhere
method.'nan_join'
: Replace contiguous blocks of rows that don't satisfy criteria with a single row containingNaN
s. This is what the selection framework would use.The text was updated successfully, but these errors were encountered: