[Scipy-svn] r2032 - trunk/Lib/linalg

scipy-svn at scipy.org scipy-svn at scipy.org
Fri Jun 30 15:03:35 CDT 2006


Author: oliphant
Date: 2006-06-30 15:03:32 -0500 (Fri, 30 Jun 2006)
New Revision: 2032

Modified:
   trunk/Lib/linalg/basic.py
Log:
Fix type-less usage

Modified: trunk/Lib/linalg/basic.py
===================================================================
--- trunk/Lib/linalg/basic.py	2006-06-30 13:05:19 UTC (rev 2031)
+++ trunk/Lib/linalg/basic.py	2006-06-30 20:03:32 UTC (rev 2032)
@@ -470,8 +470,8 @@
     vals = r_[r[rN-1:0:-1], c]
     cols = mgrid[0:cN]
     rows = mgrid[rN:0:-1]
-    indx = cols[:,newaxis]*ones((1,rN)) + \
-           rows[newaxis,:]*ones((cN,1)) - 1
+    indx = cols[:,newaxis]*ones((1,rN),dtype=int) + \
+           rows[newaxis,:]*ones((cN,1),dtype=int) - 1
     return take(vals, indx)
 
 
@@ -501,8 +501,8 @@
     vals = r_[c, r[1:rN]]
     cols = mgrid[1:cN+1]
     rows = mgrid[0:rN]
-    indx = cols[:,newaxis]*ones((1,rN)) + \
-           rows[newaxis,:]*ones((cN,1)) - 1
+    indx = cols[:,newaxis]*ones((1,rN),dtype=int) + \
+           rows[newaxis,:]*ones((cN,1),dtype=int) - 1
     return take(vals, indx)
 
 def all_mat(*args):



More information about the Scipy-svn mailing list