Skip to content

Remove float128 support (backport) #4834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
+ 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)).
+ Enable documentation generation via ReadTheDocs for upcoming v3 releases. (see [#4805](https://github.com/pymc-devs/pymc3/pull/4805)).
+ 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