Skip to content

Commit

Permalink
fix: bug with fold interpolator
Browse files Browse the repository at this point in the history
  • Loading branch information
Lachlan Grose committed Mar 28, 2022
1 parent 2ef79f6 commit 8d94ca4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,5 +250,5 @@ def add_fold_constraints(
B = np.zeros(A.shape[0])
idc = np.array(idc[:ncons, :])
self.add_constraints_to_least_squares(
A, B, fold_regularisation[2], idc, name="fold regularisation 3"
A, B, idc, fold_regularisation[2], name="fold regularisation 3"
)
2 changes: 1 addition & 1 deletion LoopStructural/interpolators/_discrete_interpolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def add_constraints_to_least_squares(self, A, B, idc, w=1.0, name="undefined"):
# logger.debug('Adding constraints to interpolator: {} {} {}'.format(A.shape[0]))
# print(A.shape,B.shape,idc.shape)
if A.shape != idc.shape:
logger.error("Cannot add constraints: A and indexes have different shape")
logger.error(f"Cannot add constraints: A and indexes have different shape : {name}")
return

if len(A.shape) > 2:
Expand Down

0 comments on commit 8d94ca4

Please sign in to comment.