Skip to content

Commit abafaec

Browse files
committed
drop python version check in csp/math.py
Signed-off-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
1 parent 6cc87b5 commit abafaec

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

csp/math.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import math
22
import numpy as np
3-
import sys
43
import typing
54
from functools import lru_cache
65

@@ -364,10 +363,8 @@ def comp(x: ts["T"]):
364363
log2 = define_unary_op("log2", lambda x: math.log2(x))
365364
log10 = define_unary_op("log10", lambda x: math.log10(x))
366365
exp = define_unary_op("exp", lambda x: math.exp(x))
367-
if sys.version_info < (3, 11):
368-
exp2 = define_unary_op("exp2", lambda x: 2**x)
369-
else:
370-
exp2 = define_unary_op("exp2", lambda x: math.exp2)
366+
# could replace with math.exp2 once python3.10 and older aren't supported
367+
exp2 = define_unary_op("exp2", lambda x: 2**x)
371368
sqrt = define_unary_op("sqrt", lambda x: math.sqrt(x))
372369
erf = define_unary_op("erf", lambda x: math.erf(x))
373370
sin = define_unary_op("sin", lambda x: math.sin(x))

0 commit comments

Comments
 (0)