fix: ограничена генерация чисел до сотых (#48)

В качестве решения выбрано округление до сотых

Closes #32
This commit is contained in:
Maxim Slipenko 2023-10-02 21:23:08 +03:00 committed by GitHub
parent 0a32e4baee
commit 0779941dc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,7 @@ class MainWindow(QMainWindow):
gw = GenerateWindow() gw = GenerateWindow()
if gw.exec(): if gw.exec():
y = np.random.normal(gw.mat, gw.deviation, size=(gw.count, 1)) y = np.random.normal(gw.mat, gw.deviation, size=(gw.count, 1))
self.model.updateAllData(y) self.model.updateAllData(y.round(2))
self.isDataChanged = True self.isDataChanged = True
@Slot() @Slot()
@ -107,7 +107,7 @@ class MainWindow(QMainWindow):
data = self.model.getData() data = self.model.getData()
x_arr = x_arr.reshape(len(x_arr), 1) x_arr = x_arr.reshape(len(x_arr), 1).round(2)
# dd = dd.reshape(len(dd), 1) # dd = dd.reshape(len(dd), 1)
data = np.concatenate((data, x_arr), axis=1) data = np.concatenate((data, x_arr), axis=1)
# data = np.concatenate((data, dd), axis=1) # data = np.concatenate((data, dd), axis=1)