We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6cc87b5 + abafaec commit a85bb5fCopy full SHA for a85bb5f
1 file changed
csp/math.py
@@ -1,6 +1,5 @@
1
import math
2
import numpy as np
3
-import sys
4
import typing
5
from functools import lru_cache
6
@@ -364,10 +363,8 @@ def comp(x: ts["T"]):
364
363
log2 = define_unary_op("log2", lambda x: math.log2(x))
365
log10 = define_unary_op("log10", lambda x: math.log10(x))
366
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)
+# could replace with math.exp2 once python3.10 and older aren't supported
+exp2 = define_unary_op("exp2", lambda x: 2**x)
371
sqrt = define_unary_op("sqrt", lambda x: math.sqrt(x))
372
erf = define_unary_op("erf", lambda x: math.erf(x))
373
sin = define_unary_op("sin", lambda x: math.sin(x))
0 commit comments