mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-04 08:50:41 +08:00
Remove useless code in doctests (#7733)
* refactor: Fix matrix display deprecation * refactor: Remove useless `print` and `pass` statements * revert: Replace broken doctests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * revert: Fix failing doctests * chore: Satisfy pre-commit Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:

committed by
GitHub

parent
501a1cf0c7
commit
61eedc16c3
@ -21,9 +21,9 @@ class Matrix:
|
||||
[7. 8. 9.]]
|
||||
|
||||
Matrix rows and columns are available as 2D arrays
|
||||
>>> print(matrix.rows)
|
||||
>>> matrix.rows
|
||||
[[1, 2, 3], [4, 5, 6], [7, 8, 9]]
|
||||
>>> print(matrix.columns())
|
||||
>>> matrix.columns()
|
||||
[[1, 4, 7], [2, 5, 8], [3, 6, 9]]
|
||||
|
||||
Order is returned as a tuple
|
||||
@ -55,7 +55,7 @@ class Matrix:
|
||||
[[-3. 6. -3.]
|
||||
[6. -12. 6.]
|
||||
[-3. 6. -3.]]
|
||||
>>> print(matrix.inverse())
|
||||
>>> matrix.inverse()
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
TypeError: Only matrices with a non-zero determinant have an inverse
|
||||
|
Reference in New Issue
Block a user