helper.py 文件源码

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

项目:chainer-deconv 作者: germanRos 项目源码 文件源码
def for_float_dtypes(name='dtype', no_float16=False):
    """Decorator that checks the fixture with all float dtypes.

    Args:
         name(str): Argument name to which specified dtypes are passed.
         no_float16(bool): If, True, ``numpy.float16`` is
             omitted from candidate dtypes.

    dtypes to be tested are ``numpy.float16`` (optional), ``numpy.float32``,
    and ``numpy.float64``.

    .. seealso:: :func:`cupy.testing.for_dtypes`,
        :func:`cupy.testing.for_all_dtypes`
    """
    if no_float16:
        return for_dtypes(_regular_float_dtypes, name=name)
    else:
        return for_dtypes(_float_dtypes, name=name)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号