def _tril_indices(n, k=0):
"""Replacement for tril_indices that is provided for numpy >= 1.4"""
mask = np.greater_equal(np.subtract.outer(np.arange(n), np.arange(n)), -k)
indices = np.where(mask)
return indices
fixes.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录