Coverage for tests/probabilty/functions_test_data.py: 100%
6 statements
« prev ^ index » next coverage.py v7.3.2, created at 2024-02-28 12:51 +1100
« prev ^ index » next coverage.py v7.3.2, created at 2024-02-28 12:51 +1100
1"""
2Data for probability tests.
3"""
4import numpy as np
5import xarray as xr
7DA_ROUND = xr.DataArray(
8 data=[[0.2, 1.323, 10.412], [-3.914, 0.001, np.nan]],
9 dims=["station", "x"],
10 coords={"x": [0, 1, 2], "station": [1001, 1002]},
11)
13EXP_ROUND1 = DA_ROUND.copy()
15EXP_ROUND2 = xr.DataArray( # round to nearest .2
16 data=[[0.2, 1.4, 10.4], [-4.0, 0.0, np.nan]],
17 dims=["station", "x"],
18 coords={"x": [0, 1, 2], "station": [1001, 1002]},
19)
21EXP_ROUND3 = xr.DataArray( # round to nearest 5
22 data=[[0.0, 0.0, 10.0], [-5.0, 0.0, np.nan]],
23 dims=["station", "x"],
24 coords={"x": [0, 1, 2], "station": [1001, 1002]},
25)