Closed alex-s-gardner closed 1 day ago
Ehhh... We do?
But you need to wrap another selector or Int, not the value directly. Maybe direct could mean not At
Edit: I think the reason I didn't do that is Not Contains might make more sense as a default for intervals, so just spelling it out is better overall
Of course there is :-)
So I was trying Not("april")
instead of Not(At("april")
I then searched Not
in the documentation but searching such a common word doesn't return anything useful. I then looked at the dcoumition for Selectors:
and couldn't find anything there either.
using help with DimensionalData doesn't show the functionality for wrapping a Selector i.e. Not(Selector("april"))
help?> Not()
InvertedIndex(idx)
Not(idx)
Construct an inverted index, selecting all indices not in the passed idx.
Upon indexing into an array, the InvertedIndex behaves like a 1-dimensional collection of the indices of the array that are not in idx.
Bounds are checked to ensure that all indices in idx are within the bounds of the array — even though they are skipped. The InvertedIndex
behaves like a 1-dimensional collection of its inverted indices. If idx spans multiple dimensions (like a multidimensional logical mask
or CartesianIndex), then the inverted index will similarly span multiple dimensions.
When indexing into a NamedTuple, the InvertedIndex can wrap either a Symbol, a vector of Symbols, or a tuple of Symbols and selects the
fields of the NamedTuple that are not in idx.
Looking again this morning I found Not() under Lookups: https://rafaqz.github.io/DimensionalData.jl/dev/selectors#Lookups
If you saw other places we could document Not
, feel free to add them.
Isnt this closed?
Found myself wanting for a Not() selector today and was wondering if others would find it useful