def validate_agg_perf(perf_da, min_trial=1):
    """Validate the aggregated eval data set."""
    assert isinstance(perf_da, xr.DataArray)
    assert perf_da.dims == (ITER, SUGGEST, TEST_CASE, METHOD, TRIAL)
    assert xru.is_simple_coords(perf_da.coords, dims=(ITER, SUGGEST, TRIAL))
    assert not np.any(np.isnan(perf_da.values))
    assert perf_da.sizes[TRIAL] >= min_trial
def validate_time(all_time):
    """Validate the aggregated time data set."""
    assert isinstance(all_time, xr.Dataset)
    assert all_time[cc.SUGGEST_PHASE].dims == (ITER,)
    assert all_time[cc.EVAL_PHASE].dims == (ITER, SUGGEST)
    assert all_time[cc.OBS_PHASE].dims == (ITER,)
    assert xru.is_simple_coords(all_time.coords, min_side=1)
Exemplo n.º 3
0
def test_is_simple_coords_pass(da):
    simple = xru.is_simple_coords(da.coords)
    assert simple
Exemplo n.º 4
0
def test_is_simple_coords(da, min_side):
    xru.is_simple_coords(da.coords, min_side=min_side)
def validate_perf(perf_da):
    """Validate the input eval data arrays."""
    assert isinstance(perf_da, xr.Dataset)
    assert perf_da.dims == (ITER, SUGGEST)
    assert xru.is_simple_coords(perf_da.coords)
    assert not np.any(np.isnan(perf_da.values))
Exemplo n.º 6
0
def validate_perf(perf_da):
    assert isinstance(perf_da, xr.DataArray)
    assert perf_da.dims == (ITER, SUGGEST)
    assert xru.is_simple_coords(perf_da.coords)
    assert not np.any(np.isnan(perf_da.values))