Skip to content

Commit

Permalink
Merge pull request #417 from oughtinc/fix-show-prediction
Browse files Browse the repository at this point in the history
Fixes #408
  • Loading branch information
brachbach committed Sep 29, 2020
2 parents 3990447 + c12a9a4 commit 5de9199
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ergo/platforms/metaculus/question/continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,11 @@ def show_prediction(
"For multiple predictions comparisons, only samples can be compared (plot_fitted must be False)"
)
for col in samples:
df[col] = self.scale.normalize_points(samples[col])
# use numpy array to ensure df doesn't become read-only
df[col] = onp.array(self.scale.normalize_points(samples[col]))
else:
df["samples"] = self.scale.normalize_points(samples)
# use numpy array to ensure df doesn't become read-only
df["samples"] = onp.array(self.scale.normalize_points(samples))

if plot_fitted:
prediction = self.get_submission_from_samples(samples)
Expand Down

0 comments on commit 5de9199

Please sign in to comment.