utils.bounded_sum: make it work for 2D matrices, even though it's never called that way
utils.bounded_sum: make it work for 2D matrices, even though it's never called that way

brohrer/becca,matt2000/becca