@parameterized.named_parameters(jtu.cases_from_list(({'testcase_name': '{}_inshape={}_axis={}_keepdims={}'.format(rec.test_name.capitalize(), jtu.format_shape_dtype_string(shape, dtype), axis, keepdims), 'rng_factory': rec.rng_factory, 'shape': shape, 'dtype': dtype, 'onp_op': getattr(onp, rec.name), 'jnp_op': getattr(jnp, rec.name), 'axis': axis, 'keepdims': keepdims, 'inexact': rec.inexact} for rec in JAX_REDUCER_NO_DTYPE_RECORDS for shape in rec.shapes for dtype in rec.dtypes for axis in (list(range((- len(shape)), len(shape))) + [None]) for keepdims in [False, True])))
def testReducerNoDtype(self, onp_op, jnp_op, rng_factory, shape, dtype, axis, keepdims, inexact):
    rng = rng_factory()
    onp_fun = (lambda x: onp_op(x, axis, keepdims=keepdims))
    onp_fun = _promote_like_jnp(onp_fun, inexact)
    onp_fun = jtu.ignore_warning(category=onp.ComplexWarning)(onp_fun)
    jnp_fun = (lambda x: jnp_op(x, axis, keepdims=keepdims))
    jnp_fun = jtu.ignore_warning(category=jnp.ComplexWarning)(jnp_fun)
    args_maker = (lambda : [rng(shape, dtype)])
    self._CheckAgainstNumpy(onp_fun, jnp_fun, args_maker, check_dtypes=True)
    self._CompileAndCheck(jnp_fun, args_maker, check_dtypes=True)
@parameterized.named_parameters(jtu.cases_from_list(({'testcase_name': '{}_inshape={}_axis={}_keepdims={}'.format(rec.test_name.capitalize(), jtu.format_shape_dtype_string(shape, dtype), axis, keepdims), 'rng_factory': rec.rng_factory, 'shape': shape, 'dtype': dtype, 'onp_op': getattr(onp, rec.name), 'jnp_op': getattr(jnp, rec.name), 'axis': axis, 'keepdims': keepdims, 'inexact': rec.inexact} for rec in JAX_REDUCER_NO_DTYPE_RECORDS for shape in rec.shapes for dtype in rec.dtypes for axis in (list(range((- len(shape)), len(shape))) + [None]) for keepdims in [False, True])))
def testReducerNoDtype(self, onp_op, jnp_op, rng_factory, shape, dtype, axis, keepdims, inexact):
    rng = rng_factory()
    onp_fun = (lambda x: onp_op(x, axis, keepdims=keepdims))
    onp_fun = _promote_like_jnp(onp_fun, inexact)
    onp_fun = jtu.ignore_warning(category=onp.ComplexWarning)(onp_fun)
    jnp_fun = (lambda x: jnp_op(x, axis, keepdims=keepdims))
    jnp_fun = jtu.ignore_warning(category=jnp.ComplexWarning)(jnp_fun)
    args_maker = (lambda : [rng(shape, dtype)])
    self._CheckAgainstNumpy(onp_fun, jnp_fun, args_maker, check_dtypes=True)
    self._CompileAndCheck(jnp_fun, args_maker, check_dtypes=True)