Skip to content

Commit

Permalink
'Refactored by Sourcery'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourcery AI committed Oct 16, 2021
1 parent a14fcdd commit b15f921
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions glotaran/analysis/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ def _calculate_penalty(

penalties = [group.full_penalty for group in optimization_groups]

penalty = np.concatenate(penalties) if len(penalties) != 1 else penalties[0]
return penalty
return np.concatenate(penalties) if len(penalties) != 1 else penalties[0]


def _create_result(
Expand Down
3 changes: 1 addition & 2 deletions glotaran/test/test_spectral_penalties.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ def test_equal_area_penalties(debug=False):
# for both we perturb kinetic parameters a bit to give the optimizer some work
pspec_wp = dict(deepcopy(pspec.base), **pspec.equal_area)
pspec_wp["kinetic"] = [v * 1.01 for v in pspec_wp["kinetic"]]
pspec_wp.update({"i": [[1, {"vary": False}], 1]})

pspec_wp["i"] = [[1, {"vary": False}], 1]
pspec_np = dict(deepcopy(pspec.base))

param_wp = ParameterGroup.from_dict(pspec_wp)
Expand Down

0 comments on commit b15f921

Please sign in to comment.