-
-
Notifications
You must be signed in to change notification settings - Fork 46.7k
Enhanced the code #5330
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
Enhanced the code #5330
Conversation
Under the
so please add spaces to let your code breathe. As discussed in CONTRIBUTING.md, code that is not black formatted will not be accepted. |
@cclauss I did the changes and formatted the code with black too. I hope there won't be any other errors. Since Iam a beginner Iam not able to get them. Thanku for the guidance . |
So… There are no doctests or type hints as discussed in CONTRIBUTING.md. This code confuses two kinds of graphs. Vertex and show() refer to an x, y chart that is plotted. In this sense, vertex is misnamed and should be named size or dimension as it represents the maximum value for x and/or y. The rest of the code is focused on a graph that is a set of nodes connected by edges. This can be proven by looking at the output of .show(). Which of these two graphs should we focus on?!? |
@cclaus I went through all the algorithms and files and this one code had no doctests or type hints originally like most of the files in the folder so I didnt to avoid any errors. I just added a function remove edge and an if condition to raise an error if the index goes out of range.-This code is supposed to focus on nodes and edges according to what I understood. |
All files that start with |
Describe your change:
Added an exception and a new method.
Checklist:
Fixes: #{$ISSUE_NO}
.Hacktoberfest 2021 - Implement algorithms or data structures, fix existing ones and more! #4996 Update: graph_matrix #5318 @cclauss