| 116 | ) |
| 117 | @pytest.mark.parametrize("dtype", ["i4"]) |
| 118 | def test_arr_like_shape(funcname, kwargs, shape, dtype, chunks, out_shape): |
| 119 | np_func = getattr(np, funcname) |
| 120 | da_func = getattr(da, funcname) |
| 121 | a = np.random.randint(0, 10, shape).astype(dtype) |
| 122 | np_r = np_func(a, shape=out_shape, **kwargs) |
| 123 | da_r = da_func(a, chunks=chunks, shape=out_shape, **kwargs) |
| 124 | |
| 125 | assert np_r.shape == da_r.shape |
| 126 | assert np_r.dtype == da_r.dtype |
| 127 | |
| 128 | if "empty" not in funcname: |
| 129 | assert_eq(np_r, da_r) |
| 130 | |
| 131 | |
| 132 | @pytest.mark.parametrize("endpoint", [True, False]) |