From aa26afb8fbb6901bed42e895e410728b0dd1f6bc Mon Sep 17 00:00:00 2001 From: Alan McIntyre Date: Wed, 2 Jul 2008 01:15:06 +0000 Subject: Update doctests to use the implicit "import numpy as np" made available to all doctests. --- numpy/core/defmatrix.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'numpy/core/defmatrix.py') diff --git a/numpy/core/defmatrix.py b/numpy/core/defmatrix.py index b577df4a6..2008ba62e 100644 --- a/numpy/core/defmatrix.py +++ b/numpy/core/defmatrix.py @@ -84,8 +84,7 @@ def matrix_power(M,n): Examples -------- - >>> from numpy import array - >>> matrix_power(array([[0,1],[-1,0]]),10) + >>> np.linalg.matrix_power(np.array([[0,1],[-1,0]]),10) array([[-1, 0], [ 0, -1]]) """ @@ -149,7 +148,6 @@ class matrix(N.ndarray): Examples -------- - >>> import numpy as np >>> a = np.matrix('1 2; 3 4') >>> print a [[1 2] -- cgit v1.2.1