Open
Description
When operating from dowhy import gcm
, it reported: No module named 'numpy.dual'.
Details are below:
ModuleNotFoundError Traceback (most recent call last)
Cell In[26], line 1
----> 1 from dowhy import gcm
File d:\\PycharmProjects\\pythonProjectTest\\.venv\\Lib\\site-packages\\dowhy\\gcm\\__init__.py:12
10 from .fitting_sampling import fit, draw_samples
11 from .graph import StochasticModel, ConditionalStochasticModel, FunctionalCausalModel, DirectedGraph, is_root_node
---> 12 from .influence import arrow_strength, intrinsic_causal_influence
13 from .stochastic_models import EmpiricalDistribution, BayesianGaussianMixtureDistribution, ScipyDistribution
14 from .whatif import interventional_samples, counterfactual_samples, average_causal_effect
File d:\\PycharmProjects\\pythonProjectTest\\.venv\\Lib\\site-packages\\dowhy\\gcm\\influence.py:25
23 from dowhy.gcm.shapley import ShapleyConfig, estimate_shapley_values
24 from dowhy.gcm.stats import marginal_expectation
---> 25 from dowhy.gcm.uncertainty import estimate_entropy_of_probabilities, estimate_variance
26 from dowhy.gcm.util.general import shape_into_2d, set_random_seed, is_categorical
28 _logger = logging.getLogger(__name__)
File d:\\PycharmProjects\\pythonProjectTest\\.venv\\Lib\\site-packages\\dowhy\\gcm\\uncertainty.py:7
1 \"\"\"Functions to estimate uncertainties such as entropy, KL divergence etc.
2
3 Functions in this module should be considered experimental, meaning there might be breaking API changes in the future.
4 \"\"\"
6 import numpy as np
----> 7 from numpy.dual import det
8 from scipy.special import digamma
9 from scipy.stats import entropy
ModuleNotFoundError: No module named 'numpy.dual'"
numpy.dual is dropped from numpy since 1.20.0(https://numpy.org/doc/stable/release/1.20.0-notes.html#deprecation-of-numpy-dual)
dowhy version: 0.8