# Path: sksurv/util.py
# def check_array_survival(X, y):
#     """Check that all arrays have consistent first dimensions.
# 
#     Parameters
#     ----------
#     X : array-like
#         Data matrix containing feature vectors.
# 
#     y : structured array with two fields
#         A structured array containing the binary event indicator
#         as first field, and time of event or time of censoring as
#         second field.
# 
#     kwargs : dict
#         Additional arguments passed to :func:`sklearn.utils.check_array`.
# 
#     Returns
#     -------
#     event : array, shape=[n_samples,], dtype=bool
#         Binary event indicator.
# 
#     time : array, shape=[n_samples,], dtype=float
#         Time of event or censoring.
#     """
#     event, time = check_y_survival(y)
#     check_consistent_length(X, event, time)
#     return event, time


from collections import OrderedDict
from scipy import stats
from sklearn.utils.validation import check_array
from .util import check_array_survival
import numpy
import pandas
    group_indicator : array-like, shape = (n_samples,)
        Group membership of each sample.

    return_stats : bool, optional, default: False
        Whether to return a data frame with statistics for each group
        and the covariance matrix of the test statistic.

    Returns
    -------
    chisq : float
        Test statistic.
    pvalue : float
        Two-sided p-value with respect to the null hypothesis
        that the hazard rates across all groups are equal.
    stats : pandas.DataFrame
        Summary statistics for each group:  number of samples,
        observed number of events, expected number of events,
        and test statistic.
        Only provided if `return_stats` is True.
    covariance : array, shape=(n_groups, n_groups)
        Covariance matrix of the test statistic.
        Only provided if `return_stats` is True.

    References
    ----------
    .. [1] Fleming, T. R. and Harrington, D. P.
           A Class of Hypothesis Tests for One and Two Samples of Censored Survival Data.
           Communications In Statistics 10 (1981): 763-794.
    """


# Path: sksurv/util.py
# def check_array_survival(X, y):
#     """Check that all arrays have consistent first dimensions.
# 
#     Parameters
#     ----------
#     X : array-like
#         Data matrix containing feature vectors.
# 
#     y : structured array with two fields
#         A structured array containing the binary event indicator
#         as first field, and time of event or time of censoring as
#         second field.
# 
#     kwargs : dict
#         Additional arguments passed to :func:`sklearn.utils.check_array`.
# 
#     Returns
#     -------
#     event : array, shape=[n_samples,], dtype=bool
#         Binary event indicator.
# 
#     time : array, shape=[n_samples,], dtype=float
#         Time of event or censoring.
#     """
#     event, time = check_y_survival(y)
#     check_consistent_length(X, event, time)
#     return event, time


# Path: sksurv/compare.py
from collections import OrderedDict
from scipy import stats
from sklearn.utils.validation import check_array
from .util import check_array_survival
import numpy
import pandas

    group_indicator : array-like, shape = (n_samples,)
        Group membership of each sample.

    return_stats : bool, optional, default: False
        Whether to return a data frame with statistics for each group
        and the covariance matrix of the test statistic.

    Returns
    -------
    chisq : float
        Test statistic.
    pvalue : float
        Two-sided p-value with respect to the null hypothesis
        that the hazard rates across all groups are equal.
    stats : pandas.DataFrame
        Summary statistics for each group:  number of samples,
        observed number of events, expected number of events,
        and test statistic.
        Only provided if `return_stats` is True.
    covariance : array, shape=(n_groups, n_groups)
        Covariance matrix of the test statistic.
        Only provided if `return_stats` is True.

    References
    ----------
    .. [1] Fleming, T. R. and Harrington, D. P.
           A Class of Hypothesis Tests for One and Two Samples of Censored Survival Data.
           Communications In Statistics 10 (1981): 763-794.
    """


    event, time = check_array_survival(group_indicator, y)