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

Update CI #245

Merged
merged 7 commits into from
Dec 9, 2024
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
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
Loading