Commit ae1aed02 authored by Joseph Weston's avatar Joseph Weston
Browse files

fix value function in test to return a scalar

Previously the value function would return a single-element vector
(which is illegal); now it returns a scalar.
parent 963f1e28
......@@ -1275,7 +1275,7 @@ def test_argument_passing():
# Some common, some different args for value functions
def onsite2(site, a, b):
return site.pos + a + b
return site.pos[0] + a + b
def hopping2(site1, site2, a, c, b):
return a + b + c
......
......@@ -445,7 +445,7 @@ def test_arg_passing(A):
lat1 = kwant.lattice.chain(norbs=1)
syst = kwant.Builder()
syst[lat1(0)] = syst[lat1(1)] = lambda s0, a, b: s0.pos + a + b
syst[lat1(0)] = syst[lat1(1)] = lambda s0, a, b: s0.pos[0] + a + b
syst[lat1.neighbors()] = lambda s0, s1, a, b: a - b
fsyst = syst.finalized()
......
Markdown is supported
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