summaryrefslogtreecommitdiff
path: root/numpy/lib/twodim_base.py
diff options
context:
space:
mode:
authorJarrod Millman <millman@berkeley.edu>2008-04-20 11:49:35 +0000
committerJarrod Millman <millman@berkeley.edu>2008-04-20 11:49:35 +0000
commit8c663313de36e860bbfea0909de181d330bfdfc7 (patch)
treea7b5f3585d2b8a2d8307bfb03dd0e449fa732860 /numpy/lib/twodim_base.py
parentcb7de97f089b67eaacf37ddbebcfb91c292c0ef4 (diff)
downloadnumpy-8c663313de36e860bbfea0909de181d330bfdfc7.tar.gz
ran reindent in preparation for the 1.1 release
Diffstat (limited to 'numpy/lib/twodim_base.py')
-rw-r--r--numpy/lib/twodim_base.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/numpy/lib/twodim_base.py b/numpy/lib/twodim_base.py
index a66e94d65..44082521c 100644
--- a/numpy/lib/twodim_base.py
+++ b/numpy/lib/twodim_base.py
@@ -83,9 +83,9 @@ def diag(v, k=0):
raise ValueError, "Input must be 1- or 2-d."
def diagflat(v,k=0):
- """Return a 2D array whose k'th diagonal is a flattened v and all other
- elements are zero.
-
+ """Return a 2D array whose k'th diagonal is a flattened v and all other
+ elements are zero.
+
Examples
--------
>>> diagflat([[1,2],[3,4]]])
@@ -93,12 +93,12 @@ def diagflat(v,k=0):
[0, 2, 0, 0],
[0, 0, 3, 0],
[0, 0, 0, 4]])
-
+
>>> diagflat([1,2], 1)
array([[0, 1, 0],
- [0, 0, 2],
+ [0, 0, 2],
[0, 0, 0]])
- """
+ """
try:
wrap = v.__array_wrap__
except AttributeError: