Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues/224/add classes to init #225

Merged
merged 2 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/qp/metrics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from .metrics import *
from .goodness_of_fit import *
from .base_metric_classes import *
from .concrete_metric_classes import *
from .point_estimate_metric_classes import *

# added for testing purposes

Expand Down
2 changes: 1 addition & 1 deletion src/qp/metrics/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def _prepare_for_brier(p, truth, limits, dx=0.01):
# Values of truth that are outside the defined limits will not appear truth_array.
# Consider expanding the limits or using numpy.clip to restrict truth values to the limits.
if np.any(np.less(truth, limits[0])) or np.any(np.greater(truth, limits[1])):
raise ValueError("Input truth values exceed the defined limits")
raise ValueError(f"Input truth values exceed the defined limits ({min(truth)}, {max(truth)}) ({limits[0]} {limits[1]})")

# Make a grid object that defines grid values and histogram bin edges using limits and dx
grid = _calculate_grid_parameters(limits, dx)
Expand Down
Loading