Commit abafaec 1 parent 6cc87b5 commit abafaec Copy full SHA for abafaec
File tree 1 file changed +2
-5
lines changed
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 1
1
import math
2
2
import numpy as np
3
- import sys
4
3
import typing
5
4
from functools import lru_cache
6
5
@@ -364,10 +363,8 @@ def comp(x: ts["T"]):
364
363
log2 = define_unary_op ("log2" , lambda x : math .log2 (x ))
365
364
log10 = define_unary_op ("log10" , lambda x : math .log10 (x ))
366
365
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 )
371
368
sqrt = define_unary_op ("sqrt" , lambda x : math .sqrt (x ))
372
369
erf = define_unary_op ("erf" , lambda x : math .erf (x ))
373
370
sin = define_unary_op ("sin" , lambda x : math .sin (x ))
You can’t perform that action at this time.
0 commit comments