utils.py 文件源码

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

项目:rankpy 作者: dmitru 项目源码 文件源码
def _get_partition_indices(start, end, n_jobs):
    '''
    Get boundary indices for ``n_jobs`` number of sub-arrays dividing
    a (contiguous) array of indices starting with ``start`` (inclusive)
    and ending with ``end`` (exclusive) into equal parts.
    '''
    if (end - start) >= n_jobs:
        return np.linspace(start, end, n_jobs + 1).astype(np.intc)
    else:
        return np.arange(end - start + 1, dtype=np.intc)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号