Skip to content

Commit

Permalink
Moved hdf functionality to anesthetic.read
Browse files Browse the repository at this point in the history
  • Loading branch information
williamjameshandley committed Jun 29, 2023
1 parent db6bc25 commit f432f69
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions anesthetic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import anesthetic.samples
import anesthetic.plot
import anesthetic.read.chain
import anesthetic.io
import anesthetic.read.hdf

import pandas
import pandas.plotting._core
Expand Down Expand Up @@ -48,5 +48,5 @@ def wrapper(backend=None):
make_2d_axes = anesthetic.plot.make_2d_axes
make_1d_axes = anesthetic.plot.make_1d_axes

read_hdf = anesthetic.io.read_hdf
read_hdf = anesthetic.read.hdf.read_hdf
read_chains = anesthetic.read.chain.read_chains
File renamed without changes.
5 changes: 3 additions & 2 deletions anesthetic/samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,9 @@ def tex(self):
)

def to_hdf(self, path_or_buf, key, *args, **kwargs): # noqa: D102
import anesthetic.io
anesthetic.io.to_hdf(path_or_buf, key, self, *args, **kwargs)
import anesthetic.read.hdf
return anesthetic.read.hdf.to_hdf(path_or_buf, key, self,
*args, **kwargs)


class MCMCSamples(Samples):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from anesthetic.read.cobaya import read_cobaya
from anesthetic.read.multinest import read_multinest
import pandas._testing as tm
from anesthetic.io import HDFStore, read_hdf
from anesthetic.read.hdf import HDFStore, read_hdf
try:
import getdist
except ImportError:
Expand Down

0 comments on commit f432f69

Please sign in to comment.