Changed sum(scalar) to scalar since sum() is only defined for array types
Merge pull request #109 from sjoelund/sumbug

Changed sum(scalar) to scalar since sum() is only defined for array type...