-
-
Notifications
You must be signed in to change notification settings - Fork 46.7k
Add tests and type hints to hill cipher #1991
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
Add tests and type hints to hill cipher #1991
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your pull request!🤩
@bharath5412 I did not notice this before but these changes raise a ton of pytest warnings. Would you be willing to create a new pull request that eliminates these warnings? Given how little of numpy is actually used, would it be easy to remove the dependency on numpy? Thanks. |
I can work on removing the dependency on numpy. But the code uses matrix operations such as determinant and inversion of a matrix. They themselves are slightly complex piece of codes. @cclauss do you think that the dependency should be removed? I can make a PR to remove the numpy dependency. |
If you believe that we are using sufficient numpy functionality then we can leave things as they are. |
Cool. I'll check how complex the methods are. If they are not complex, I'll implement and do a PR. |
* Added tests and type hints to hill cipher * Remove extra >>> * import doctest Co-authored-by: John Law <[email protected]>
Describe your change:
Added doctests to the hill cipher algorithm and added type hints. This addresses the issue the #1788 .
There was a previous attemp #1862 to fix the issue but it wasn't merged.
Checklist:
Fixes: #{$ISSUE_NO}
.