-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from oscarbenjamin/pr_solve_systems
Benchmark solving systems of equations
- Loading branch information
Showing
3 changed files
with
133 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import sympy | ||
|
||
class TimePolyManyGens: | ||
"""Time using a Poly with many generators""" | ||
|
||
params = [1, 10, 100, 500] | ||
|
||
def setup(self, n): | ||
self.xs = sympy.symbols('x:{}'.format(n)) | ||
self.x = self.xs[n // 2] | ||
self.px = sympy.Poly(self.x, self.xs) | ||
|
||
def time_create_poly(self, n): | ||
sympy.Poly(self.x, self.xs) | ||
|
||
def time_is_linear(self, n): | ||
self.px.is_linear |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters