|
12 | 12 | def test_owcrps_ensemble(backend): |
13 | 13 | # test shapes |
14 | 14 | obs = np.random.randn(N) |
15 | | - res = sr.owcrps_ensemble(obs, np.random.randn(N, M), w_func=lambda x: x * 0.0 + 1.0) |
| 15 | + res = sr.owcrps_ensemble( |
| 16 | + obs, np.random.randn(N, M), w_func=lambda x: x * 0.0 + 1.0, backend=backend |
| 17 | + ) |
16 | 18 | assert res.shape == (N,) |
17 | 19 | res = sr.owcrps_ensemble( |
18 | | - obs, np.random.randn(M, N), w_func=lambda x: x * 0.0 + 1.0, m_axis=0 |
| 20 | + obs, |
| 21 | + np.random.randn(M, N), |
| 22 | + w_func=lambda x: x * 0.0 + 1.0, |
| 23 | + m_axis=0, |
| 24 | + backend=backend, |
19 | 25 | ) |
20 | 26 | assert res.shape == (N,) |
21 | 27 |
|
22 | 28 |
|
23 | 29 | @pytest.mark.parametrize("backend", BACKENDS) |
24 | 30 | def test_vrcrps_ensemble(backend): |
25 | | - # test exceptions |
26 | | - with pytest.raises(ValueError): |
27 | | - est = "not_nrg" |
28 | | - sr.vrcrps_ensemble(1, 1.1, w_func=lambda x: x, estimator=est, backend=backend) |
29 | | - |
30 | 31 | # test shapes |
31 | 32 | obs = np.random.randn(N) |
32 | | - res = sr.vrcrps_ensemble(obs, np.random.randn(N, M), w_func=lambda x: x * 0.0 + 1.0) |
| 33 | + res = sr.vrcrps_ensemble( |
| 34 | + obs, np.random.randn(N, M), w_func=lambda x: x * 0.0 + 1.0, backend=backend |
| 35 | + ) |
33 | 36 | assert res.shape == (N,) |
34 | 37 | res = sr.vrcrps_ensemble( |
35 | | - obs, np.random.randn(M, N), w_func=lambda x: x * 0.0 + 1.0, m_axis=0 |
| 38 | + obs, |
| 39 | + np.random.randn(M, N), |
| 40 | + w_func=lambda x: x * 0.0 + 1.0, |
| 41 | + m_axis=0, |
| 42 | + backend=backend, |
36 | 43 | ) |
37 | 44 | assert res.shape == (N,) |
38 | 45 |
|
|
0 commit comments