Array node
Array Filter
Keeps only the elements that satisfy the condition against Value (element > Value, ≤ Value, == Value…). Tolerance widens the match for fine tuning. Result holds the survivors, Indices their original positions.
Inputs
| Port | Type | Default |
|---|---|---|
| ArrayThe list to filter. Only numeric elements are tested; anything else is dropped. | any | — |
| ConditionHow each element is tested against Value — greater, greater or equal, less, less or equal, equal or not equal. Values outside the list fall back to greater than. | int | 0 |
| ValueThe number every element is compared against: element > Value, element ≤ Value, element == Value… Any value works. | float | 0 |
| ToleranceFine-tune deadband that always widens the match: == and ≠ compare |element − Value| against it, > and ≥ also accept Value − Tolerance, < and ≤ accept Value + Tolerance. Not clamped (sign ignored); equality keeps a floor of 0.0001 so exact hits still register. | float | 0 |
Outputs
| Port | Type |
|---|---|
| Result | any |
| Indices | any |
| Count | int |
How It Works
Array Filter tests each element against the Threshold using the selected Condition:
- 0 — Greater than: Keep elements where value > threshold.
- 1 — Less than: Keep elements where value < threshold.
- 2 — Equal: Keep elements where value ≈ threshold (within float precision).
- 3 — Not equal: Keep elements where value ≠ threshold.
- 4 — Greater or equal: Keep elements where value ≥ threshold.
- 5 — Less or equal: Keep elements where value ≤ threshold.
The Indices output contains the original positions of the kept elements, useful for correlating with parallel arrays.
Use Cases
- Noise gating: Filter out values below a noise threshold to clean up sensor data.
- Peak extraction: Keep only values above a certain level to identify peaks in FFT or signal data.
- Data cleanup: Remove zero values or outliers from a dataset before analysis.
- Conditional selection: Use Indices output to select corresponding elements from a parallel labels array.
Tips
- Non-numeric elements are always filtered out (removed).
- The Indices output is useful for keeping parallel arrays in sync — feed it into Array Get on a second array to extract matching elements.
- For removing duplicate values, use Array Unique instead.
Open Array Filter in the interactive catalog →
Array Filter is one of 381 nodes in Grafit Pro.
Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.