-
Notifications
You must be signed in to change notification settings - Fork 50
set operations for DataArrays #129
Comments
To fit with how Possible options -- friendlier error message, or a more convenient syntax than |
Probably |
That's nicer, for sure, and defining the three methods for each function would allow for tuning. On the other hand, it sounds like the quantity of methods that need to be reimplemented has slowed down development of data/nullable/categorical/etc. container types, so maybe slicker iterators would give more mileage: setdiff(v, dv, skipna = true) # =>
setdiff(v, skipna(dv)) # or
setdiff(v, SkipNA(dv))
setdiff(dv1, dv2, skipna = true) # =>
setdiff(skipna(dv1), skipna(dv2)) # or
setdiff(SkipNA(dv1), SkipNA(dv2)) |
One thing I'd like to do now that Nullable is in Base is to define iterators like In general, we could do a much better job of making clear when functions can accept arbitrary iterators and when they need a fully materialized input to work. |
It would be nice to have versions of the standard set operations (union, setdiff, intersect, etc) defined for DataArrays so that dealing with NAs was easier. Right now the functions try to output regular arrays of the same type as the DataArray, and run into problems when they can't convert NA to said type:
The text was updated successfully, but these errors were encountered: