From 15802cb073c9c87866382b63cb0310bec0957e5c Mon Sep 17 00:00:00 2001 From: Santatic Date: Thu, 23 May 2024 08:43:22 +0700 Subject: [PATCH] Fix python 3.10 error: TypeError: 'float' object cannot be interpreted as an integer --- blackbox/blackbox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blackbox/blackbox.py b/blackbox/blackbox.py index 2a5b4ab..7934d65 100644 --- a/blackbox/blackbox.py +++ b/blackbox/blackbox.py @@ -162,7 +162,7 @@ def compute_volume_unit_ball(d: int) -> float: float: volume """ if d % 2 == 0: - v1 = np.pi ** (d / 2) / np.math.factorial(d / 2) + v1 = np.pi ** (d / 2) / np.math.factorial(d // 2) else: v1 = ( 2