See the documentation of treams.lattice.lsumsw1d().
treams.lattice.lsumsw1d()
treams.lattice.cython_lattice.lsumcw1d
treams.lattice.cython_lattice.ncube