cupy.testing.numpy_cupy_array_list_equal#

cupy.testing.numpy_cupy_array_list_equal(err_msg='', verbose=True, name='xp', sp_name=None, scipy_name=None)[source]#

Decorator that checks the resulting lists of NumPy and CuPy’s one are equal.

Parameters:
  • err_msg (str) – The error message to be printed in case of failure.

  • verbose (bool) – If True, the conflicting values are appended to the error message.

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

  • sp_name (str or None) – Argument name whose value is either scipy.sparse or cupyx.scipy.sparse module. If None, no argument is given for the modules.

  • scipy_name (str or None) – Argument name whose value is either scipy or cupyx.scipy module. If None, no argument is given for the modules.

Decorated test fixture is required to return the same list of arrays (except the type of array module) even if xp is numpy or cupy.