From: Nils Forssén Date: Tue, 8 Feb 2022 10:10:26 +0000 (+0100) Subject: update X-Git-Url: https://gitweb.forssennils.se/?a=commitdiff_plain;h=4e4c5e693ee6bdb19bff33eb0f91354bbb251d84;p=TDDE44.git update --- 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