See the documentation of treams.lattice.dsumsw1d().
treams.lattice.dsumsw1d()
treams.lattice.cython_lattice.dsumcw1d
treams.lattice.cython_lattice.lsumcw1d