Skip to content

Commit b192cff

Browse files
author
Lachlan Grose
committed
fix: bug with equality constraints
variable counting number of constraints was named incorrect
1 parent 2493c8f commit b192cff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

LoopStructural/interpolators/discrete_interpolator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ def build_matrix(self, square=True, damp=0.0, ie=False):
412412
# can help speed up solving, but might also introduce some errors
413413

414414
if len(self.equal_constraints) > 0:
415-
logger.info("Equality block is %i x %i" % (self.eq_const_c_, self.nx))
415+
logger.info("Equality block is %i x %i" % (self.eq_const_c, self.nx))
416416
# solving constrained least squares using
417417
# | ATA CT | |c| = b
418418
# | C 0 | |y| d
@@ -433,7 +433,7 @@ def build_matrix(self, square=True, damp=0.0, ie=False):
433433
cols.extend(c["col"].flatten()[~mask].tolist())
434434
C = coo_matrix(
435435

436-
(np.array(a), (np.array(rows), cols)), shape=(self.eq_const_c_, self.nx), dtype=float
436+
(np.array(a), (np.array(rows), cols)), shape=(self.eq_const_c, self.nx), dtype=float
437437
).tocsr()
438438

439439
d = np.array(b)

0 commit comments

Comments
 (0)