From 94bc330296e01d8fc0cb14aba1354ddb6d8587cc Mon Sep 17 00:00:00 2001 From: Alan McIntyre Date: Thu, 3 Jul 2008 03:51:46 +0000 Subject: Use the implicit "import numpy as np" made available to all doctests instead of an explicit import. Remove ">>>" from bartlett plotting example since it currently requires matplotlib. --- numpy/lib/scimath.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'numpy/lib/scimath.py') diff --git a/numpy/lib/scimath.py b/numpy/lib/scimath.py index f35c87578..d3965668d 100644 --- a/numpy/lib/scimath.py +++ b/numpy/lib/scimath.py @@ -46,8 +46,6 @@ def _tocomplex(arr): Examples -------- - >>> import numpy as np - First, consider an input of type short: >>> a = np.array([1,2,3],np.short) @@ -246,7 +244,7 @@ def log10(x): -------- (We set the printing precision so the example can be auto-tested) - >>> import numpy as np; np.set_printoptions(precision=4) + >>> np.set_printoptions(precision=4) >>> log10([10**1,10**2]) array([ 1., 2.]) @@ -276,7 +274,7 @@ def logn(n, x): -------- (We set the printing precision so the example can be auto-tested) - >>> import numpy as np; np.set_printoptions(precision=4) + >>> np.set_printoptions(precision=4) >>> logn(2,[4,8]) array([ 2., 3.]) @@ -306,7 +304,7 @@ def log2(x): -------- (We set the printing precision so the example can be auto-tested) - >>> import numpy as np; np.set_printoptions(precision=4) + >>> np.set_printoptions(precision=4) >>> log2([4,8]) array([ 2., 3.]) @@ -336,7 +334,7 @@ def power(x, p): Examples -------- (We set the printing precision so the example can be auto-tested) - >>> import numpy as np; np.set_printoptions(precision=4) + >>> np.set_printoptions(precision=4) >>> power([2,4],2) array([ 4, 16]) @@ -368,7 +366,7 @@ def arccos(x): Examples -------- - >>> import numpy as np; np.set_printoptions(precision=4) + >>> np.set_printoptions(precision=4) >>> arccos(1) 0.0 @@ -397,7 +395,7 @@ def arcsin(x): Examples -------- (We set the printing precision so the example can be auto-tested) - >>> import numpy as np; np.set_printoptions(precision=4) + >>> np.set_printoptions(precision=4) >>> arcsin(0) 0.0 @@ -426,7 +424,7 @@ def arctanh(x): Examples -------- (We set the printing precision so the example can be auto-tested) - >>> import numpy as np; np.set_printoptions(precision=4) + >>> np.set_printoptions(precision=4) >>> arctanh(0) 0.0 -- cgit v1.2.1