@testing.for_dtypes('bhilBHILefdFD')
@testing.numpy_cupy_allclose(rtol=1e-05, contiguous_check=False)
def test_cub_argmin(self, xp, dtype):
    a = testing.shaped_random(self.shape, xp, dtype)
    if (self.order == 'C'):
        a = xp.ascontiguousarray(a)
    else:
        a = xp.asfortranarray(a)
    if (xp is numpy):
        return a.argmin(axis=self.axis)
    ret = cupy.empty(())
    if (self.backend == 'device'):
        func_name = 'cupy.core._routines_statistics.cub.'
        func_name += 'device_reduce'
        with testing.AssertFunctionIsCalled(func_name, return_value=ret):
            a.argmin(axis=self.axis)
    elif (self.backend == 'block'):
        func_name = 'cupy.core._cub_reduction.'
        func_name += '_SimpleCubReductionKernel_get_cached_function'
        func = _cub_reduction._SimpleCubReductionKernel_get_cached_function
        if ((self.axis is not None) and (len(self.shape) > 1)):
            times_called = 1
        else:
            times_called = 2
        with testing.AssertFunctionIsCalled(func_name, wraps=func, times_called=times_called):
            a.argmin(axis=self.axis)
    return a.argmin(axis=self.axis)
@testing.for_dtypes('bhilBHILefdFD')
@testing.numpy_cupy_allclose(rtol=1e-05, contiguous_check=False)
def test_cub_argmin(self, xp, dtype):
    a = testing.shaped_random(self.shape, xp, dtype)
    if (self.order == 'C'):
        a = xp.ascontiguousarray(a)
    else:
        a = xp.asfortranarray(a)
    if (xp is numpy):
        return a.argmin(axis=self.axis)
    ret = cupy.empty(())
    if (self.backend == 'device'):
        func_name = 'cupy.core._routines_statistics.cub.'
        func_name += 'device_reduce'
        with testing.AssertFunctionIsCalled(func_name, return_value=ret):
            a.argmin(axis=self.axis)
    elif (self.backend == 'block'):
        func_name = 'cupy.core._cub_reduction.'
        func_name += '_SimpleCubReductionKernel_get_cached_function'
        func = _cub_reduction._SimpleCubReductionKernel_get_cached_function
        if ((self.axis is not None) and (len(self.shape) > 1)):
            times_called = 1
        else:
            times_called = 2
        with testing.AssertFunctionIsCalled(func_name, wraps=func, times_called=times_called):
            a.argmin(axis=self.axis)
    return a.argmin(axis=self.axis)