Skip to content

Commit 9343436

Browse files
committed
Remove PolyaGamma pin and add to conda env
1 parent b7b969a commit 9343436

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

.github/workflows/mypy.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ jobs:
2626
- name: Install-pymc and mypy dependencies
2727
run: |
2828
pip install -e .
29-
pip install --pre -U polyagamma
3029
python --version
3130
- name: Run mypy
3231
run: |

.github/workflows/tests.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ jobs:
158158
- name: Install-pymc
159159
run: |
160160
pip install -e .
161-
# TODO: https://github.com/pymc-devs/pymc/issues/7417
162-
pip install --pre -U 'polyagamma<1.3.7'
163161
python --version
164162
micromamba list
165163
- name: Run tests
@@ -210,7 +208,6 @@ jobs:
210208
- name: Install-pymc
211209
run: |
212210
pip install -e .
213-
pip install --pre -U 'polyagamma<1.3.7'
214211
python --version
215212
micromamba list
216213
- name: Run tests
@@ -363,7 +360,6 @@ jobs:
363360
- name: Install-pymc
364361
run: |
365362
pip install -e .
366-
pip install --pre -U 'polyagamma<1.3.7'
367363
python --version
368364
micromamba list
369365
- name: Run tests

conda-envs/environment-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ dependencies:
2626
- myst-nb<=1.0.0
2727
- numpydoc
2828
- pre-commit>=2.8.0
29+
- polyagamma
2930
- pytest-cov>=2.5
3031
- pytest>=3.0
3132
- rich>=13.7.1
@@ -35,7 +36,6 @@ dependencies:
3536
- sphinx>=1.5
3637
- sphinxext-rediraffe
3738
- watermark
38-
- polyagamma
3939
- sphinx-remove-toctrees
4040
- mypy=1.5.1
4141
- types-cachetools

conda-envs/environment-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ dependencies:
1313
- numpy>=1.25.0
1414
- pandas>=0.24.0
1515
- pip
16+
- polyagamma
1617
- pytensor>=2.26.2,<2.28
1718
- python-graphviz
1819
- networkx

conda-envs/windows-environment-dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ dependencies:
2424
- ipython>=7.16
2525
- myst-nb<=1.0.0
2626
- numpydoc
27+
- polyagamma
2728
- pre-commit>=2.8.0
2829
- pytest-cov>=2.5
2930
- pytest>=3.0

conda-envs/windows-environment-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ dependencies:
1414
- numpy>=1.25.0
1515
- pandas>=0.24.0
1616
- pip
17+
- polyagamma
1718
- pytensor>=2.26.2,<2.28
1819
- python-graphviz
1920
- networkx

tests/distributions/test_continuous.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2440,7 +2440,9 @@ def test_rng_different_shapes(self):
24402440
)
24412441
class TestPolyaGamma(BaseTestDistributionRandom):
24422442
def polyagamma_rng_fn(self, size, h, z, rng):
2443-
return random_polyagamma(h, z, size=size, random_state=rng._bit_generator)
2443+
# Polyagamma returns different values if inputs have explicit broadcasted dims
2444+
# Which PyTensor RVs always do when size is not None.
2445+
return random_polyagamma(np.atleast_1d(h), np.atleast_1d(z), size=size, random_state=rng)
24442446

24452447
pymc_dist = pm.PolyaGamma
24462448
pymc_dist_params = {"h": 1.0, "z": 0.0}

0 commit comments

Comments
 (0)