Skip to content

Commit

Permalink
Fix callback usage in TraceFitter.refine
Browse files Browse the repository at this point in the history
  • Loading branch information
mstimberg committed Nov 16, 2020
1 parent c301da9 commit 88093d6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions brian2modelfitting/fitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1279,10 +1279,9 @@ def _callback_wrapper(params, iter, resid, *args, **kwds):
params = {p: Quantity(val, dim=self.model[p].dim)
for p, val in params.items()}
best_raw_error = tuple([Quantity(raw_error,
dim=metric.get_dimensions(output_dim))
for raw_error, metric, output_dim
dim=output_dim**2)
for raw_error, output_dim
in zip(errors[best_idx],
self.metric,
self.output_dim)])
else:
all_errors = array(combined_errors)
Expand Down

0 comments on commit 88093d6

Please sign in to comment.