def assert_allclose_cc(actual, desired, **kw):
    try:
        assert_allclose(actual, desired, **kw)
    except:
        assert_allclose(actual, conj(desired), **kw)
Almost equal or complex conjugates almost equal
dataset/ETHPy150Open scipy/scipy/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py/assert_allclose_cc