(shape)
| 200 | |
| 201 | @pytest.mark.parametrize("shape", [(2, 3), (2, 3, 4), (2, 3, 4, 2)]) |
| 202 | def test_random_shapes(shape): |
| 203 | rs = da.random.RandomState(RandomState=cupy.random.RandomState) |
| 204 | |
| 205 | x = rs.poisson(size=shape, chunks=3) |
| 206 | assert type(x._meta) == cupy.ndarray |
| 207 | assert_eq(x, x) # Check that _meta and computed arrays match types |
| 208 | assert x._meta.shape == (0,) * len(shape) |
| 209 | assert x.shape == shape |
| 210 | |
| 211 | rng = da.random.default_rng(cupy.random.default_rng()) |
| 212 | |
| 213 | x = rng.poisson(1.0, size=shape, chunks=3) |
| 214 | assert type(x._meta) == cupy.ndarray |
| 215 | assert_eq(x, x) # Check that _meta and computed arrays match types |
| 216 | assert x._meta.shape == (0,) * len(shape) |
| 217 | assert x.shape == shape |
nothing calls this directly
no test coverage detected