Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change np.math for math for compatibility #1273

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dowhy/gcm/falsify.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""This module provides functionality to falsify a user-given DAG given observed data."""

import math
import warnings
from dataclasses import dataclass, field
from enum import Enum, auto
Expand Down Expand Up @@ -932,7 +933,7 @@ def __init__(self, causal_graph: DirectedGraph, exclude_original_order: bool, n_
self.causal_graph = causal_graph
self.exclude_original_order = exclude_original_order
self.n_permutations = n_permutations
self.max_perms = np.math.factorial(self.causal_graph.number_of_nodes()) - int(self.exclude_original_order)
self.max_perms = math.factorial(self.causal_graph.number_of_nodes()) - int(self.exclude_original_order)

if n_permutations == -1 or n_permutations > self.max_perms:
self.it = self.iter_all_permutations()
Expand Down