cupy.testing.for_int_dtypes#

cupy.testing.for_int_dtypes(name='dtype', no_bool=False)[source]#

用于检查固定装置(fixture)是否支持整数和可选布尔数据类型的装饰器。

参数:
  • name (str) – 将指定的数据类型传递到的参数名称。

  • no_bool (bool) – 如果为 True,则从候选数据类型中省略 numpy.bool_

要测试的数据类型包括 numpy.dtype('b'), numpy.dtype('h'), numpy.dtype('i'), numpy.dtype('l'), numpy.dtype('q'), numpy.dtype('B'), numpy.dtype('H'), numpy.dtype('I'), numpy.dtype('L'), numpy.dtype('Q'), 以及 numpy.bool_ (可选)。