def numpy_cupy_array_list_equal(err_msg='', verbose=True, name='xp'):
 def decorator(impl):
  @functools.wraps(impl)
  def test_func(self, *args, **kw):
   kw[name] = cupy
   x = impl(self, *args, **kw)
   kw[name] = numpy
   y = impl(self, *args, **kw)
   self.assertIsNotNone(x)
   self.assertIsNotNone(y)
   array.assert_array_list_equal(x, y, err_msg, verbose)
  return test_func
 return decorator

def numpy_cupy_array_list_equal ( err_msg = '' , verbose = True , name = 'xp' ) : def decorator ( impl ) : @ functools . wraps ( impl ) def test_func ( self , * args , ** kw ) : kw [ name ] = cupy x = impl ( self , * args , ** kw ) kw [ name ] = numpy y = impl ( self , * args , ** kw ) self . assertIsNotNone ( x ) self . assertIsNotNone ( y ) array . assert_array_list_equal ( x , y , err_msg , verbose ) return test_func return decorator
decorator that checks the resulting lists of numpy and cupys one are equal .