Skip to content

Commit 3df7b08

Browse files
make nintp large than 0 (#277)
1 parent 024a5fe commit 3df7b08

File tree

1 file changed

+1
-1
lines changed
  • dptb/postprocess/bandstructure

1 file changed

+1
-1
lines changed

dptb/postprocess/bandstructure/band.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def band_plot(
325325
# nkplot = (len(np.unique(self.eigenstatus["high_sym_kpoints"]))-1) * 5
326326
# nintp = len(self.eigenstatus["xlist"]) // nkplot
327327
# if nintp == 0:
328-
nintp = self.eigenstatus["xlist"].shape[0] // 25
328+
nintp = max(1 , self.eigenstatus["xlist"].shape[0] // 25)
329329
band_ref = ax.plot(self.eigenstatus["xlist"][::nintp], ref_band[::nintp] - E_fermi, 'o', ms=2, color=band_color, alpha=0.95, label="Ref")
330330
band_pre = ax.plot(self.eigenstatus["xlist"], self.eigenstatus["eigenvalues"] - E_fermi, color="tab:red", lw=0.5, alpha=0.95, label="DeePTB")
331331

0 commit comments

Comments
 (0)