question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JAX_ENABLE_X64 norm.cdf inconsistent with scipy

See original GitHub issue

For JAX_ENABLE_X64=1 on CPU,

from scipy.stats import norm
print(norm.cdf(np.array(1, 'float64')))

from jax.scipy.stats import norm
print(norm.cdf(np.array(1, 'float64')))

gives

0.8413447460685429
0.8413447251486219

The accuracy seems to be that of float32, which is causing problems for me. Shouldn’t the results be much closer, i. e. within 1e-12 tolerance?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
hawkinspcommented, Aug 14, 2019

Yes, that’s right. You either need to build jaxlib yourself or wait for us to make a binary wheel release. I merged PR #1182, so closing this bug.

1reaction
pifon2acommented, Aug 14, 2019

@JuliusKunze https://github.com/google/jax/pull/1182 this PR bumps the version of XLA. Try it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

scipy.stats.norm — SciPy v1.9.3 Manual
As an instance of the rv_continuous class, norm object inherits from it a collection of generic methods (see below for the full list),...
Read more >
jax.scipy.stats.norm.cdf - JAX documentation
jax.scipy.stats.norm.cdf# ... Cumulative distribution function of the given RV. LAX-backend implementation of scipy.stats._distn_infrastructure.cdf() . Original ...
Read more >
Python Kolmogorov-Smirnov (KS) Test Inconsistent Results
I want to be able to replicate this test using an array argument for the "cdf" argument. Any help as to what I...
Read more >
Fit distribution to data with uneven bins python - Cross Validated
I would assume that this data would follow a normal distribution, ... binwidth = np.diff(bins) return N*(scipy.stats.norm.cdf(bins[1:], mu, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found