@parameterized.named_parameters(jtu.cases_from_list(({'testcase_name': '_inshape={}_axis={}'.format(jtu.format_shape_dtype_string(arg_shape, dtype), ax), 'arg_shape': arg_shape, 'dtype': dtype, 'ax': ax, 'rng_factory': jtu.rand_default} for (arg_shape, ax) in [((3, 1), None), ((3, 1), 1), ((1, 3, 1), (0, 2)), ((1, 4, 1), (0,))] for dtype in default_dtypes)))
def testSqueeze(self, arg_shape, dtype, ax, rng_factory):
    rng = rng_factory()
    onp_fun = (lambda x: onp.squeeze(x, ax))
    jnp_fun = (lambda x: jnp.squeeze(x, ax))
    args_maker = (lambda : [rng(arg_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={}'.format(jtu.format_shape_dtype_string(arg_shape, dtype), ax), 'arg_shape': arg_shape, 'dtype': dtype, 'ax': ax, 'rng_factory': jtu.rand_default} for (arg_shape, ax) in [((3, 1), None), ((3, 1), 1), ((1, 3, 1), (0, 2)), ((1, 4, 1), (0,))] for dtype in default_dtypes)))
def testSqueeze(self, arg_shape, dtype, ax, rng_factory):
    rng = rng_factory()
    onp_fun = (lambda x: onp.squeeze(x, ax))
    jnp_fun = (lambda x: jnp.squeeze(x, ax))
    args_maker = (lambda : [rng(arg_shape, dtype)])
    self._CheckAgainstNumpy(onp_fun, jnp_fun, args_maker, check_dtypes=True)
    self._CompileAndCheck(jnp_fun, args_maker, check_dtypes=True)