Skip to content

Commit 99063da

Browse files
twieckiMario De Frutos Dieguez
authored and
Mario De Frutos Dieguez
committed
Remove float128 dtype (pymc-devs#4514)
* Remove float128 dtype which does not exist on Windows and newer OSX versions and furthermore does not to be properly supported even if it does exist. * Add float128 to release-notes. Add link to memoization PR. * Remove unused imports.
1 parent c1efb7a commit 99063da

File tree

3 files changed

+9
-17
lines changed

3 files changed

+9
-17
lines changed

RELEASE-NOTES.md

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
- `pm.make_shared_replacements` now retains broadcasting information which fixes issues with Metropolis samplers (see [#4492](https://github.com/pymc-devs/pymc3/pull/4492)).
2020

2121
**Release manager** for 3.11.2: Michael Osthege ([@michaelosthege](https://github.com/michaelosthege))
22+
- The `pymc3.memoize` module was removed and replaced with `cachetools`. The `hashable` function and `WithMemoization` class were moved to `pymc3.util` (see [#4509](https://github.com/pymc-devs/pymc3/pull/4509)).
23+
- Remove float128 dtype support (see [#4514](https://github.com/pymc-devs/pymc3/pull/4514)).
2224

2325
## PyMC3 3.11.1 (12 February 2021)
2426

pymc3/distributions/dist_math.py

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020 The PyMC Developers
1+
# Copyright 2021 The PyMC Developers
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -17,8 +17,8 @@
1717
1818
@author: johnsalvatier
1919
"""
20-
import platform
21-
20+
import aesara
21+
import aesara.tensor as aet
2222
import numpy as np
2323
import scipy.linalg
2424
import scipy.stats
@@ -44,11 +44,6 @@
4444
dtype: (np.nextafter(0, 1, dtype=dtype), np.nextafter(1, 0, dtype=dtype))
4545
for dtype in ["float16", "float32", "float64"]
4646
}
47-
if platform.system() in ["Linux", "Darwin"]:
48-
_beta_clip_values["float128"] = (
49-
np.nextafter(0, 1, dtype="float128"),
50-
np.nextafter(1, 0, dtype="float128"),
51-
)
5247

5348

5449
def bound(logp, *conditions, **kwargs):

pymc3/tests/test_dist_math.py

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020 The PyMC Developers
1+
# Copyright 2021 The PyMC Developers
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -11,8 +11,8 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
import sys
15-
14+
import aesara
15+
import aesara.tensor as aet
1616
import numpy as np
1717
import numpy.testing as npt
1818
import pytest
@@ -237,12 +237,7 @@ def test_grad(self):
237237
verify_grad(i0e, [[[0.5, -2.0]]])
238238

239239

240-
@pytest.mark.parametrize(
241-
"dtype",
242-
["float16", "float32", "float64", "float128"]
243-
if sys.platform != "win32"
244-
else ["float16", "float32", "float64"],
245-
)
240+
@pytest.mark.parametrize("dtype", ["float16", "float32", "float64"])
246241
def test_clipped_beta_rvs(dtype):
247242
# Verify that the samples drawn from the beta distribution are never
248243
# equal to zero or one (issue #3898)

0 commit comments

Comments
 (0)