Skip to content

Commit d6b118a

Browse files
committed
Make cube root computation work in Python <3.11
1 parent e4aeeba commit d6b118a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/it/script_scope.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@
3333
#@ int age
3434
#@output String cbrt_age
3535
import numpy as np
36-
import math
3736
3837
def calculate_cbrt(age):
39-
return round(math.cbrt(age))
38+
return round(age ** (1. / 3))
4039
4140
cbrt_age = calculate_cbrt(age)
4241
# cbrt_age = round(math.cbrt(age))

0 commit comments

Comments
 (0)