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
......@@ -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)
result = BlochModel({BlochCoeff(d, qsymm.sympify(par)): matrix},
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment