(request, backend)
| 54 | |
| 55 | @pytest.fixture(params=[1]) |
| 56 | def ds(request, backend): |
| 57 | if request.param == 1: |
| 58 | ds = Dataset( |
| 59 | dict( |
| 60 | z1=(["y", "x"], np.random.randn(2, 8)), |
| 61 | z2=(["time", "y"], np.random.randn(10, 2)), |
| 62 | ), |
| 63 | dict( |
| 64 | x=("x", np.linspace(0, 1.0, 8)), |
| 65 | time=("time", np.linspace(0, 1.0, 10)), |
| 66 | c=("y", ["a", "b"]), |
| 67 | y=range(2), |
| 68 | ), |
| 69 | ) |
| 70 | elif request.param == 2: |
| 71 | ds = Dataset( |
| 72 | dict( |
| 73 | z1=(["time", "y"], np.random.randn(10, 2)), |
| 74 | z2=(["time"], np.random.randn(10)), |
| 75 | z3=(["x", "time"], np.random.randn(8, 10)), |
| 76 | ), |
| 77 | dict( |
| 78 | x=("x", np.linspace(0, 1.0, 8)), |
| 79 | time=("time", np.linspace(0, 1.0, 10)), |
| 80 | c=("y", ["a", "b"]), |
| 81 | y=range(2), |
| 82 | ), |
| 83 | ) |
| 84 | elif request.param == 3: |
| 85 | ds = create_test_data() |
| 86 | else: |
| 87 | raise ValueError |
| 88 | |
| 89 | if backend == "dask": |
| 90 | return ds.chunk() |
| 91 | |
| 92 | return ds |
| 93 | |
| 94 | |
| 95 | @pytest.fixture(params=[1]) |
no test coverage detected