Partition ADAFs Predicate

class node_filter_list.PartitionADAFsPredicate[source]

Partition nodes with predicate takes a configurable predicate function (a function that returns True or False) from the configuration and uses it to decide how to partition the output.

The function is applied for each input element in the list when it returns True, then the element is written to the first output, otherwise it is written to the second output.

Examples (with table as the element type):

Remove tables with zero length columns:

lambda table: table.number_of_columns() > 0

Remove empty tables:

lambda table: not table.is_empty()

Partition a list of ADAFs using a predicate.

: [adaf]

Input data ADAFs

: [adaf]

Output data ADAFs where predicate returns True

: [adaf]

Output data ADAFs where predicate returns True

Predicate partition function

Partition function