[Scipy-svn] r2600 - trunk/Lib/sparse/sparsetools

scipy-svn at scipy.org scipy-svn at scipy.org
Tue Jan 23 14:42:53 CST 2007


Author: wnbell
Date: 2007-01-23 14:42:51 -0600 (Tue, 23 Jan 2007)
New Revision: 2600

Modified:
   trunk/Lib/sparse/sparsetools/numpy.i
   trunk/Lib/sparse/sparsetools/sparsetools.h
   trunk/Lib/sparse/sparsetools/sparsetools_wrap.cxx
Log:
Fixed 'unused int i' warning 
Fixed small bug with istart in sparsetools.h



Modified: trunk/Lib/sparse/sparsetools/numpy.i
===================================================================
--- trunk/Lib/sparse/sparsetools/numpy.i	2007-01-23 20:30:30 UTC (rev 2599)
+++ trunk/Lib/sparse/sparsetools/numpy.i	2007-01-23 20:42:51 UTC (rev 2600)
@@ -401,7 +401,6 @@
  /* One dimensional input/output arrays */
 %define TYPEMAP_INPLACE1(type,typecode)
 %typemap(in) (type* INPLACE_ARRAY) (PyArrayObject* temp=NULL) {
-  int i;
   temp = obj_to_array_no_conversion($input,typecode);
   if (!temp  || !require_contiguous(temp)) SWIG_fail;
   $1 = (type*) temp->data;

Modified: trunk/Lib/sparse/sparsetools/sparsetools.h
===================================================================
--- trunk/Lib/sparse/sparsetools/sparsetools.h	2007-01-23 20:30:30 UTC (rev 2599)
+++ trunk/Lib/sparse/sparsetools/sparsetools.h	2007-01-23 20:42:51 UTC (rev 2600)
@@ -227,7 +227,7 @@
   std::vector<T> sums(n_col,zero);
 
   for(I i = 0; i < n_row; i++){
-    I istart = -1;
+    I istart = -2;
     I length =  0;
     
     for(I jj = Ap[i]; jj < Ap[i+1]; jj++){
@@ -314,7 +314,7 @@
   std::vector<T>  sums(n_col,zero);
 
   for(I i = 0; i < n_row; i++){
-    I istart = -1;
+    I istart = -2;
     I length =  0;
     
     //add a row of A to sums
@@ -409,7 +409,7 @@
   std::vector<T> B_row(n_col,zero);
 
   for(I i = 0; i < n_row; i++){
-    I istart = -1;
+    I istart = -2;
     I length =  0;
     
     //add a row of A to A_row

Modified: trunk/Lib/sparse/sparsetools/sparsetools_wrap.cxx
===================================================================
--- trunk/Lib/sparse/sparsetools/sparsetools_wrap.cxx	2007-01-23 20:30:30 UTC (rev 2599)
+++ trunk/Lib/sparse/sparsetools/sparsetools_wrap.cxx	2007-01-23 20:42:51 UTC (rev 2600)
@@ -21314,7 +21314,6 @@
     arg3 = (int*) array3->data;
   }
   {
-    int i;
     temp4 = obj_to_array_no_conversion(obj3,PyArray_INT);
     if (!temp4  || !require_contiguous(temp4)) SWIG_fail;
     arg4 = (int*) temp4->data;
@@ -21379,13 +21378,11 @@
     arg3 = (int*) array3->data;
   }
   {
-    int i;
     temp4 = obj_to_array_no_conversion(obj3,PyArray_INT);
     if (!temp4  || !require_contiguous(temp4)) SWIG_fail;
     arg4 = (int*) temp4->data;
   }
   {
-    int i;
     temp5 = obj_to_array_no_conversion(obj4,PyArray_LONG);
     if (!temp5  || !require_contiguous(temp5)) SWIG_fail;
     arg5 = (long*) temp5->data;
@@ -21445,13 +21442,11 @@
     arg3 = (int*) array3->data;
   }
   {
-    int i;
     temp4 = obj_to_array_no_conversion(obj3,PyArray_INT);
     if (!temp4  || !require_contiguous(temp4)) SWIG_fail;
     arg4 = (int*) temp4->data;
   }
   {
-    int i;
     temp5 = obj_to_array_no_conversion(obj4,PyArray_FLOAT);
     if (!temp5  || !require_contiguous(temp5)) SWIG_fail;
     arg5 = (float*) temp5->data;
@@ -21511,13 +21506,11 @@
     arg3 = (int*) array3->data;
   }
   {
-    int i;
     temp4 = obj_to_array_no_conversion(obj3,PyArray_INT);
     if (!temp4  || !require_contiguous(temp4)) SWIG_fail;
     arg4 = (int*) temp4->data;
   }
   {
-    int i;
     temp5 = obj_to_array_no_conversion(obj4,PyArray_DOUBLE);
     if (!temp5  || !require_contiguous(temp5)) SWIG_fail;
     arg5 = (double*) temp5->data;
@@ -21577,13 +21570,11 @@
     arg3 = (int*) array3->data;
   }
   {
-    int i;
     temp4 = obj_to_array_no_conversion(obj3,PyArray_INT);
     if (!temp4  || !require_contiguous(temp4)) SWIG_fail;
     arg4 = (int*) temp4->data;
   }
   {
-    int i;
     temp5 = obj_to_array_no_conversion(obj4,PyArray_CFLOAT);
     if (!temp5  || !require_contiguous(temp5)) SWIG_fail;
     arg5 = (npy_cfloat*) temp5->data;
@@ -21643,13 +21634,11 @@
     arg3 = (int*) array3->data;
   }
   {
-    int i;
     temp4 = obj_to_array_no_conversion(obj3,PyArray_INT);
     if (!temp4  || !require_contiguous(temp4)) SWIG_fail;
     arg4 = (int*) temp4->data;
   }
   {
-    int i;
     temp5 = obj_to_array_no_conversion(obj4,PyArray_CDOUBLE);
     if (!temp5  || !require_contiguous(temp5)) SWIG_fail;
     arg5 = (npy_cdouble*) temp5->data;



More information about the Scipy-svn mailing list