stats.py 文件源码

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

项目:BigBrotherBot-For-UrT43 作者: ptitbigorneau 项目源码 文件源码
def atmin(a,lowerlimit=None,dimension=None,inclusive=1):
    """
   Returns the minimum value of a, along dimension, including only values less
   than (or equal to, if inclusive=1) lowerlimit.  If the limit is set to None,
   all values in the array are used.

   Usage:   atmin(a,lowerlimit=None,dimension=None,inclusive=1)
   """
    if inclusive:         lowerfcn = N.greater
    else:               lowerfcn = N.greater_equal
    if dimension == None:
        a = N.ravel(a)
        dimension = 0
    if lowerlimit == None:
        lowerlimit = N.minimum.reduce(N.ravel(a))-11
    biggest = N.maximum.reduce(N.ravel(a))
    ta = N.where(lowerfcn(a,lowerlimit),a,biggest)
    return N.minimum.reduce(ta,dimension)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号