Not as nice as the method given by kguler. Nevertheless, as an alternative:
myarray = {{0., 0., 0., 0., 0}, {0., 0., 0., 0., 0},
{0., 0., 0., 25.5317, 29.1235}, {0., 0., 0., 0., 8.85471}, {0., 0.,
0., 0., 0}, {0., 0., 0., 0., 0}, {0., 0., 0., 0., 6.90018}, {0.,
0., 0., 0., 32.9436}, {0., 0., 0., 0., 29.1235}, {0., 0., 0.,
2.47854, 11.0472}, {0., 0., 16.1408, 41.2639, 45.7614}, {0., 0.,
0., 0., 0}, {0., 0., 0., 0., 0}, {0., 0., 0., 0., 0}}
(Using Flatten to transpose a ragged array):
Flatten[Select[#, FreeQ[#, 0. | 0] &] & /@ myarray, {2}]
=>
{{25.5317, 8.85471, 6.90018, 32.9436, 29.1235, 2.47854,
16.1408}, {29.1235, 11.0472, 41.2639}, {45.7614}}
Therefore,
Total /@ Flatten[Select[#, FreeQ[#, 0. | 0] &] & /@ myarray, {2}]
=>
{121.973, 81.4346, 45.7614}
Comparing with kguler's method
tbl = RandomChoice[{.5, .1, .05, .05, .05, .05, .05, .05, .05, .05} ->
Range[0, 9], {10, 10}];
Tr /@ (Transpose@PadRight[tbl /. (0) -> Sequence[], Automatic]) ==
Total /@ Flatten[Select[#, FreeQ[#, 0. | 0] &] & /@ tbl, {2}]
=>
True
Edit
Better, perhaps, is
Total /@ Flatten[DeleteCases[myarray, 0 | 0., 2], {2}]
However, the best variation on the Flatten approach, I recon, is given below (as a comment) by rm -rf:
Total[Flatten[# /. 0 | 0. -> Sequence[], {2}], {2}] &@myarray
=>
{121.973, 81.4346, 45.7614}