Sums anarray of n dimensions over one of its dimensions.
dim
array1 = FINDGEN(2) array2 = FINDGEN(2,2)
PRINT, array1
0.00000 1.00000
PRINT, array2
0.00000 1.00000
2.00000 3.00000
PRINT, SUM(array1, 0)
1.00000
PRINT, SUM(array2, 0)
1.00000 5.00000
PRINT, SUM(array2, 1)
2.00000 4.00000