Skip to content

Commit

Permalink
skip test
Browse files Browse the repository at this point in the history
  • Loading branch information
aloctavodia committed Dec 13, 2023
1 parent 297595f commit 941a537
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions tests/base/test_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ def test_hdi_idata_varnames(centered_eight):
assert result.dims == {"hdi": 2, "school": 8}
assert list(result.data_vars.keys()) == ["mu", "theta"]

# this is failing with
# AttributeError: DatasetView objects are not to be initialized directly
# def test_hdi_idata_group(centered_eight):
# result_posterior = centered_eight.azstats.hdi(group="posterior")
# result_prior = centered_eight.azstats.hdi(group="prior")
# assert "hdi" in result_prior.mu.dims
# range_posterior = result_posterior.mu.values[1] - result_posterior.mu.values[0]
# range_prior = result_prior.mu.values[1] - result_prior.mu.values[0]
# assert range_posterior < range_prior

@pytest.mark.skip(reason="AttributeError: DatasetView objects are not to be initialized directly")
def test_hdi_idata_group(centered_eight):
result_posterior = centered_eight.azstats.hdi(group="posterior")
result_prior = centered_eight.azstats.hdi(group="prior")
assert "hdi" in result_prior.mu.dims
range_posterior = result_posterior.mu.values[1] - result_posterior.mu.values[0]
range_prior = result_prior.mu.values[1] - result_prior.mu.values[0]
assert range_posterior < range_prior


def test_hdi_coords(centered_eight):
Expand Down Expand Up @@ -150,7 +150,7 @@ def test_ecdf(centered_eight):
accessor = centered_eight.posterior.ds.azstats
result = accessor.ecdf()
assert isinstance(result, Dataset)
assert dict(result.dims) == {'plot_axis': 2, 'quantile': 200}
assert dict(result.dims) == {"plot_axis": 2, "quantile": 200}

result = accessor.hdi(dims="chain")
assert isinstance(result, Dataset)
Expand All @@ -161,7 +161,7 @@ def test_ecdf_idata_varnames(centered_eight):
accessor = centered_eight.posterior.ds.azstats
result = accessor.filter_vars(var_names=["mu", "theta"]).ecdf()
assert isinstance(result, Dataset)
assert result.dims == {'plot_axis': 2, 'quantile': 200}
assert result.dims == {"plot_axis": 2, "quantile": 200}
assert list(result.data_vars.keys()) == ["mu", "theta"]


Expand All @@ -170,6 +170,7 @@ def test_ecdf_coords(centered_eight):
result = data.azstats.ecdf(dims="draw")
assert_array_equal(result.coords["chain"], [0, 1, 3])


def test_r2_score():
x = np.linspace(0, 1, 100)
y = np.random.normal(x, 1)
Expand Down

0 comments on commit 941a537

Please sign in to comment.