grain.transforms.Filter#
- class grain.transforms.Filter#
Abstract base class for filter transformations for individual elements.
The pipeline will drop any element for which the filter function returns False.
Implementations should be threadsafe since they are often executed in parallel.
- __init__()#
Methods
__init__
()filter
(element)Filters a single element; returns True if the element should be kept.