def _scipy_sparse_eye(n):
    if not sparse:
        raise ImportError
    return sparse.eye(n, n, dtype='complex')
scipy.sparse version of complex eye.
dataset/ETHPy150Open sympy/sympy/sympy/physics/quantum/matrixutils.py/_scipy_sparse_eye