Skip to content
Snippets Groups Projects
Commit 9e400599 authored by Joseph Weston's avatar Joseph Weston
Browse files

provide "shape" and "format" to empty Qsymm models as required by 1.2

Not providing these is now deprecated.
Close #325.
parent 7663844b
No related branches found
No related tags found
No related merge requests found
Pipeline #23006 passed
......@@ -68,8 +68,8 @@ def builder_to_model(syst, momenta=None, real_space=True,
is used in finalized kwant systems.
"""
def term_to_model(d, par, matrix):
if np.allclose(matrix, 0):
result = BlochModel({})
if allclose(matrix, 0):
result = BlochModel({}, shape=matrix.shape, format=np.ndarray)
else:
result = BlochModel({BlochCoeff(d, qsymm.sympify(par)): matrix},
momenta=momenta)
......
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