Single-sample z-score with a guard for zero variance.
When stdev is zero (single data point or constant series) the z-score is undefined; this helper returns 0 so callers can treat constant series as "no anomaly" without special-casing.
stdev
0
Single-sample z-score with a guard for zero variance.
When
stdevis zero (single data point or constant series) the z-score is undefined; this helper returns0so callers can treat constant series as "no anomaly" without special-casing.