Skip to content

Commit b6f2639

Browse files
committed
fix bug
1 parent 456fe2e commit b6f2639

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

metbit/ui_stocsy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def single_spectra(self, color_map=None, title='<b>Spectra of <sup>1</sup>H NMR
103103
elif n_sample >= 100:
104104
index_x = random.sample(df_spectra.index.to_list(), int(0.2 * n_sample))
105105
else:
106-
index_x = random.sample(df_spectra.index.to_list(), 30)
106+
index_x = random.sample(df_spectra.index.to_list(), min(30, n_sample))
107107

108108

109109
for i in index_x:

0 commit comments

Comments
 (0)