From 4ea18d367ce7a0d2a9303c64f6e8bbc4d978f477 Mon Sep 17 00:00:00 2001 From: Mark Bakker Date: Wed, 25 Mar 2026 17:47:17 +0100 Subject: [PATCH] fix numpy sum error Fixes Calling np.sum(generator) is deprecated.Use np.sum(np.fromiter(generator)) or the python sum builtin instead error. There may be more... --- timflow/steady/linesink.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timflow/steady/linesink.py b/timflow/steady/linesink.py index 9bfbf9a..d39f9c4 100644 --- a/timflow/steady/linesink.py +++ b/timflow/steady/linesink.py @@ -1019,7 +1019,7 @@ def equation(self): # include resistance by computing position of coefficients in matrix # and subtracting resistance terms iself = self.model.elementlist.index(self) - jcol = np.sum([e.nunknowns for e in self.model.elementlist[:iself]]).astype(int) + jcol = sum([e.nunknowns for e in self.model.elementlist[:iself]]) irow = 0 for ls in self.lslist: for icp in range(ls.ncp):