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

change the tb_to_khamvector such that it works with all dimensions

parent 56140857
No related branches found
No related tags found
1 merge request!4Interface refactoring
......@@ -25,7 +25,7 @@ def tb_to_khamvector(tb, nk, ndim):
ks = np.linspace(-np.pi, np.pi, nk, endpoint=False)
ks = np.concatenate((ks[nk // 2 :], ks[: nk // 2]), axis=0) # shift for ifft
kgrid = np.meshgrid(ks, ks, indexing="ij")
kgrid = np.meshgrid(*([ks] * ndim), indexing="ij")
num_keys = len(list(tb.keys()))
tb_array = np.array(list(tb.values()))
......
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