pyfrp_misc_module.py 文件源码

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

项目:PyFRAP 作者: alexblaessle 项目源码 文件源码
def modIdx(i,l):

    """Returns index of list when 
    input is larger than list by returning the modulo of the length of
    the list. 

    Useful if lists refer to loop etc.

    Args:
        i (int): Index.
        l (list): Some list.

    Returns:
        int: New index.

    """

    return np.mod(i,len(l))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号