From cec7a7dbced4416915e0cc45279339e0730d137d Mon Sep 17 00:00:00 2001
From: Matteo Rossi <teo.red90@gmail.com>
Date: Tue, 9 Oct 2018 18:23:43 +0300
Subject: [PATCH] Added a doctest

---
 unnecessarymath.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/unnecessarymath.py b/unnecessarymath.py
index 1cfa9db..14f404b 100644
--- a/unnecessarymath.py
+++ b/unnecessarymath.py
@@ -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):
-- 
GitLab