Skip to content

Commit

Permalink
Remove float128 dtype (pymc-devs#4514)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
twiecki authored and ricardoV94 committed Mar 10, 2021
1 parent 942ec05 commit 830729b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
3 changes: 2 additions & 1 deletion RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
+ ...

### Maintenance
- The `pymc3.memoize` module was removed and replaced with `cachetools`. The `hashable` function and `WithMemoization` class were moved to `pymc3.util`.
- 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)).
- Remove float128 dtype support (see [#4514](https://github.com/pymc-devs/pymc3/pull/4514)).

## PyMC3 3.11.1 (12 February 2021)

Expand Down
9 changes: 1 addition & 8 deletions pymc3/distributions/dist_math.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020 The PyMC Developers
# Copyright 2021 The PyMC Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -17,8 +17,6 @@
@author: johnsalvatier
"""
import platform

import aesara
import aesara.tensor as aet
import numpy as np
Expand All @@ -44,11 +42,6 @@
dtype: (np.nextafter(0, 1, dtype=dtype), np.nextafter(1, 0, dtype=dtype))
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"),
)


def bound(logp, *conditions, **kwargs):
Expand Down
11 changes: 2 additions & 9 deletions pymc3/tests/test_dist_math.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020 The PyMC Developers
# Copyright 2021 The PyMC Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -11,8 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sys

import aesara
import aesara.tensor as aet
import numpy as np
Expand Down Expand Up @@ -239,12 +237,7 @@ def test_grad(self):
verify_grad(i0e, [[[0.5, -2.0]]])


@pytest.mark.parametrize(
"dtype",
["float16", "float32", "float64", "float128"]
if sys.platform != "win32"
else ["float16", "float32", "float64"],
)
@pytest.mark.parametrize("dtype", ["float16", "float32", "float64"])
def test_clipped_beta_rvs(dtype):
# Verify that the samples drawn from the beta distribution are never
# equal to zero or one (issue #3898)
Expand Down

0 comments on commit 830729b

Please sign in to comment.