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))
评论列表
文章目录