cupy.testing.numpy_cupy_raises

cupy.testing.numpy_cupy_raises(name='xp')[source]

Decorator that checks the NumPy and CuPy throw same errors.

Parameters:
  • name (str) – Argument name whose value is either
  • or cupy module. (numpy) –

Decorated test fixture is required throw same errors even if xp is numpy or cupy.