pypi scores 2.4.0

9 hours ago

Release Notes (What's New)

Version 2.4.0 (January 14, 2026)

For a list of all changes in this release, see the full changelog. Below are the changes we think users may wish to be aware of.

Features

  • Added an optional installation variant "fast" which introduces Numba as an optional dependency to support optimised implementations for some metrics. scores.probability.crps_cdf will now automatically switch to an optimised implementation if Numba is installed in the environment. The "fast" variant can be installed with pip install scores[fast] if wanted. See PR #931.

Bug Fixes

  • Fixed a bug in scores.continuous.tw_squared_error that caused the code to fail if the first object in the tuple for interval_where_one was an xr.DataArray and the second was a float, e.g. np.inf. This method has now been corrected to allow a float or an int for the interval arguments. See PR #948.

Documentation

Internal Changes

  • Sped up (improved the computational efficiency of) the continuous ranked probability score (CRPS) for ensembles, by sorting the ensemble members to compute the CRPS spread term. See PR #928.

Contributors to this Release

Belinda Trotta* (@btrotta-bom), Taylor Mandelbaum* (@aaTman), Tennessee Leeuwenburg (@tennlee), Nicholas Loveday (@nicholasloveday), Stephanie Chong (@Steph-Chong), Robert J. Taggart (@rob-taggart) and Nikeeth Ramanathan (@nikeethr).

* indicates that this release contains their first contribution to scores.

We also acknowledge the developers of xskillscore and properscoring as we have adapted code from their repositories under a suitable compatible license. This acknowledgment has also been added to NOTICE.md as is best practice. The xarray wrapper function scores.probability.crps_numba.crps_cdf_exact_fast is based on the code for crps_ensemble from xskillscore (https://github.com/xarray-contrib/xskillscore/blob/main/xskillscore/core/probabilistic.py), released under the Apache-2.0 License with copyright attributed to xskillscore developers (as at 11 Dec 2025). The vectorisation of crps_at_point follows the example of _crps_ensemble_gufunc from properscoring (https://github.com/properscoring/properscoring/blob/master/properscoring/_gufuncs.py), released under the Apache-2.0 License with copyright attributed to The Climate Corporation (2015).

Don't miss a new scores release

NewReleases is sending notifications on new releases.