Skip to content

Commit 9e8a20d

Browse files
authored
Drop support for float128 outside of linux and mac (#3930)
* Drop support for float128 outside of linux and mac * Improve release notes
1 parent 1ed0478 commit 9e8a20d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

RELEASE-NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
pointwise log likelihood (see [#3883](https://github.com/pymc-devs/pymc3/pull/3883)).
2929
- 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)).
3030
- 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)).
31+
- 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)).
3132

3233
### Deprecations
3334
- Remove `sample_ppc` and `sample_ppc_w` that were deprecated in 3.6.

pymc3/distributions/dist_math.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
1818
@author: johnsalvatier
1919
'''
20+
import platform
2021
import numpy as np
2122
import scipy.linalg
2223
import scipy.stats
@@ -36,8 +37,13 @@
3637
c = - .5 * np.log(2. * np.pi)
3738
_beta_clip_values = {
3839
dtype: (np.nextafter(0, 1, dtype=dtype), np.nextafter(1, 0, dtype=dtype))
39-
for dtype in ["float16", "float32", "float64", "float128"]
40+
for dtype in ["float16", "float32", "float64"]
4041
}
42+
if platform.system() in ["Linux", "Darwin"]:
43+
_beta_clip_values["float128"] = (
44+
np.nextafter(0, 1, dtype="float128"),
45+
np.nextafter(1, 0, dtype="float128")
46+
)
4147

4248

4349

0 commit comments

Comments
 (0)