Open XZLeo opened 1 year ago
Using pymc3
will cause numpy problem:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[2], line 4
2 import pandas as pd
3 import numpy as np
----> 4 import pymc3 as pm
6 # source files
7 import sys
File [~/miniconda3/envs/pymc3_env/lib/python3.10/site-packages/pymc3/__init__.py:23](https://vscode-remote+ssh-002dremote-002bsmaug.vscode-resource.vscode-cdn.net/home/zilxi06/calibrated_regression/~/miniconda3/envs/pymc3_env/lib/python3.10/site-packages/pymc3/__init__.py:23)
20 import platform
22 import semver
---> 23 import theano
25 _log = logging.getLogger("pymc3")
27 if not logging.root.handlers:
File [~/miniconda3/envs/pymc3_env/lib/python3.10/site-packages/theano/__init__.py:83](https://vscode-remote+ssh-002dremote-002bsmaug.vscode-resource.vscode-cdn.net/home/zilxi06/calibrated_regression/~/miniconda3/envs/pymc3_env/lib/python3.10/site-packages/theano/__init__.py:83)
75 # This is the api version for ops that generate C code. External ops
76 # might need manual changes if this number goes up. An undefined
77 # __api_version__ can be understood to mean api version 0.
78 #
79 # This number is not tied to the release version and should change
80 # very rarely.
81 __api_version__ = 1
---> 83 from theano import scalar, tensor
...
AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
First of all, thanks for the illustrative notebook. I'm trying to replicate the result but maybe using a later version of pymc. I got
If I call
pymc
instead, there will be other bugs. Many thanks!