Code Monkey home page Code Monkey logo

Comments (8)

fonnesbeck avatar fonnesbeck commented on May 29, 2024 13

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.

elbamos avatar elbamos commented on May 29, 2024 5

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.

ogrisel avatar ogrisel commented on May 29, 2024 2

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.

AlexAndorra avatar AlexAndorra commented on May 29, 2024

Hi,
That's strange -- it works for me 🤔
Do you know which versions of python and numpy are on your env?

from pymc-resources.

karnn avatar karnn commented on May 29, 2024

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.

lucianopaz avatar lucianopaz commented on May 29, 2024

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.

AlexAndorra avatar AlexAndorra commented on May 29, 2024

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.

ricardoV94 avatar ricardoV94 commented on May 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.