Added rank of matrix in linear algebra#8687
Conversation
linear_algebra/src/Rank_of_Matrix.py
Outdated
| """ BY - RUDRANSH BHARDWAJ""" | ||
|
|
||
|
|
||
| def swapRows(a, row1, row2): |
There was a problem hiding this comment.
To resolve ruff errors, you should rename these functions to use lowercase letters. For example, you could rename "swapRows" to "swap_rows", "Row_Transformation" to "row_transformation", and "MatrixRank" to "matrix_rank".
rohan472000
left a comment
There was a problem hiding this comment.
The error message you received in pre-commit indicates that the file "Rank_of_Matrix.py" contains uppercase characters in its filename, which violates a common naming convention for Python files.
To resolve this error, you should rename the file to use lowercase letters instead. For example, you could rename it to "rank_of_matrix.py" instead.
There was a problem hiding this comment.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
linear_algebra/src/Rank_of_Matrix.py
Outdated
| """ BY - RUDRANSH BHARDWAJ""" | ||
|
|
||
|
|
||
| def swap_rows(a, row1, row2): |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file linear_algebra/src/Rank_of_Matrix.py, please provide doctest for the function swap_rows
Please provide return type hint for the function: swap_rows. If the function does not return a value, please provide the type hint as: def function() -> None:
Please provide descriptive name for the parameter: a
Please provide type hint for the parameter: a
Please provide type hint for the parameter: row1
Please provide type hint for the parameter: row2
There was a problem hiding this comment.
Ok i will try
Thank you
There was a problem hiding this comment.
This is a bot, so no need to reply...just do as it suggests
linear_algebra/src/Rank_of_Matrix.py
Outdated
| return a | ||
|
|
||
|
|
||
| def Row_Transformation(a, x, row1, row2): |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file linear_algebra/src/Rank_of_Matrix.py, please provide doctest for the function Row_Transformation
Please provide return type hint for the function: Row_Transformation. If the function does not return a value, please provide the type hint as: def function() -> None:
Variable and function names should follow the snake_case naming convention. Please update the following name accordingly: Row_Transformation
Please provide descriptive name for the parameter: a
Please provide type hint for the parameter: a
Please provide descriptive name for the parameter: x
Please provide type hint for the parameter: x
Please provide type hint for the parameter: row1
Please provide type hint for the parameter: row2
linear_algebra/src/Rank_of_Matrix.py
Outdated
| return a | ||
|
|
||
|
|
||
| def MatrixRank(a): |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file linear_algebra/src/Rank_of_Matrix.py, please provide doctest for the function MatrixRank
Please provide return type hint for the function: MatrixRank. If the function does not return a value, please provide the type hint as: def function() -> None:
Variable and function names should follow the snake_case naming convention. Please update the following name accordingly: MatrixRank
Please provide descriptive name for the parameter: a
Please provide type hint for the parameter: a
There was a problem hiding this comment.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
linear_algebra/src/Rank_of_Matrix.py
Outdated
| """ BY - RUDRANSH BHARDWAJ""" | ||
|
|
||
|
|
||
| def swap_rows(a, row1, row2): |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file linear_algebra/src/Rank_of_Matrix.py, please provide doctest for the function swap_rows
Please provide return type hint for the function: swap_rows. If the function does not return a value, please provide the type hint as: def function() -> None:
Please provide descriptive name for the parameter: a
Please provide type hint for the parameter: a
Please provide type hint for the parameter: row1
Please provide type hint for the parameter: row2
linear_algebra/src/Rank_of_Matrix.py
Outdated
| return a | ||
|
|
||
|
|
||
| def row_transformation(a, x, row1, row2): |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file linear_algebra/src/Rank_of_Matrix.py, please provide doctest for the function row_transformation
Please provide return type hint for the function: row_transformation. If the function does not return a value, please provide the type hint as: def function() -> None:
Please provide descriptive name for the parameter: a
Please provide type hint for the parameter: a
Please provide descriptive name for the parameter: x
Please provide type hint for the parameter: x
Please provide type hint for the parameter: row1
Please provide type hint for the parameter: row2
linear_algebra/src/Rank_of_Matrix.py
Outdated
| return a | ||
|
|
||
|
|
||
| def matrix_rank(a): |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file linear_algebra/src/Rank_of_Matrix.py, please provide doctest for the function matrix_rank
Please provide return type hint for the function: matrix_rank. If the function does not return a value, please provide the type hint as: def function() -> None:
Please provide descriptive name for the parameter: a
Please provide type hint for the parameter: a
rohan472000
left a comment
There was a problem hiding this comment.
Kindly rename as I have suggested
|
I want 1 week because i had found some bugs in file |
|
i had completed all but failing in changing the file name |
|
now all the errors and naming patterns are corrected except the name |
for more information, see https://pre-commit.ci
|
finnally after trying for 2hrs i renamed the file |
|
doneee |
|
and thank you for your feedbacks |
|
....is it ok to merge pull request or it is not okay |
|
.....can you merge this fork |
|
I'm just a contributor, I don't have write access. |
|
how can i ask him for review?? |
| >>> rank_of_matrix([[3,2,1], | ||
| ... [-6,-4,-2]]) | ||
| 1 | ||
| >>> rank_of_matrix([[],[]]) |
There was a problem hiding this comment.
Please add: >>> rank_of_matrix([[]])
There was a problem hiding this comment.
Thanks for your suggestions
There was a problem hiding this comment.
I hope this is ready to merge
and thanks to @rohan472000 and @cclauss for their feedbacks and suggestions
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
|
@cclauss please review and merge this (if it is ready) |
|
I think now this is okk/? |
|
mypy.....................................................................Failed
linear_algebra/src/rank_of_matrix.py:66: error: No overload variant of "setitem" of "list" matches argument types "int", "float" [call-overload] |
|
i didnt understand ??? is there any error in code or something else??? I dont understand "mypy" sorry sir for disturbing you but please help meeeeeee?? |
There was a problem hiding this comment.
@rudransh61 Merge my commit and the checks will pass
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
|
oooooooooooo Thankakanakankankaaaasssss brooooo FOR HELPING MEEEEEEEEEEEEEE you r genius ???? you are pro coderrr @CaedenPH |
|
broooo you aree god |
|
I think now it is ready to deploy?? |
|
Thanks to all reviews and other developers to help mee |
Hi i am rudransh ,
I added a python file to find rank of matrix because i cannot find it anywhere in code base .
So, i thought that "lets contribute ".
Please try to pull this so that the set of algorithm will be completed.
If there is any error , inform me i will try to correct this.
AND AT LAST I WOULD LIKE TO SAY PLEASE SET IT UP IN A VIRTUAL ENVIRONMENT SO THAT NEW VERSIONS OF REQUIREMENT AND PYTHON WILL NOT AFFECT ANYONE..
THANK YOU FOR READING THIS
A PROGRAMMER
RUDRANSH BHARDWAJ