function _matrixIsVector(matrix) {
    if (matrix.size().length !== 1) {
      throw new Error('One dimensional matrix expected');
    }
  }
Validate whether a matrix is one dimensional
Throws an error when this is not the case
@param {Matrix} matrix
@private