templates.py 文件源码

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

项目:pymzn 作者: paolodragone 项目源码 文件源码
def discretize(value, factor=100):
    """Discretize the given value, pre-multiplying by the given factor"""
    if not isinstance(value, Iterable):
        return int(value * factor)
    int_value = list(deepcopy(value))
    for i in range(len(int_value)):
        int_value[i] = int(int_value[i] * factor)
    return int_value
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号