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
{{ message }}
Repository navigation
cf.Field.subspace - allow multiple subspacing conditions for the same axis #881
To get around this you could either apply the conditions separately:
>>>f.subspace(Y=cf.lt(-10)).subspace(Y=cf.gt(20))
or roll the conditions into one:
>>>f.subspace(Y=cf.lt(-10) &cf.gt(20))
There is, I think, is no need for this restriction though, and removing it will make subspacing Fields with a discrete axis (such as DSGs, UGRID, etc) a more intuitive process. For such fields, we typically have have multiple 1-d coordinates (with different identities) for the same axis, and we'd like to be able to do this:
Implementing this will be "straight forward", as we essentially just have to introduce a loop over multiple conditions, AND-ing the selected indices from the application of each condition to its corresponding coordinates.
This change will be wholly backwards compatible - no existing code will change its behaviour, but new API patterns will become possible.
Activity