-
- Notifications
You must be signed in to change notification settings - Fork 49.2k
Implementation of the algorithm for the Koch snowflake #4207
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
Changes from 1 commit
0a316a5 526f49d 62f0d60 4530a56 4224ad4 84de200 3ef66be File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
I fixed the sorting of the imports and I added a comment to the plot-function to explain what it does and why it doesn't use a doctest. Thank you to user mrmaxguns for suggesting these changes.
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -22,6 +22,7 @@ | |
| | ||
| | ||
| from __future__ import annotations | ||
| | ||
| import numpy | ||
| | ||
| | ||
| | @@ -91,7 +92,12 @@ def rotate(vector: numpy.ndarray, angle_in_degrees: float) -> numpy.ndarray: | |
| | ||
| | ||
| def plot(vectors: list[numpy.ndarray]) -> None: | ||
| ||
| import matplotlib.pyplot as plt # type: ignore | ||
| """ | ||
| Utility function to plot the vectors using matplotlib.pyplot | ||
| No doctest was implemented since this function does not have a return value | ||
| """ | ||
| import matplotlib.pyplot. | ||
| ||
| as plt # type: ignore | ||
| | ||
| # avoid stretched display of graph | ||
| axes = plt.gca() | ||
| | ||
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.
As there is no test file in this pull request nor any test function or class in the file
other/koch_snowflake.py, please provide doctest for the functionplot