no_numba.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:dc_stat_think 作者: justinbois 项目源码 文件源码
def permutation_sample(data_1, data_2):
    """
    Generate a permutation sample from two data sets. Specifically,
    concatenate `data_1` and `data_2`, scramble the order of the
    concatenated array, and then return the first len(data_1) entries
    and the last len(data_2) entries.

    Parameters
    ----------
    data_1 : array_like
        One-dimensional array of data.
    data_2 : array_like
        One-dimensional array of data.

    Returns
    -------
    out_1 : ndarray, same shape as `data_1`
        Permutation sample corresponding to `data_1`.
    out_2 : ndarray, same shape as `data_2`
        Permutation sample corresponding to `data_2`.
    """
    data_1 = _convert_data(data_1)
    data_2 = _convert_data(data_2)

    return _permutation_sample(data_1, data_2)


# @numba.jit(nopython=True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号