Skip to content

Commit acc7978

Browse files
Fix formatting in gradient_descent doctest and streamline main function call
1 parent 6551ba6 commit acc7978

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

machine_learning/linear_regression_vectorized.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ def gradient_descent(
6565
>>> import numpy as np
6666
>>> features = np.array([[1, 1], [1, 2], [1, 3]])
6767
>>> labels = np.array([[1], [2], [3]])
68-
>>> theta = gradient_descent(features, labels, alpha=0.01, iterations=1000) # doctest: +SKIP
68+
>>> theta = gradient_descent(
69+
... features, labels, alpha=0.01, iterations=1000 # doctest: +SKIP
70+
... )
71+
6972
"""
7073
m, n = features.shape
7174
theta = np.zeros((n, 1))
@@ -115,4 +118,4 @@ def main() -> None:
115118
import doctest
116119

117120
doctest.testmod() # runs all doctests
118-
main() # runs main function
121+
main() # runs main function

0 commit comments

Comments
 (0)