@parameterized.named_parameters(jtu.cases_from_list(({'testcase_name': '_shape={}_dtype={}_rowvar={}'.format(shape, dtype, rowvar), 'shape': shape, 'dtype': dtype, 'rowvar': rowvar, 'rng_factory': rng_factory} for shape in [(5,), (10, 5), (3, 10)] for dtype in number_dtypes for rowvar in [True, False] for rng_factory in [jtu.rand_default])))
def testCorrCoef(self, shape, dtype, rowvar, rng_factory):
    rng = rng_factory()
    args_maker = self._GetArgsMaker(rng, [shape], [dtype])
    mat = onp.asarray([rng(shape, dtype)])
    onp_fun = partial(onp.corrcoef, rowvar=rowvar)
    jnp_fun = partial(jnp.corrcoef, rowvar=rowvar)
    if (not onp.any(onp.isclose(onp.std(mat), 0.0))):
        self._CheckAgainstNumpy(onp_fun, jnp_fun, args_maker, check_dtypes=False, tol=(0.01 if (jtu.device_under_test() == 'tpu') else None))
    self._CompileAndCheck(jnp_fun, args_maker, check_dtypes=True)
@parameterized.named_parameters(jtu.cases_from_list(({'testcase_name': '_shape={}_dtype={}_rowvar={}'.format(shape, dtype, rowvar), 'shape': shape, 'dtype': dtype, 'rowvar': rowvar, 'rng_factory': rng_factory} for shape in [(5,), (10, 5), (3, 10)] for dtype in number_dtypes for rowvar in [True, False] for rng_factory in [jtu.rand_default])))
def testCorrCoef(self, shape, dtype, rowvar, rng_factory):
    rng = rng_factory()
    args_maker = self._GetArgsMaker(rng, [shape], [dtype])
    mat = onp.asarray([rng(shape, dtype)])
    onp_fun = partial(onp.corrcoef, rowvar=rowvar)
    jnp_fun = partial(jnp.corrcoef, rowvar=rowvar)
    if (not onp.any(onp.isclose(onp.std(mat), 0.0))):
        self._CheckAgainstNumpy(onp_fun, jnp_fun, args_maker, check_dtypes=False, tol=(0.01 if (jtu.device_under_test() == 'tpu') else None))
    self._CompileAndCheck(jnp_fun, args_maker, check_dtypes=True)