@parameterized.named_parameters(jtu.cases_from_list(({'testcase_name': '_shape={}_n={}_increasing={}'.format(jtu.format_shape_dtype_string([shape], dtype), n, increasing), 'dtype': dtype, 'shape': shape, 'n': n, 'increasing': increasing, 'rng_factory': jtu.rand_default} for dtype in inexact_dtypes for shape in [0, 5] for n in [2, 4] for increasing in [False, True])))
def testVander(self, shape, dtype, n, increasing, rng_factory):
    rng = rng_factory()

    def onp_fun(arg):
        arg = (arg.astype(onp.float32) if (dtype == jnp.bfloat16) else arg)
        return onp.vander(arg, N=n, increasing=increasing)
    jnp_fun = (lambda arg: jnp.vander(arg, N=n, increasing=increasing))
    args_maker = (lambda : [rng([shape], dtype)])
    self._CheckAgainstNumpy(onp_fun, jnp_fun, args_maker, check_dtypes=False, tol={onp.float32: 0.001})
    self._CompileAndCheck(jnp_fun, args_maker, check_dtypes=False)
@parameterized.named_parameters(jtu.cases_from_list(({'testcase_name': '_shape={}_n={}_increasing={}'.format(jtu.format_shape_dtype_string([shape], dtype), n, increasing), 'dtype': dtype, 'shape': shape, 'n': n, 'increasing': increasing, 'rng_factory': jtu.rand_default} for dtype in inexact_dtypes for shape in [0, 5] for n in [2, 4] for increasing in [False, True])))
def testVander(self, shape, dtype, n, increasing, rng_factory):
    rng = rng_factory()

    def onp_fun(arg):
        arg = (arg.astype(onp.float32) if (dtype == jnp.bfloat16) else arg)
        return onp.vander(arg, N=n, increasing=increasing)
    jnp_fun = (lambda arg: jnp.vander(arg, N=n, increasing=increasing))
    args_maker = (lambda : [rng([shape], dtype)])
    self._CheckAgainstNumpy(onp_fun, jnp_fun, args_maker, check_dtypes=False, tol={onp.float32: 0.001})
    self._CompileAndCheck(jnp_fun, args_maker, check_dtypes=False)