From 76a3c798c7a210c7bc9bedc70c75506a892a7f96 Mon Sep 17 00:00:00 2001 From: lanctot Date: Thu, 4 Jul 2024 20:13:50 -0400 Subject: [PATCH] Update heuristic_payoff_table.py: replace np.math.factorial with math.factorial --- open_spiel/python/egt/heuristic_payoff_table.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/open_spiel/python/egt/heuristic_payoff_table.py b/open_spiel/python/egt/heuristic_payoff_table.py index 4b839b6158..1b9cca86a6 100644 --- a/open_spiel/python/egt/heuristic_payoff_table.py +++ b/open_spiel/python/egt/heuristic_payoff_table.py @@ -16,6 +16,7 @@ import abc import collections +import math import numpy as np @@ -501,7 +502,7 @@ def _multinomial_coefficients(distributions): Args: distributions: The distributions table [num_rows, num_strategies]. """ - v_factorial = np.vectorize(np.math.factorial) + v_factorial = np.vectorize(math.factorial) # Multinomial coefficients (one per distribution Ni). # ( P ) # ( Ni1, Ni1, ... Nik )