feat: добавлена возможность ввода чисел до 5 знаков (#87)

Closes #82
This commit is contained in:
2023-11-25 14:21:05 +03:00
committed by GitHub
parent 2f5988a2eb
commit dc7c4875d7
12 changed files with 72 additions and 10 deletions

View File

@@ -20,6 +20,7 @@
import numpy as np
from PySide2.QtWidgets import QFileDialog, QMessageBox
from statapp.constants import NUMBERS_PRECISION
from statapp.utils import buildMessageBox
@@ -57,7 +58,7 @@ class FileSLCModel:
None, "Сохранить файл", "", "Text Files (*.txt);;CSV Files (*.csv)"
)
if self.fileName:
np.savetxt(self.fileName, data, delimiter=",", fmt='%10.5f')
np.savetxt(self.fileName, data, delimiter=",", fmt=f"%.{NUMBERS_PRECISION}f")
return True
return False