Array node
Array Average
Calculate the arithmetic mean of a numeric array. Non-numeric elements are skipped. Returns the mean value and the count of elements processed.
Inputs
| Port | Type |
|---|---|
| ArrayThe list to average. Non-numeric elements are skipped, and an empty list gives 0. | any |
Outputs
| Port | Type |
|---|---|
| Value | float |
| Count | int |
How It Works
Array Average computes the arithmetic mean: the sum of all numeric elements divided by the number of numeric elements. Non-numeric values in the array are silently skipped.
If the array is empty or contains no numeric values, Value outputs 0.
Use Cases
- Signal smoothing: Average a rolling buffer of sensor readings to reduce noise.
- Baseline calculation: Compute the mean of a calibration dataset for offset correction.
- Performance metrics: Average frame times, response times, or throughput measurements.
- Multi-channel mean: Average across EEG channels to compute a global brain activity metric.
Tips
- For the full statistical picture (mean, median, standard deviation, etc.), use Array Stats instead.
- Pair with Array Set in Time Window mode to compute a moving average over the last N seconds.
- For weighted averages, use Array Map (multiply by weights) then Array Sum, and divide by the sum of weights.
Open Array Average in the interactive catalog →
Array Average 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.