From 18e0b59d2ec0716b5660148e5c1d07a78a08c650 Mon Sep 17 00:00:00 2001 From: surtur Date: Thu, 17 Nov 2022 21:58:15 +0100 Subject: [PATCH] chore: polish print statements --- p1/p1/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/p1/p1/main.py b/p1/p1/main.py index 3068262..f774de9 100644 --- a/p1/p1/main.py +++ b/p1/p1/main.py @@ -26,7 +26,7 @@ def main(argv): # d = f.load_d("./dat.csv") d = f.load_d(inputfile) # d = d.astype('float64') - print(d.head()) + print(d.head(), '\n') # data plots du = d['u'] @@ -37,9 +37,13 @@ def main(argv): # mean and variance mean_u = f.mean(d['u']) mean_y = f.mean(d['y']) + print('mean u:', mean_u) + print('mean y:', mean_y) variance_u = f.variance(d['u']) variance_y = f.variance(d['y']) + print('variance u:', variance_u) + print('variance y:', variance_y) hist_u = f.histogram(d['u'], fname='u_hist') hist_y = f.histogram(d['y'], fname='y_hist', colour='green') @@ -52,6 +56,7 @@ def main(argv): std_dev_y = f.std_dev(d['y']) # correlation coefficient correl_c = f.correl_coeff(cov, std_dev_u, std_dev_y) + print("correlation coefficient:", correl_c) print("covariance matrix (built-in):\n", d.cov()) # print the covariance matrix.