def eigenhproblem_standard(desc, dim, dtype,
                           overwrite, lower, turbo,
                           eigenvalues):
    if iscomplex(empty(1, dtype=dtype)):
        a = _complex_symrand(dim, dtype)
    else:
        a = symrand(dim).astype(dtype)

    if overwrite:
        a_c = a.copy()
    else:
        a_c = a
    w, z = eigh(a, overwrite_a=overwrite, lower=lower, eigvals=eigenvalues)
    assert_dtype_equal(z.dtype, dtype)
    w = w.astype(dtype)
    diag_ = diag(dot(z.T.conj(), dot(a_c, z))).real
    assert_array_almost_equal(diag_, w, DIGITS[dtype])
Test the correctness of the coerce function.
dataset/ETHPy150Open scipy/scipy/scipy/linalg/tests/test_decomp.py/eigenhproblem_standard--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/test/test_formmethod.py/ArgumentTestCase.test_file