@parameterized.named_parameters(jtu.cases_from_list(({'testcase_name': '_{}_axis={}'.format(jtu.format_shape_dtype_string(shape, dtype), axis), 'rng_factory': rng_factory, 'shape': shape, 'dtype': dtype, 'axis': axis} for shape in [(3,), (2, 3)] for dtype in default_dtypes for axis in (list(range((- len(shape)), len(shape))) + [None]) for rng_factory in [jtu.rand_default])))
def testFlip(self, shape, dtype, axis, rng_factory):
    rng = rng_factory()
    args_maker = self._GetArgsMaker(rng, [shape], [dtype])
    jnp_op = (lambda x: jnp.flip(x, axis))
    onp_op = (lambda x: onp.flip(x, axis))
    self._CheckAgainstNumpy(onp_op, jnp_op, args_maker, check_dtypes=True)
    self._CompileAndCheck(jnp_op, args_maker, check_dtypes=True)
@parameterized.named_parameters(jtu.cases_from_list(({'testcase_name': '_{}_axis={}'.format(jtu.format_shape_dtype_string(shape, dtype), axis), 'rng_factory': rng_factory, 'shape': shape, 'dtype': dtype, 'axis': axis} for shape in [(3,), (2, 3)] for dtype in default_dtypes for axis in (list(range((- len(shape)), len(shape))) + [None]) for rng_factory in [jtu.rand_default])))
def testFlip(self, shape, dtype, axis, rng_factory):
    rng = rng_factory()
    args_maker = self._GetArgsMaker(rng, [shape], [dtype])
    jnp_op = (lambda x: jnp.flip(x, axis))
    onp_op = (lambda x: onp.flip(x, axis))
    self._CheckAgainstNumpy(onp_op, jnp_op, args_maker, check_dtypes=True)
    self._CompileAndCheck(jnp_op, args_maker, check_dtypes=True)