@property
    def is_upper_hessenberg(self):
        return all(self[i, j].is_zero
            for i in range(2, self.rows)
            for j in range(i - 1))
Checks if the matrix is the upper-Hessenberg form.
dataset/ETHPy150Open sympy/sympy/sympy/matrices/matrices.py/MatrixBase.is_upper_hessenberg