function _rankFact (mat, rows, cols) {
    const rref = _rref(mat, rows, cols)
    const C = mat.map((_, i) => _.filter((_, j) => j < rows && !_isZero(dot(rref[j], rref[j]))))
    const F = rref.filter((_, i) => !_isZero(dot(rref[i], rref[i])))
    return { C, F }
  }
Calculate the rank factorization of a matrix

@param {Array[]} mat                  A matrix (M)
@param {number} rows                  Number of rows
@param {number} cols                  Number of columns
@return {{C: Array, F: Array}}        rank factorization where M = C F
@private