[Numpy-svn] r3897 - trunk/numpy/lib
numpy-svn at scipy.org
numpy-svn at scipy.org
Wed Jul 25 01:36:13 EDT 2007
Author: rkern
Date: 2007-07-25 00:36:05 -0500 (Wed, 25 Jul 2007)
New Revision: 3897
Modified:
trunk/numpy/lib/twodim_base.py
Log:
Make sure we always return a value from eye(). It wasn't returning a value when dtype==bool.
Modified: trunk/numpy/lib/twodim_base.py
===================================================================
--- trunk/numpy/lib/twodim_base.py 2007-07-24 12:08:46 UTC (rev 3896)
+++ trunk/numpy/lib/twodim_base.py 2007-07-25 05:36:05 UTC (rev 3897)
@@ -47,7 +47,8 @@
if M is None: M = N
m = equal(subtract.outer(arange(N), arange(M)),-k)
if m.dtype != dtype:
- return m.astype(dtype)
+ m = m.astype(dtype)
+ return m
def diag(v, k=0):
""" returns a copy of the the k-th diagonal if v is a 2-d array
More information about the Numpy-svn
mailing list