@parameterized.named_parameters(jtu.cases_from_list(({'testcase_name': '_shape={}_dtype={}_rowvar={}_ddof={}_bias={}'.format(shape, dtype, rowvar, ddof, bias), 'shape': shape, 'dtype': dtype, 'rowvar': rowvar, 'ddof': ddof, 'bias': bias, 'rng_factory': rng_factory} for shape in [(5,), (10, 5), (5, 10)] for dtype in all_dtypes for rowvar in [True, False] for bias in [True, False] for ddof in [None, 2, 3] for rng_factory in [jtu.rand_default])))
@jtu.skip_on_devices('gpu')
def testCov(self, shape, dtype, rowvar, ddof, bias, rng_factory):
    rng = rng_factory()
    args_maker = self._GetArgsMaker(rng, [shape], [dtype])
    onp_fun = partial(onp.cov, rowvar=rowvar, ddof=ddof, bias=bias)
    jnp_fun = partial(jnp.cov, rowvar=rowvar, ddof=ddof, bias=bias)
    tol = {onp.float32: 1e-05, onp.float64: 1e-13, onp.complex128: 1e-13}
    tol = (0.07 if (jtu.device_under_test() == 'tpu') else tol)
    tol = jtu.join_tolerance(tol, jtu.tolerance(dtype))
    self._CheckAgainstNumpy(onp_fun, jnp_fun, args_maker, check_dtypes=False, tol=tol)
    self._CompileAndCheck(jnp_fun, args_maker, check_dtypes=True, atol=tol, rtol=tol)
@parameterized.named_parameters(jtu.cases_from_list(({'testcase_name': '_shape={}_dtype={}_rowvar={}_ddof={}_bias={}'.format(shape, dtype, rowvar, ddof, bias), 'shape': shape, 'dtype': dtype, 'rowvar': rowvar, 'ddof': ddof, 'bias': bias, 'rng_factory': rng_factory} for shape in [(5,), (10, 5), (5, 10)] for dtype in all_dtypes for rowvar in [True, False] for bias in [True, False] for ddof in [None, 2, 3] for rng_factory in [jtu.rand_default])))
@jtu.skip_on_devices('gpu')
def testCov(self, shape, dtype, rowvar, ddof, bias, rng_factory):
    rng = rng_factory()
    args_maker = self._GetArgsMaker(rng, [shape], [dtype])
    onp_fun = partial(onp.cov, rowvar=rowvar, ddof=ddof, bias=bias)
    jnp_fun = partial(jnp.cov, rowvar=rowvar, ddof=ddof, bias=bias)
    tol = {onp.float32: 1e-05, onp.float64: 1e-13, onp.complex128: 1e-13}
    tol = (0.07 if (jtu.device_under_test() == 'tpu') else tol)
    tol = jtu.join_tolerance(tol, jtu.tolerance(dtype))
    self._CheckAgainstNumpy(onp_fun, jnp_fun, args_maker, check_dtypes=False, tol=tol)
    self._CompileAndCheck(jnp_fun, args_maker, check_dtypes=True, atol=tol, rtol=tol)