Skip to content

Commit

Permalink
Fastkde2 (#352)
Browse files Browse the repository at this point in the history
* api fix (camelCase to snake_case)

* don't use xarray

* version bump
  • Loading branch information
AdamOrmondroyd authored Nov 14, 2023
1 parent 3dac5ad commit 1a035b7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
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.5.1
:Version: 2.5.2
: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.5.1'
__version__ = '2.5.2'
10 changes: 6 additions & 4 deletions anesthetic/kde.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ def fastkde_1d(d, xmin=None, xmax=None):
d_ = mirror_1d(d, xmin, xmax)
with warnings.catch_warnings():
warnings.simplefilter("ignore")
p, x = fastKDE.pdf(d_, axisExpansionFactor=f,
numPointsPerSigma=10*(2-f))
p, x = fastKDE.pdf(d_, axis_expansion_factor=f,
num_points_per_sigma=10*(2-f),
use_xarray=False)
p *= 2-f

if xmin is not None:
Expand Down Expand Up @@ -79,8 +80,9 @@ def fastkde_2d(d_x, d_y, xmin=None, xmax=None, ymin=None, ymax=None):

with warnings.catch_warnings():
warnings.simplefilter("ignore")
p, (x, y) = fastKDE.pdf(d_x_, d_y_, axisExpansionFactor=f,
numPointsPerSigma=10*(2-f[0])*(2-f[1]))
p, (x, y) = fastKDE.pdf(d_x_, d_y_, axis_expansion_factor=f,
num_points_per_sigma=10*(2-f[0])*(2-f[1]),
use_xarray=False)

p *= (2-f[0])
p *= (2-f[1])
Expand Down

0 comments on commit 1a035b7

Please sign in to comment.