@parameterized.named_parameters(itertools.chain.from_iterable((jtu.cases_from_list(({'testcase_name': jtu.format_test_name_suffix(rec.name, shapes, itertools.repeat(dtype)), 'op': rec.op, 'rng_factory': rec.rng_factory, 'shapes': shapes, 'dtype': dtype, 'order': rec.order, 'tol': rec.tol} for shapes in CombosWithReplacement(nonempty_shapes, rec.nargs) for dtype in rec.dtypes)) for rec in GRAD_TEST_RECORDS)))
def testOpGrad(self, op, rng_factory, shapes, dtype, order, tol):
    rng = rng_factory()
    tol = {onp.float32: 0.1, onp.complex64: 0.1}
    args = tuple((rng(shape, dtype) for shape in shapes))
    check_grads(op, args, order, ['fwd', 'rev'], tol, tol)
@parameterized.named_parameters(itertools.chain.from_iterable((jtu.cases_from_list(({'testcase_name': jtu.format_test_name_suffix(rec.name, shapes, itertools.repeat(dtype)), 'op': rec.op, 'rng_factory': rec.rng_factory, 'shapes': shapes, 'dtype': dtype, 'order': rec.order, 'tol': rec.tol} for shapes in CombosWithReplacement(nonempty_shapes, rec.nargs) for dtype in rec.dtypes)) for rec in GRAD_TEST_RECORDS)))
def testOpGrad(self, op, rng_factory, shapes, dtype, order, tol):
    rng = rng_factory()
    tol = {onp.float32: 0.1, onp.complex64: 0.1}
    args = tuple((rng(shape, dtype) for shape in shapes))
    check_grads(op, args, order, ['fwd', 'rev'], tol, tol)