ArgMax / Array Layer

Find the index of the maximum value in each fixed-length numeric array. Similar to NumPy's argmax() or R's which.max(). Returns a column of indices (0-based) pointing to the first occurrence of the maximum value in each array.

Example transformation (arrays of length 3):

arraysmax_index
[1, 5, 3]1
[10, 2, 10]0
[-1, -5, 0]2
[null, 1, 2]2

Common applications:

  • Finding peak positions
  • Locating highest scores
  • Identifying best performers
  • Time series peak detection
  • Maximum value location tracking

Note: Returns first occurrence for ties. Arrays must have the same fixed length across all rows. Handles numeric arrays only. Null values are ignored unless all values are null, then returns null.

Table
0
0
Table

Select

column

The fixed-length numeric array column to analyze. Common input patterns:

  • Scores: [85, 92, 78]
  • Measurements: [1.2, 3.4, 2.8]
  • Time series: [100, 150, 120]
  • Rankings: [5, 2, 8] All arrays must have the same length

Name for the new column. If not provided, the system generates a unique name. If AsColumn matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.