Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore "You are using [hist/kde] as a plot kind" warnings #342

Merged
merged 3 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
anesthetic: nested sampling post-processing
===========================================
:Authors: Will Handley and Lukas Hergt
:Version: 2.3.3
:Version: 2.3.4
:Homepage: https://github.com/handley-lab/anesthetic
:Documentation: http://anesthetic.readthedocs.io/

Expand Down
2 changes: 1 addition & 1 deletion anesthetic/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.3.3'
__version__ = '2.3.4'
8 changes: 6 additions & 2 deletions tests/test_samples.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import anesthetic.examples._matplotlib_agg # noqa: F401

import pytest
from contextlib import nullcontext
from math import floor, ceil
import numpy as np
from pandas import MultiIndex
Expand Down Expand Up @@ -823,15 +824,18 @@ def test_stats():
def test_masking_1d(kind):
pc = read_chains("./tests/example_data/pc")
mask = pc['x0'].to_numpy() > 0
pc[mask].plot_1d(['x0', 'x1', 'x2'], kind=kind)
with pytest.warns(UserWarning) if kind in ['kde',
'hist'] else nullcontext():
pc[mask].plot_1d(['x0', 'x1', 'x2'], kind=kind)


@pytest.mark.parametrize('kind', ['kde', 'scatter', 'scatter_2d', 'kde_2d',
'hist_2d', skipif_no_fastkde('fastkde_2d')])
def test_masking_2d(kind):
pc = read_chains("./tests/example_data/pc")
mask = pc['x0'].to_numpy() > 0
pc[mask].plot_2d(['x0', 'x1', 'x2'], kind={'lower': kind})
with pytest.warns(UserWarning) if kind == 'kde' else nullcontext():
pc[mask].plot_2d(['x0', 'x1', 'x2'], kind={'lower': kind})


def test_merging():
Expand Down
Loading