summaryrefslogtreecommitdiff
path: root/numpy/lib/twodim_base.py
diff options
context:
space:
mode:
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: