Skip to content

Commit

Permalink
fix test failures for float32
Browse files Browse the repository at this point in the history
  • Loading branch information
zoj613 committed Jul 10, 2021
1 parent 7b8d33b commit 549cc63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:
run: |
conda activate pymc3-dev-py37
pip install -e .
pip install --pre -U polyagamma>=1.3.2b2
pip install --pre -U polyagamma
python --version
- name: Run tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions pymc3/distributions/continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -4089,7 +4089,7 @@ def rng_fn(cls, rng, h, z, size=None):
"""
# handle the kind of rng passed to the sampler
bg = rng._bit_generator if isinstance(rng, np.random.RandomState) else rng
return random_polyagamma(h, z, size=size, random_state=bg)
return random_polyagamma(h, z, size=size, random_state=bg).astype(aesara.config.floatX)


polyagamma = PolyaGammaRV()
Expand All @@ -4115,7 +4115,7 @@ def perform(self, node, ins, outs):
polyagamma_pdf(x, h, z, return_log=True)
if self.get_pdf
else polyagamma_cdf(x, h, z, return_log=True)
)
).astype(aesara.config.floatX)


class PolyaGamma(PositiveContinuous):
Expand Down

0 comments on commit 549cc63

Please sign in to comment.