Skip to content

Commit ac3aaa6

Browse files
rikardnisuruf
authored andcommitted
Remove support for python 2 and 3.5
1 parent 4ffaefe commit ac3aaa6

19 files changed

+77
-926
lines changed

benchmarks/expand1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
t1 = clock()
88
g = e.expand()
99
t2 = clock()
10-
print "Total time:", t2-t1, "s"
10+
print("Total time:", t2-t1, "s")

benchmarks/expand1_sage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
t1 = clock()
66
g = e.expand()
77
t2 = clock()
8-
print "Total time:", t2-t1, "s"
8+
print("Total time:", t2-t1, "s")

benchmarks/expand2_sage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
t1 = clock()
88
g = f.expand()
99
t2 = clock()
10-
print "Total time:", t2-t1, "s"
10+
print("Total time:", t2-t1, "s")

benchmarks/expand2b_sympy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
f = e*(e+w)
77
t2 = clock()
88
#print f
9-
print "Total time:", t2-t1, "s"
10-
print "number of terms:", len(f)
9+
print("Total time:", t2-t1, "s")
10+
print("number of terms:", len(f))

benchmarks/expand3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
t1 = clock()
99
g = f.expand()
1010
t2 = clock()
11-
print "Total time:", t2-t1, "s"
11+
print("Total time:", t2-t1, "s")

benchmarks/expand4.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
e = 1
77
for i in range(1, 351):
88
e *= (i+x)**3
9-
#print e
109
t1 = clock()
1110
f = e.expand()
1211
t2 = clock()
13-
print "Total time:", t2-t1, "s"
12+
print("Total time:", t2-t1, "s")

benchmarks/expand4_sage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
t1 = clock()
1111
f = e.expand()
1212
t2 = clock()
13-
print "Total time:", t2-t1, "s"
13+
print("Total time:", t2-t1, "s")

benchmarks/expand5.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
t1 = clock()
1010
g = f.expand()
1111
t2 = clock()
12-
print "Total time:", t2-t1, "s"
12+
print("Total time:", t2-t1, "s")

benchmarks/kane.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,29 @@
44
from symengine import var, sympify, function_symbol, Symbol
55
import sympy
66
s = open("expr.txt").read()
7-
print "Converting to SymPy..."
7+
printr("Converting to SymPy...")
88
e = sympy.sympify(s)
9-
print "Converting to SymEngine..."
9+
print("Converting to SymEngine...")
1010
ce = sympify(e)
11-
print " Done."
12-
print "SymPy subs:"
11+
print(" Done.")
12+
print("SymPy subs:")
1313
t1 = clock()
1414
f = e.subs(sympy.Function("q5")(sympy.Symbol("t")), sympy.Symbol("sq5"))
1515
t2 = clock()
16-
print "Total time:", t2-t1, "s"
17-
print "SymEngine subs:"
16+
print("Total time:", t2-t1, "s")
17+
print("SymEngine subs:")
1818
t1 = clock()
1919
cf = ce.subs(function_symbol("q5", Symbol("t")), Symbol("sq5"))
2020
t2 = clock()
21-
print "Total time:", t2-t1, "s"
21+
print("Total time:", t2-t1, "s")
2222

2323
print "SymPy diff:"
2424
t1 = clock()
2525
g = f.diff(sympy.Symbol("sq5"))
2626
t2 = clock()
27-
print "Total time:", t2-t1, "s"
28-
print "SymEngine diff:"
27+
print("Total time:", t2-t1, "s")
28+
print("SymEngine diff:")
2929
t1 = clock()
3030
cg = cf.diff(Symbol("sq5"))
3131
t2 = clock()
32-
print "Total time:", t2-t1, "s"
32+
print("Total time:", t2-t1, "s")

benchmarks/kane_generate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def test_bicycle():
253253
#import symengine
254254
#print "Converting to symengine..."
255255
#f = symengine.sympify(e)
256-
print "Saving to expr.txt"
256+
print("Saving to expr.txt")
257257
s = str(e)
258258
open("expr.txt", "w").write(s)
259259
return

0 commit comments

Comments
 (0)