17 Sep
2015
17 Sep
'15
3:35 p.m.
Hi Anant, lat.neighbors() returns nothing else than a list of HoppingKind instances. You can simply print it and have a look. In your case, the three HoppingKind objects that you create manually are identical to the ones returned by lat.neighbors(). Check it! The problem with your script is a different one, I believe: you are using the names “a” and “b” both for lattices and as numerical constants for your shape function. Unfortunately, in Python 2 it is possible to compare numbers and objects, even if this doesn’t make any sense. For sure you could have found this bug yourself? Cheers, Christoph