Skip to content

Float type 'float128' causes issues and is unnecessary #4513

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

Closed
anentropic opened this issue Mar 9, 2021 · 1 comment · Fixed by #4514
Closed

Float type 'float128' causes issues and is unnecessary #4513

anentropic opened this issue Mar 9, 2021 · 1 comment · Fixed by #4514
Labels
bug macOS macOS related

Comments

@anentropic
Copy link

I spent a while getting all the prerequisites in place via homebrew and pip, but was able to apparently install pymc3 successfully:

Successfully installed arviz-0.11.2 cftime-1.4.1 cycler-0.10.0 dill-0.3.3 fastprogress-1.0.0 filelock-3.0.12 matplotlib-3.3.4 netcdf4-1.5.6 pandas-1.2.3 patsy-0.5.1 pillow-8.1.2 pymc3-3.11.1 python-dateutil-2.8.1 pytz-2021.1 six-1.15.0 theano-pymc-1.1.2 typing-extensions-3.7.4.3 xarray-0.17.0

However I get an error on import:

In [1]: import pymc3 as pm

TypeError                                 Traceback (most recent call last)
<ipython-input-1-2e5c536b7c65> in <module>
----> 1 import pymc3 as pm

~/Documents/Dev/myproject/.venv/lib/python3.9/site-packages/pymc3/__init__.py in <module>
     39 __set_compiler_flags()
     40 
---> 41 from pymc3 import gp, ode, sampling
     42 from pymc3.backends import load_trace, save_trace
     43 from pymc3.backends.tracetab import *

~/Documents/Dev/myproject/.venv/lib/python3.9/site-packages/pymc3/gp/__init__.py in <module>
     14 
     15 from pymc3.gp import cov, mean, util
---> 16 from pymc3.gp.gp import TP, Latent, LatentKron, Marginal, MarginalKron, MarginalSparse

~/Documents/Dev/myproject/.venv/lib/python3.9/site-packages/pymc3/gp/gp.py in <module>
     23 import pymc3 as pm
     24 
---> 25 from pymc3.distributions import draw_values
     26 from pymc3.gp.cov import Constant, Covariance
     27 from pymc3.gp.mean import Zero

~/Documents/Dev/myproject/.venv/lib/python3.9/site-packages/pymc3/distributions/__init__.py in <module>
     13 #   limitations under the License.
     14 
---> 15 from pymc3.distributions import shape_utils, timeseries, transforms
     16 from pymc3.distributions.bart import BART
     17 from pymc3.distributions.bound import Bound

~/Documents/Dev/myproject/.venv/lib/python3.9/site-packages/pymc3/distributions/timeseries.py in <module>
     19 from theano import scan
     20 
---> 21 from pymc3.distributions import distribution, multivariate
     22 from pymc3.distributions.continuous import Flat, Normal, get_tau_sigma
     23 from pymc3.distributions.shape_utils import to_tuple

~/Documents/Dev/myproject/.venv/lib/python3.9/site-packages/pymc3/distributions/multivariate.py in <module>
     33 
     34 from pymc3.distributions import transforms
---> 35 from pymc3.distributions.continuous import ChiSquared, Normal
     36 from pymc3.distributions.dist_math import bound, factln, logpow
     37 from pymc3.distributions.distribution import (

~/Documents/Dev/myproject/.venv/lib/python3.9/site-packages/pymc3/distributions/continuous.py in <module>
     28 
     29 from pymc3.distributions import transforms
---> 30 from pymc3.distributions.dist_math import (
     31     SplineWrapper,
     32     betaln,

~/Documents/Dev/myproject/.venv/lib/python3.9/site-packages/pymc3/distributions/dist_math.py in <module>
     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     )

TypeError: data type 'float128' not understood

Versions and main components

  • PyMC3 Version: 3.11.1
  • Aesara Version: ???
  • Python Version: 3.9.1
  • Operating system: macOS 11.2.2
  • How did you install PyMC3: pip
@twiecki twiecki added the bug label Mar 9, 2021
@twiecki
Copy link
Member

twiecki commented Mar 9, 2021

Thanks for the report. I did some quick googling at it seems that doing anything with float128 is basically pointless (e.g. https://stackoverflow.com/questions/29820829/cannot-use-128bit-float-in-python-on-64bit-architecture) so I'm not sure why that's even in here but can probably be removed/changed.

@twiecki twiecki changed the title pymc3 on Apple Silicon: data type 'float128' not understood Float type 'float128' causes issues and is unnecessary Mar 9, 2021
@twiecki twiecki mentioned this issue Mar 9, 2021
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug macOS macOS related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants