-
-
Notifications
You must be signed in to change notification settings - Fork 46.8k
Added determinate function #1429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
8671d2f
6e2b2d1
e659a77
b9da8f6
04d60d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,6 +118,13 @@ def test_str_matrix(self): | |
A = Matrix([[1, 2, 3], [2, 4, 5], [6, 7, 8]], 3, 3) | ||
self.assertEqual("|1,2,3|\n|2,4,5|\n|6,7,8|\n", str(A)) | ||
|
||
def test_det(self): | ||
""" | ||
test for det() | ||
""" | ||
A = Matrix([[1, 1, 4, 5], [3, 3, 3, 2], [5, 1, 9, 0], [9, 7, 7, 9]], 4, 4) | ||
self.assertEqual(-376, A.det()) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add the following function to the bottom of this file just above line 160. def force_test() -> None:
"""
This will ensure that pytest runs the unit tests above.
>>> unittest.main()
"""
pass There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can see that our tests are not being run: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added |
||
def test__mul__matrix(self): | ||
A = Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]], 3, 3) | ||
x = Vector([1, 2, 3]) | ||
|
Uh oh!
There was an error while loading. Please reload this page.