impl.py 文件源码

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

项目:numba-examples 作者: numba 项目源码 文件源码
def input_generator():
    for dtype in [np.float64]:
        for nsamples in [1000, 10000]:
            sigma = 5.0
            samples = np.random.normal(loc=0.0, scale=sigma, size=nsamples).astype(dtype)
            # For simplicity, initialize bandwidth array with constant using 1D rule of thumb
            bandwidths = np.full_like(samples, 1.06 * nsamples**0.2 * sigma)
            for neval in [10, 1000, 10000]:
                category = ('samples%d' % nsamples, np.dtype(dtype).name)
                eval_points = np.random.normal(loc=0.0, scale=5.0, size=neval).astype(dtype)
                yield dict(category=category, x=neval, input_args=(eval_points, samples, bandwidths), input_kwargs={})

#### BEGIN: numpy
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号