You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "D:\Dropbox\Dev\Physics\lattpy\issue.py", line 16, in <module>
main()
File "D:\Dropbox\Dev\Physics\lattpy\issue.py", line 12, in main
latt = lp.finite_hypercubic((2, 2), periodic=True)
File "D:\Dropbox\Dev\Physics\lattpy\lattpy\__init__.py", line 451, in finite_hypercubic
latt.build(s, primitive=primitive, periodic=periodic)
File "D:\Dropbox\Dev\Physics\lattpy\lattpy\lattice.py", line 431, in build
self.set_periodic(periodic, primitive)
File "D:\Dropbox\Dev\Physics\lattpy\lattpy\lattice.py", line 620, in set_periodic
self.data.set_periodic(pidx, pdists, pnvecs, paxs)
File "D:\Dropbox\Dev\Physics\lattpy\lattpy\data.py", line 467, in set_periodic
self.neighbors[i, i0:i1] = pidx
ValueError: could not broadcast input array from shape (2,) into shape (1,)
Expected behavior
Set periodic boundary conditions if possible. In the example above this is not necessary since the sites are already neighbors.
Environment
lattpy version: 0.7.4
OS and Python version: All
The text was updated successfully, but these errors were encountered:
Describe the bug
Setting periodic boundary conditions for small lattices in higher dimensions fails due a broadcasting error and raises a
ValueError
.To Reproduce
Steps to reproduce the behavior:
The resulting error is:
Expected behavior
Set periodic boundary conditions if possible. In the example above this is not necessary since the sites are already neighbors.
Environment
The text was updated successfully, but these errors were encountered: