Random changes.
[python_utils.git] / math_utils.py
index 2e126990fba0d7b9138f4a4b6238440aae89bb82..56fb7072366ab97621e032e9aed11d13d7740b5e 100644 (file)
@@ -1,5 +1,6 @@
 #!/usr/bin/env python3
 
+import functools
 import math
 from typing import List
 from heapq import heappush, heappop
@@ -60,6 +61,7 @@ def truncate_float(n: float, decimals: int = 2):
     return int(n * multiplier) / multiplier
 
 
[email protected]_cache(maxsize=1024, typed=True)
 def is_prime(n: int) -> bool:
     """Returns True if n is prime and False otherwise"""
     if not isinstance(n, int):