Skip to content

Commit

Permalink
Remove float128 dtype
Browse files Browse the repository at this point in the history
Backport of 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.
  • Loading branch information
twiecki authored and michaelosthege committed Jul 2, 2021
1 parent bf83ae6 commit 11929fd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
3 changes: 2 additions & 1 deletion RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
+ A deprecation warning from the `semver` package we use for checking backend compatibility was dealt with (see [#4547](https://github.com/pymc-devs/pymc3/pull/4547)).
+ `theano.printing.pydotprint` is now hotfixed upon import (see [#4594](https://github.com/pymc-devs/pymc3/pull/4594)).
+ Fix bug in the computation of the log pseudolikelihood values (SMC-ABC). (see [#4672](https://github.com/pymc-devs/pymc3/pull/4672)).
+ Fix `LKJCorr.random` method to work with `pm.sample_prior_predictive`. (see [#4780](https://github.com/pymc-devs/pymc3/pull/4780))
+ Fix `LKJCorr.random` method to work with `pm.sample_prior_predictive`. (see [#4780](https://github.com/pymc-devs/pymc3/pull/4780)).
+ Remove `float128` dtype support (see [#4834](https://github.com/pymc-devs/pymc3/pull/4834)).

### New Features
+ Generalized BART, bounded distributions like Binomial and Poisson can now be used as likelihoods (see [#4675](https://github.com/pymc-devs/pymc3/pull/4675), [#4709](https://github.com/pymc-devs/pymc3/pull/4709) and
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 numpy as np
import scipy.linalg
import scipy.stats
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
12 changes: 2 additions & 10 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 @@ -10,9 +10,6 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# 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 numpy as np
import numpy.testing as npt
import pytest
Expand Down Expand Up @@ -237,12 +234,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 11929fd

Please sign in to comment.