Comments (8)
I'm getting this on MacOS (M1 hardware) using miniforge. This is with NumPy 1.21.0.
ImportError while loading conftest '/Users/cfonnesbeck/GitHub/pymc3/pymc3/tests/conftest.py'.
pymc3/__init__.py:82: in <module>
from pymc3 import gp, ode, sampling
pymc3/gp/__init__.py:16: in <module>
from pymc3.gp.gp import TP, Latent, LatentKron, Marginal, MarginalKron, MarginalSparse
pymc3/gp/gp.py:25: in <module>
from pymc3.distributions import draw_values
pymc3/distributions/__init__.py:15: in <module>
from pymc3.distributions import shape_utils, timeseries, transforms
pymc3/distributions/timeseries.py:21: in <module>
from pymc3.distributions import distribution, multivariate
pymc3/distributions/multivariate.py:35: in <module>
from pymc3.distributions.continuous import ChiSquared, Normal
pymc3/distributions/continuous.py:30: in <module>
from pymc3.distributions.dist_math import (
pymc3/distributions/dist_math.py:49: in <module>
np.nextafter(0, 1, dtype="float128"),
E TypeError: data type 'float128' not understood
from pymc-resources.
I'm seeing this also. The most recent release of pymc3 that's available through conda on m1 is 3.9.3, because the versions of theano-pymc required for later versions of pymc3 aren't available for m1. At least that's what conda is telling me.
I was able to workaround this by downgrading pymc3 to 3.8.
Edit: theano-pymc and therefore pymc3 3.11.4 are now available on conda for m1, so I think this issue is resolved.
from pymc-resources.
For reference, on macOS ARM64 (Apple Silicon M1), float128 is not supported on numpy (at least when installed from conda-forge):
>>> import numpy as np
>>> np.dtype("float128")
Traceback (most recent call last):
File "<ipython-input-5-10c53c28af62>", line 1, in <module>
np.dtype("float128")
TypeError: data type 'float128' not understood
So it would be great to make float128 support an optional requirement for PyMC3 and pymc.
from pymc-resources.
Hi,
That's strange -- it works for me 🤔
Do you know which versions of python and numpy are on your env?
from pymc-resources.
Hi
Thanks for your reply. I just checked and my Python is at 3.8.2. I suppose it's too recent? I directly installed from the yml file in the repo. It's strange. Numpy is 1.18.4
from pymc-resources.
Oh damn! It's a windows bug. Numpy under windows doesn't have a float128
, we should use the longdouble
dtype instead. That will be equal to float128
on Linux but it will equal float64
on windows. It we could even just remove float128
. @karnn, could you please open an issue on pymc3? I'll fix it in the next few days.
from pymc-resources.
These OS bugs keep coming 🤦 It's indeed related to your latest PR @lucianopaz.
Assign me to review the fix when you submit it -- or tell me if you don't have time in the coming days and I can take a stab (looks pretty simple).
Closing this in favor of the issue on PyMC repo.
from pymc-resources.
Which version are you using? If I recall correctly our next release dos not use float128 anywhere, so it should not be a problem.
from pymc-resources.
Related Issues (20)
- Add Bayes Rules Chapter 2 HOT 1
- Fix up env for bayes rules
- Chapter 5 - Code 5.29 should use log(mass) HOT 3
- Chp_02.ipynb, import statement HOT 2
- Conflicting chain size for code block 4.59
- causalgraphicalmodels import error with Python 3.10 HOT 5
- Chapter 5 import error when running pymc model HOT 9
- Chp_11 notebook - models not running - Got error No model on context stack
- Incompatibilities with Python 3.10 for the aesara 2.6.6 and causalgraphicalmodels-0.0.4 packages.
- issue importing pymc3 "cannot import as scalar from numpy"
- Error for code snippet 8.8 - NotImplementedError HOT 3
- Adding exposition about PyMC and Arviz to the Rethinking_2 code.
- Type error - Code 15.12 - pymc v4 HOT 4
- Rethinking_2/Chp_02.ipynb: Mistake in quadratic approximation ("Code 2.6")? HOT 5
- Resources/Rethinking_2/Chp_04.ipynb: The hyperlink in Code 4.26 is broken HOT 1
- Gender Categories in Chapter 4
- rethinking chpater5 notebook: 5.34 ValueError: shape mismatch: objects cannot be broadcast to a single shape. HOT 2
- Using pymc (v5) to run rethinking notebooks HOT 1
- Sampling performance b-splines model chapter 04 HOT 1
- pre-commit is failing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymc-resources.