Skip to content

Commit

Permalink
Update calls to clp_area_penalties where deprecated func is called
Browse files Browse the repository at this point in the history
The deprecated equal_area_penalties would be called in lieu of the new clp_area_penalties function

The pyglotaran-examples have in their model still equal_area_penalties which is correctly swapped with clp_area_penalties but them model.equal_area_penalties  was still called in some places instead of model.clp_area_penalties
  • Loading branch information
jsnel committed Aug 23, 2021
1 parent 5e9eb22 commit 95a8377
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions glotaran/model/clp_penalties.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def applies(interval):


def has_spectral_penalties(model: Model) -> bool:
return len(model.equal_area_penalties) != 0
return len(model.clp_area_penalties) != 0


def apply_spectral_penalties(
Expand All @@ -74,7 +74,7 @@ def apply_spectral_penalties(
) -> np.ndarray:

penalties = []
for penalty in model.equal_area_penalties:
for penalty in model.clp_area_penalties:

penalty = penalty.fill(model, parameters)
source_area = _get_area(
Expand Down

0 comments on commit 95a8377

Please sign in to comment.