@parameterized.named_parameters(jtu.cases_from_list(({'testcase_name': '_x={}_rng_factory={}'.format(jtu.format_shape_dtype_string(shape, dtype), rng_factory_id), 'shape': shape, 'dtype': dtype, 'rng_factory': rng_factory} for (rng_factory_id, rng_factory) in enumerate([jtu.rand_some_inf_and_nan, jtu.rand_some_zero, partial(jtu.rand_not_small, offset=100000000.0)]) for shape in all_shapes for dtype in default_dtypes)))
@jtu.skip_on_devices('tpu')
def testFrexp(self, shape, dtype, rng_factory):
    if ((dtype not in [jnp.bfloat16, onp.float16, onp.float32]) and (not FLAGS.jax_enable_x64)):
        self.skipTest('Only run float64 testcase when float64 is enabled.')
    rng = rng_factory()
    onp_fun = (lambda x: onp.frexp(x))
    jnp_fun = (lambda x: jnp.frexp(x))
    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': '_x={}_rng_factory={}'.format(jtu.format_shape_dtype_string(shape, dtype), rng_factory_id), 'shape': shape, 'dtype': dtype, 'rng_factory': rng_factory} for (rng_factory_id, rng_factory) in enumerate([jtu.rand_some_inf_and_nan, jtu.rand_some_zero, partial(jtu.rand_not_small, offset=100000000.0)]) for shape in all_shapes for dtype in default_dtypes)))
@jtu.skip_on_devices('tpu')
def testFrexp(self, shape, dtype, rng_factory):
    if ((dtype not in [jnp.bfloat16, onp.float16, onp.float32]) and (not FLAGS.jax_enable_x64)):
        self.skipTest('Only run float64 testcase when float64 is enabled.')
    rng = rng_factory()
    onp_fun = (lambda x: onp.frexp(x))
    jnp_fun = (lambda x: jnp.frexp(x))
    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)