Skip to content

Commit

Permalink
Drop support for float128 outside of linux and mac (#3930)
Browse files Browse the repository at this point in the history
* Drop support for float128 outside of linux and mac

* Improve release notes
  • Loading branch information
lucianopaz authored May 20, 2020
1 parent 1ed0478 commit 9e8a20d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
pointwise log likelihood (see [#3883](https://github.com/pymc-devs/pymc3/pull/3883)).
- The multiprocessing start method on MacOS is now set to "forkserver", to avoid crashes (see issue [#3849](https://github.com/pymc-devs/pymc3/issues/3849), solved by [#3919](https://github.com/pymc-devs/pymc3/pull/3919)).
- Forced the `Beta` distribution's `random` method to generate samples that are in the open interval $(0, 1)$, i.e. no value can be equal to zero or equal to one (issue [#3898](https://github.com/pymc-devs/pymc3/issues/3898) fixed by [#3924](https://github.com/pymc-devs/pymc3/pull/3924)).
- Fixed an issue that happened on Windows, that was introduced by the clipped beta distribution rvs function ([#3924](https://github.com/pymc-devs/pymc3/pull/3924)). Windows does not support the `float128` dtype, but we had assumed that it had to be available. The solution was to only support `float128` on Linux and Darwin systems (see issue [#3929](https://github.com/pymc-devs/pymc3/issues/3849) fixed by [#3930](https://github.com/pymc-devs/pymc3/pull/3930)).

### Deprecations
- Remove `sample_ppc` and `sample_ppc_w` that were deprecated in 3.6.
Expand Down
8 changes: 7 additions & 1 deletion pymc3/distributions/dist_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
@author: johnsalvatier
'''
import platform
import numpy as np
import scipy.linalg
import scipy.stats
Expand All @@ -36,8 +37,13 @@
c = - .5 * np.log(2. * np.pi)
_beta_clip_values = {
dtype: (np.nextafter(0, 1, dtype=dtype), np.nextafter(1, 0, dtype=dtype))
for dtype in ["float16", "float32", "float64", "float128"]
for dtype in ["float16", "float32", "float64"]
}
if platform.system() in ["Linux", "Darwin"]:
_beta_clip_values["float128"] = (
np.nextafter(0, 1, dtype="float128"),
np.nextafter(1, 0, dtype="float128")
)



Expand Down

0 comments on commit 9e8a20d

Please sign in to comment.