Skip to content
Snippets Groups Projects
Commit 02472c6f authored by Johanna Zijderveld's avatar Johanna Zijderveld
Browse files

undo incorrect formatting

parent aae64528
No related branches found
No related tags found
1 merge request!4Interface refactoring
Pipeline #174663 passed
# %%
import numpy as np
from codes.tb.tb import compareDicts
from codes.kwant_helper import utils
from codes.kwant_helper import utils
import itertools as it
from codes.tb.transforms import kfunc2tb, tb2kfunc, tb2kham, tb2khamvector
import pytest
......@@ -24,10 +24,21 @@ def test_fourier():
tb_new = kfunc2tb(kfunc, nK, ndim=ndim)
compareDicts(h_0, tb_new)
@pytest.mark.repeat(repeatNumber):
def test_tbkham_transform():
vectors = ((0, 0), (1, 0), (-1, 0), (0, 1), (0, -1), (1, -1), (-1, 1), (1, 1), (-1, -1))
@pytest.mark.repeat(repeatNumber)
def test_tbkham_transform():
vectors = (
(0, 0),
(1, 0),
(-1, 0),
(0, 1),
(0, -1),
(1, -1),
(-1, 1),
(1, 1),
(-1, -1),
)
ndof = 10
h_0 = utils.generate_guess(vectors, ndof)
assert np.allclose(tb2kham(h_0, nK=nK, ndim=2), tb2khamvector(h_0, nK=nK, ndim=2))
\ No newline at end of file
assert np.allclose(tb2kham(h_0, nK=nK, ndim=2), tb2khamvector(h_0, nK=nK, ndim=2))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment