def test_bootstrap_dpp_sig50_similar_dpp(control_3d_NA): ds = control_3d_NA bootstrap = 5 sig = 50 actual = dpp_threshold(ds, bootstrap=bootstrap, sig=sig).drop('quantile') expected = dpp(ds) xr.testing.assert_allclose(actual, expected, atol=0.5, rtol=0.5)
def test_bootstrap_dpp_sig50_similar_dpp(PM_da_control_3d): sig = 50 actual = dpp_threshold(PM_da_control_3d, iterations=ITERATIONS, sig=sig).drop_vars( "quantile" ) expected = dpp(PM_da_control_3d) xr.testing.assert_allclose(actual, expected, atol=0.5, rtol=0.5)
def test_dpp(control_3d_NA, chunk): """Check for positive diagnostic potential predictability in NA SST.""" control = control_3d_NA res = dpp(control, chunk=chunk) assert res.mean() > 0
def test_dpp(PM_da_control_3d, chunk): """Check for positive diagnostic potential predictability in NA SST.""" res = dpp(PM_da_control_3d, chunk=chunk) assert res.mean() > 0