Skip to content

Add missing type hints in matrix directory#6612

Merged
cclauss merged 17 commits intoTheAlgorithms:masterfrom
rohanr18:master
Oct 4, 2022
Merged

Add missing type hints in matrix directory#6612
cclauss merged 17 commits intoTheAlgorithms:masterfrom
rohanr18:master

Conversation

@rohanr18
Copy link
Copy Markdown
Contributor

@rohanr18 rohanr18 commented Oct 3, 2022

Describe your change:

(because #6409 was mercilessly closed.)

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

@algorithms-keeper algorithms-keeper bot added awaiting reviews This PR is ready to be reviewed enhancement This PR modified some existing files labels Oct 3, 2022
@rohanr18 rohanr18 changed the title Add missing type hints in 'matrix' directory Add missing type hints in matrix directory Oct 3, 2022
@algorithms-keeper algorithms-keeper bot mentioned this pull request Oct 3, 2022
14 tasks
@rohanr18
Copy link
Copy Markdown
Contributor Author

rohanr18 commented Oct 4, 2022

@cclauss Can you please review? I'm not able to open any more PR's.


def diffs(self, i, j, visited): # Checking all 8 elements surrounding nth element
def diffs(self, i: int, j: int, visited: list[list[bool]]) -> None:
# Checking all 8 elements surrounding nth element
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a docstring because comments will not appear in docs.

@@ -54,7 +56,9 @@ class Matrix:
[6. -12. 6.]
[-3. 6. -3.]]
>>> print(matrix.inverse())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the print()

@cclauss cclauss merged commit 46842e8 into TheAlgorithms:master Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviews This PR is ready to be reviewed enhancement This PR modified some existing files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants