chore: fix typos (#11467) · edumapri/algorithms-python@1cfca52 · GitHub
Skip to content

Commit 1cfca52

Browse files
xiaoxianBoycclausstianyizheng02
authored
chore: fix typos (TheAlgorithms#11467)
* chore: fix typos Signed-off-by: snoppy <michaleli@foxmail.com> * Apply suggestions from code review Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com> --------- Signed-off-by: snoppy <michaleli@foxmail.com> Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
1 parent 31d1cd8 commit 1cfca52

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

computer_vision/haralick_descriptors.py

Lines changed: 1 addition & 1 deletion

graphs/strongly_connected_components.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def find_components(
3838
reversed_graph: dict[int, list[int]], vert: int, visited: list[bool]
3939
) -> list[int]:
4040
"""
41-
Use depth first search to find strongliy connected
41+
Use depth first search to find strongly connected
4242
vertices. Now graph is reversed
4343
>>> find_components({0: [1], 1: [2], 2: [0]}, 0, 5 * [False])
4444
[0, 1, 2]

maths/points_are_collinear_3d.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ def get_3d_vectors_cross(ab: Vector3d, ac: Vector3d) -> Vector3d:
7676

7777
def is_zero_vector(vector: Vector3d, accuracy: int) -> bool:
7878
"""
79-
Check if vector is equal to (0, 0, 0) of not.
79+
Check if vector is equal to (0, 0, 0) or not.
8080
81-
Sine the algorithm is very accurate, we will never get a zero vector,
81+
Since the algorithm is very accurate, we will never get a zero vector,
8282
so we need to round the vector axis,
8383
because we want a result that is either True or False.
8484
In other applications, we can return a float that represents the collinearity ratio.
@@ -97,9 +97,9 @@ def are_collinear(a: Point3d, b: Point3d, c: Point3d, accuracy: int = 10) -> boo
9797
"""
9898
Check if three points are collinear or not.
9999
100-
1- Create tow vectors AB and AC.
101-
2- Get the cross vector of the tow vectors.
102-
3- Calcolate the length of the cross vector.
100+
1- Create two vectors AB and AC.
101+
2- Get the cross vector of the two vectors.
102+
3- Calculate the length of the cross vector.
103103
4- If the length is zero then the points are collinear, else they are not.
104104
105105
The use of the accuracy parameter is explained in is_zero_vector docstring.

neural_network/convolution_neural_network.py

Lines changed: 4 additions & 4 deletions

0 commit comments

Comments
 (0)