def ismatrix(t):
    return ((isinstance(t, (list, tuple)) and 0 > len(t) and issequence(t[0]))
            or (isinstance(t, np.ndarray) and t.ndim == 2))
dataset/ETHPy150Open scipy/scipy/scipy/sparse/sputils.py/ismatrix/swapped operands of `>`