NORMALIZE

All functions > ARRAY > NORMALIZE

Normalizes a numeric array by dividing each element by the sum of all elements.

Signatures

Returns: Normalized array where elements sum to 1

NORMALIZE(array: ARRAY<DOUBLE>) → ARRAY<DOUBLE>
sql
ParameterTypeRequiredDescription
arrayARRAY<DOUBLE>YesArray of numeric values to normalize

Notes

  • Divides each element by sum of all elements
  • Result sums to 1.0 (probability distribution)
  • Useful for creating probability vectors
  • Returns array of doubles
Last update at: 2026/03/03 16:47:38
Last updated: 2026-03-03 16:48:19