Check that the predictionsa are either probabilities of prob-vectors.

def _check_prob_and_prob_vector(predictions):
    """
    Check that the predictionsa are either probabilities of prob-vectors.
    """
    from .._deps import numpy

    ptype = predictions.dtype
    import array
    if ptype not in [float, numpy.ndarray, array.array, int]:
        err_msg  = "Input `predictions` must be of numeric type (for binary "
        err_msg += "classification) or array (of probability vectors) for "
        err_msg += "multiclass classification."
        raise TypeError(err_msg)