Skip to content

pytest fails in float32 #4750

Closed
Closed
@larryshamalama

Description

@larryshamalama

Following my (slow and steady) progress here, check_logcdf in test_distributions.py seems to be having issues only in float32. Below is a summary of the issue in code.

import aesara
import pymc3 as pm
import scipy.stats.distributions as sp

# scipy reference
print(sp.chi2.logcdf(0.01, 100))
# output: -413.39853723533787

# float64
with pm.Model() as model:
    print(pm.ChiSquared.logcdf(0.01, 100).eval())
# output: -413.39853723533787

# float32
aesara.config.floatX = "float32"
with pm.Model() as model:
    print(pm.ChiSquared.logcdf(0.01, 100).eval())
# output: -inf

notebook available here

Happy to hear any pointers or suggestions!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions