function _p (p) {
    // identity matrix
    const identity = math.identity(p.length)
    // array
    const data = []
    // loop rows
    for (let i = 0, l = p.length; i < l; i++) {
      // swap row
      data[p[i]] = identity._data[i]
    }
    return data
  }
Creates a Matrix out of a row permutation vector