From 4e4c5e693ee6bdb19bff33eb0f91354bbb251d84 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nils=20Forss=C3=A9n?= Date: Tue, 8 Feb 2022 11:10:26 +0100 Subject: [PATCH] update --- laboration3/uppgift_2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/laboration3/uppgift_2.py b/laboration3/uppgift_2.py index ae7af52..fafc5f6 100644 --- a/laboration3/uppgift_2.py +++ b/laboration3/uppgift_2.py @@ -68,8 +68,8 @@ def matrix_square(matrix): cols = get_all_columns(matrix) for i in range(len(matrix)): - for row in matrix: - tot[i].append(scalar_product(row, cols[i])) + for col in cols: + tot[i].append(scalar_product(col, matrix[i])) return tot -- 2.30.2