Skip to content

Commit

Permalink
Merge pull request #245 from AaronDJohnson/update_ci
Browse files Browse the repository at this point in the history
Update CI
  • Loading branch information
AaronDJohnson authored Dec 9, 2024
2 parents 6887f81 + bc3d918 commit a52eed4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.7, 3.8, 3.9, '3.10']
os: [ubuntu-latest, macos-13]
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- name: Checkout repository
Expand Down Expand Up @@ -53,6 +53,7 @@ jobs:
- name: Test with pytest
run: make test
- name: Codecov
if: runner.os != 'macOS'
uses: codecov/codecov-action@v3
#with:
# fail_ci_if_error: true
Expand Down
6 changes: 3 additions & 3 deletions enterprise_extensions/empirical_distr.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
sklearn_available=True
except ModuleNotFoundError:
sklearn_available=False
from scipy.interpolate import interp1d, interp2d
from scipy.interpolate import interp1d, RegularGridInterpolator

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -173,9 +173,9 @@ def __init__(self, param_names, samples, minvals=None, maxvals=None, bandwidth=0
xvals = np.linspace(minvals[0], maxvals[0], num=nbins)
yvals = np.linspace(minvals[1], maxvals[1], num=nbins)
self._Nbins = [yvals.size for ii in range(xvals.size)]
scores = np.array([self.kde.score(np.array([xvals[ii], yvals[jj]]).reshape((1, 2))) for ii in range(xvals.size) for jj in range(yvals.size)])
scores = np.array([self.kde.score(np.array([xvals[ii], yvals[jj]]).reshape((1, 2))) for ii in range(xvals.size) for jj in range(yvals.size)]).reshape(len(xvals), len(yvals))
# interpolate within prior
self._logpdf = interp2d(xvals, yvals, scores, kind='linear', fill_value=-1000)
self._logpdf = RegularGridInterpolator((xvals, yvals), scores, method='linear', bounds_error=False, fill_value=-1000)

def draw(self):
params = self.kde.sample(1).T
Expand Down

0 comments on commit a52eed4

Please sign in to comment.