Skip to content
Snippets Groups Projects
Commit cec7a7db authored by Matteo Rossi's avatar Matteo Rossi
Browse files

Added a doctest

parent 5ebb489b
Branches
No related tags found
No related merge requests found
......@@ -3,7 +3,15 @@
import numpy as np
def sqrt(x):
"""Evaluate the square root of a non-negative number"""
"""
Evaluate the square root of a non-negative number
>>> sqrt(4)
2.0
>>> sqrt(1.)
1.0
"""
return np.sqrt(x)
def square(x):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment