From 1a90133ff849e1f38a1a0c5cf47c36d4ad1850bd Mon Sep 17 00:00:00 2001 From: Thomas Albers Raviola Date: Tue, 14 May 2024 18:01:15 +0200 Subject: Add dtype to matrix * linsolver/solvers.py (gaussian_elimination): Specify dtype of xx --- solvers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solvers.py b/solvers.py index da38e2b..933bc2f 100644 --- a/solvers.py +++ b/solvers.py @@ -52,7 +52,7 @@ def gaussian_eliminate( return None # Back substitution - xx = np.zeros((nn, 1)) + xx = np.zeros((nn, 1), dtype=np.float_) for i in range(nn - 1, -1, -1): xx[i] = (ee[i, nn] - np.dot(ee[i, i:nn], xx[i:nn])) / ee[i, i] -- cgit v1.2.3