@parameterized.named_parameters(jtu.cases_from_list(({'testcase_name': '_shape=[{}]_axis={}_repeats={}'.format(jtu.format_shape_dtype_string(shape, dtype), axis, repeats), 'axis': axis, 'shape': shape, 'dtype': dtype, 'repeats': repeats, 'rng_factory': jtu.rand_default} for repeats in [0, 1, 2] for (shape, dtype) in _shape_and_dtypes(all_shapes, default_dtypes) for axis in ([None] + list(range((- len(shape)), len(shape)))))))
def testRepeat(self, axis, shape, dtype, repeats, rng_factory):
    rng = rng_factory()
    onp_fun = (lambda arg: onp.repeat(arg, repeats=repeats, axis=axis))
    onp_fun = _promote_like_jnp(onp_fun)
    jnp_fun = (lambda arg: jnp.repeat(arg, repeats=repeats, axis=axis))
    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': '_shape=[{}]_axis={}_repeats={}'.format(jtu.format_shape_dtype_string(shape, dtype), axis, repeats), 'axis': axis, 'shape': shape, 'dtype': dtype, 'repeats': repeats, 'rng_factory': jtu.rand_default} for repeats in [0, 1, 2] for (shape, dtype) in _shape_and_dtypes(all_shapes, default_dtypes) for axis in ([None] + list(range((- len(shape)), len(shape)))))))
def testRepeat(self, axis, shape, dtype, repeats, rng_factory):
    rng = rng_factory()
    onp_fun = (lambda arg: onp.repeat(arg, repeats=repeats, axis=axis))
    onp_fun = _promote_like_jnp(onp_fun)
    jnp_fun = (lambda arg: jnp.repeat(arg, repeats=repeats, axis=axis))
    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)