summaryrefslogtreecommitdiff
path: root/numpy/matlib.py
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2010-07-31 11:49:25 +0000
committerPauli Virtanen <pav@iki.fi>2010-07-31 11:49:25 +0000
commit62ebd8eb6a761fc7fc8e28f16b4c7a4a3d0465ac (patch)
treeb265bd7150a9f081a1eb3a04844f8e615805b5e4 /numpy/matlib.py
parentd7bf2b58c6cd351a5a9400391ba5060ff669de4f (diff)
downloadnumpy-62ebd8eb6a761fc7fc8e28f16b4c7a4a3d0465ac.tar.gz
TST: Add tests for matlib. Closes #1242.
(From Ralf Gommers.)
Diffstat (limited to 'numpy/matlib.py')
-rw-r--r--numpy/matlib.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/matlib.py b/numpy/matlib.py
index 06bbaa02b..f55f763c3 100644
--- a/numpy/matlib.py
+++ b/numpy/matlib.py
@@ -160,10 +160,10 @@ def identity(n,dtype=None):
Examples
--------
>>> import numpy.matlib
- >>> np.identity(3, dtype=int)
- array([[1, 0, 0],
- [0, 1, 0],
- [0, 0, 1]])
+ >>> np.matlib.identity(3, dtype=int)
+ matrix([[1, 0, 0],
+ [0, 1, 0],
+ [0, 0, 1]])
"""
a = array([1]+n*[0],dtype=dtype)