Skip to content

TypeError: data type "float128" not understood using Raspberry Pi4 #4443

Closed
@andrybicio

Description

@andrybicio

Importing pym3 results in error and cannot find any type "float128". I installed everything needed onto my RaspBerry 4 using pip3.

Description of your problem

Please provide a minimal, self-contained, and reproducible example.

import pymc3 as pm

Please provide the full traceback.

TypeError                                 Traceback (most recent call last)
<ipython-input-5-4f5a3b962f49> in <module>
     11 
     12 
---> 13 import pymc3 as pm
     14 import pandas as pd
     15 import covsirphy as cs

~/.local/lib/python3.7/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 *

~/.local/lib/python3.7/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

~/.local/lib/python3.7/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

~/.local/lib/python3.7/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

~/.local/lib/python3.7/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

~/.local/lib/python3.7/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 (

~/.local/lib/python3.7/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     alltrue_elemwise,

~/.local/lib/python3.7/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

Please provide any additional information below.
I tried also

import numpy
a = numpy.float128(3)

and the output is

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-10-d07c2c9201f9> in <module>
      1 import numpy
----> 2 a = numpy.float128(3)

~/.local/lib/python3.7/site-packages/numpy/__init__.py in __getattr__(attr)
    218             else:
    219                 raise AttributeError("module {!r} has no attribute "
--> 220                                      "{!r}".format(__name__, attr))
    221 
    222         def __dir__():

AttributeError: module 'numpy' has no attribute 'float128'

I'm pretty sure I cannot do anything and this is something hardware related, since the OS is 32 bit, but still I'm giving it a try.

Versions and main components

  • PyMC3 Version: 3.11.0
  • Theano Version: 1.1.0
  • Python Version: 3.7.3
  • numpy Version: 1.18.5
  • Operating system: Raspbian GNU/Linux 10 (buster)
  • How did you install PyMC3: pip

in addition

uname -a

returns output

Linux raspberrypi 5.4.51-v7l+ #1333 SMP Mon Aug 10 16:51:40 BST 2020 armv7l GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions