def is_probability_array(array: np.ndarray) -> bool:
    """
    Check if a multidimensional array is an array of probabilities.

    :param array: A numpy array.
    :return: True if it is an array of probabilities.
    """
    if len(array.shape) == 1:
        return is_probability(array)
    sum_array = np.sum(array, axis=1)
    ones = np.ones_like(sum_array)
    is_sum_1 = np.allclose(sum_array, ones, rtol=1e-03)
    is_smaller_1 = np.amax(array) <= 1.0
    is_larger_0 = np.amin(array) >= 0.0

    return is_sum_1 and is_smaller_1 and is_larger_0

    Check if a multidimensional array is an array of probabilities.

    :param array: A numpy array.
    :return: True if it is an array of probabilities.
    
art/utils.py