From 426254c6d39b489ece8fa14df62dc551222f90c5 Mon Sep 17 00:00:00 2001 From: Thomas Wemyss Date: Thu, 19 Nov 2020 11:38:34 +0000 Subject: [PATCH] Fix UCL-RITS/rse-classwork-2020#102 and UCL-RITS/rse-classwork-2020#129 --- sagital_brain.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sagital_brain.py b/sagital_brain.py index 9c5ed19..48deb64 100644 --- a/sagital_brain.py +++ b/sagital_brain.py @@ -2,7 +2,6 @@ import numpy as np - def run_averages(file_input='brain_sample.csv', file_output='brain_average.csv'): """ Calculates the average through the coronal planes @@ -16,7 +15,7 @@ def run_averages(file_input='brain_sample.csv', file_output='brain_average.csv') # Calculates the averages through the sagital/horizontal planes # and makes it as a row vector - averages = planes.mean(axis=0)[np.newaxis, :] + averages = planes.mean(axis=1)[np.newaxis, :] # write it out on my file np.savetxt(file_output, averages, fmt='%.1f', delimiter=',')