def reldiag(P_f, X_o, X_min, n_bins=10, min_count=10):
    """
    Compute the x- and y- coordinates of the points in the reliability diagram.

    Parameters
    ----------
    P_f: array-like
      Forecast probabilities for exceeding the intensity threshold specified
      in the reliability diagram object.
    X_o: array-like
      Observed values.
    X_min: float
      Precipitation intensity threshold for yes/no prediction.
    n_bins: int
        Number of bins to use in the reliability diagram.
    min_count: int
      Minimum number of samples required for each bin. A zero value is assigned
      if the number of samples in a bin is smaller than bin_count.

    Returns
    -------
    out: tuple
      Two-element tuple containing the x- and y-coordinates of the points in
      the reliability diagram.
    """

    P_f = P_f.copy()
    X_o = X_o.copy()
    rdiag = reldiag_init(X_min, n_bins, min_count)
    reldiag_accum(rdiag, P_f, X_o)
    return reldiag_compute(rdiag)
Compute the x- and y- coordinates of the points in the reliability diagram.

Parameters
----------
P_f: array-like
Forecast probabilities for exceeding the intensity threshold specified
in the reliability diagram object.
X_o: array-like
Observed values.
X_min: float
Precipitation intensity threshold for yes/no prediction.
n_bins: int
Number of bins to use in the reliability diagram.
min_count: int
Minimum number of samples required for each bin. A zero value is assigned
if the number of samples in a bin is smaller than bin_count.

Returns
-------
out: tuple
Two-element tuple containing the x- and y-coordinates of the points in
the reliability diagram.
pysteps/verification/probscores.py