Fixed the barray.sum() and tests pass