sum(by) {
                switch (by) {
                    case 'row':
                        return util.sumByRow(this);
                    case 'column':
                        return util.sumByColumn(this);
                    default:
                        return util.sumAll(this);
                }
            }
Returns the sum by the argument given, if no argument given,
it returns the sum of all elements of the matrix.
@param {string} by - sum by 'row' or 'column'.
@return {Matrix|number}