@parameterized.named_parameters(jtu.cases_from_list(({'testcase_name': '_{}_axis={}_bitorder={}_count={}'.format(jtu.format_shape_dtype_string(shape, dtype), axis, bitorder, count), 'rng_factory': rng_factory, 'shape': shape, 'dtype': dtype, 'axis': axis, 'bitorder': bitorder, 'count': count} for dtype in [onp.uint8] for bitorder in ['big', 'little'] for shape in [(1, 2, 3, 4)] for axis in [None, 0, 1, (- 2), (- 1)] for count in [None, 20] for rng_factory in [jtu.rand_int])))
def testUnpackbits(self, shape, dtype, axis, bitorder, count, rng_factory):
    if (numpy_version < (1, 17, 0)):
        raise SkipTest('bitorder arg added in numpy 1.17.0')
    rng = rng_factory(0, 256)
    args_maker = (lambda : [rng(shape, dtype)])
    jnp_op = partial(jnp.unpackbits, axis=axis, bitorder=bitorder)
    onp_op = partial(onp.unpackbits, axis=axis, bitorder=bitorder)
    self._CheckAgainstNumpy(jnp_op, onp_op, args_maker, check_dtypes=True)
    self._CompileAndCheck(jnp_op, args_maker, check_dtypes=True)
@parameterized.named_parameters(jtu.cases_from_list(({'testcase_name': '_{}_axis={}_bitorder={}_count={}'.format(jtu.format_shape_dtype_string(shape, dtype), axis, bitorder, count), 'rng_factory': rng_factory, 'shape': shape, 'dtype': dtype, 'axis': axis, 'bitorder': bitorder, 'count': count} for dtype in [onp.uint8] for bitorder in ['big', 'little'] for shape in [(1, 2, 3, 4)] for axis in [None, 0, 1, (- 2), (- 1)] for count in [None, 20] for rng_factory in [jtu.rand_int])))
def testUnpackbits(self, shape, dtype, axis, bitorder, count, rng_factory):
    if (numpy_version < (1, 17, 0)):
        raise SkipTest('bitorder arg added in numpy 1.17.0')
    rng = rng_factory(0, 256)
    args_maker = (lambda : [rng(shape, dtype)])
    jnp_op = partial(jnp.unpackbits, axis=axis, bitorder=bitorder)
    onp_op = partial(onp.unpackbits, axis=axis, bitorder=bitorder)
    self._CheckAgainstNumpy(jnp_op, onp_op, args_maker, check_dtypes=True)
    self._CompileAndCheck(jnp_op, args_maker, check_dtypes=True)