Floating Point Error in Lattice.py
Created by: chrisrothUT
I tried generating a periodic Kagome lattice using lattice.py:
kagome = nk.graph.Lattice(basis_vectors=[[2.,0.],[1.,np.sqrt(3)]],extent=[2,2],atoms_coord=[[0.,0.],[1./2.,np.sqrt(3)/2.],[1.,0.]])
Only half of the edges appeared:
kagome.n_edges() 12
The bug is related to floating points, some distances are registered as 0.99999... and some are registered as 1.0