@parameterized.named_parameters(jtu.cases_from_list(({'testcase_name': '_op={}_shape={}_dtype={}'.format(op, shape, dtype), 'onp_op': getattr(onp, op), 'jnp_op': getattr(jnp, op), 'shape': shape, 'dtype': dtype} for op in ['zeros', 'ones'] for shape in [2, (), (2,), (3, 0), onp.array((4, 5, 6), dtype=onp.int32), onp.array(4, dtype=onp.int32)] for dtype in all_dtypes)))
def testZerosOnes(self, onp_op, jnp_op, shape, dtype):
    rng = jtu.rand_default()

    def args_maker():
        return []
    onp_op = partial(onp_op, shape, dtype)
    jnp_op = partial(jnp_op, shape, dtype)
    self._CheckAgainstNumpy(onp_op, jnp_op, args_maker, check_dtypes=True)
    self._CompileAndCheck(jnp_op, args_maker, check_dtypes=True)
@parameterized.named_parameters(jtu.cases_from_list(({'testcase_name': '_op={}_shape={}_dtype={}'.format(op, shape, dtype), 'onp_op': getattr(onp, op), 'jnp_op': getattr(jnp, op), 'shape': shape, 'dtype': dtype} for op in ['zeros', 'ones'] for shape in [2, (), (2,), (3, 0), onp.array((4, 5, 6), dtype=onp.int32), onp.array(4, dtype=onp.int32)] for dtype in all_dtypes)))
def testZerosOnes(self, onp_op, jnp_op, shape, dtype):
    rng = jtu.rand_default()

    def args_maker():
        return []
    onp_op = partial(onp_op, shape, dtype)
    jnp_op = partial(jnp_op, shape, dtype)
    self._CheckAgainstNumpy(onp_op, jnp_op, args_maker, check_dtypes=True)
    self._CompileAndCheck(jnp_op, args_maker, check_dtypes=True)