Nodes ▸ Functions ▸ Conditionals ▸ Filter
Filter
Keeps the elements of an array that satisfy a condition, such as greater than threshold, optionally inverted. The optional operand input (shown once connected or pinned) can supply the comparison value instead.
Inputs
| Port | Accepts | Required | Description |
|---|---|---|---|
x | primitive(array) | required | The array to filter |
operand | primitive(array) primitive(number) dataset | optional, quiet: shown when relevant, connected or pinned | Comparison operand; overrides the operand parameter while connected |
Parameter ports
Added from the Parameters pane (⊕). While connected, each drives its parameter.
| Port | Accepts | Mode | Description |
|---|---|---|---|
threshold | primitive(number) | opt-in drives threshold | Drives the Threshold parameter while connected |
rtol | primitive(number) | opt-in drives rtol | Drives the Rtol parameter while connected |
atol | primitive(number) | opt-in drives atol | Drives the Atol parameter while connected |
Outputs
primitive(array)
Parameters
The Parameters pane shows only the parameters relevant to the current settings.
| Parameter | Kind | Default | Choices / range | Unit | Notes |
|---|---|---|---|---|---|
Conditioncondition | choice | none | greater | greater_equal | less | less_equal | equal | not_equal | isclose | isnan | isfinite | isinf | ||
Thresholdthreshold | float | none | ⇄ port | ||
Rtolrtol | float | none | ⇄ port | ||
Atolatol | float | none | ⇄ port | ||
Invertinvert | bool | false |
Used by
No stock template or group uses this node.