summaryrefslogtreecommitdiff
path: root/math_utils.py
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2021-07-12 20:52:49 -0700
committerScott Gasch <[email protected]>2021-07-12 20:52:49 -0700
commit97fbe845e5dfdbda22521117c1783e1fd8515952 (patch)
tree8b0ac61be1d670621abc994beef84e249f0ad95a /math_utils.py
parenta838c154135b2420d9047a101caf24a2c9f593c2 (diff)
Random changes.
Diffstat (limited to 'math_utils.py')
-rw-r--r--math_utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/math_utils.py b/math_utils.py
index 2e12699..56fb707 100644
--- a/math_utils.py
+++ b/math_utils.py
@@ -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):