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

scipy-svn at scipy.org scipy-svn at scipy.org
Tue Jan 9 06:36:51 EST 2007


Author: wnbell
Date: 2007-01-09 05:36:44 -0600 (Tue, 09 Jan 2007)
New Revision: 2510

Modified:
   trunk/Lib/sparse/sparsetools/numpy.i
   trunk/Lib/sparse/sparsetools/sparsetools.h
   trunk/Lib/sparse/sparsetools/sparsetools.i
   trunk/Lib/sparse/sparsetools/sparsetools.py
   trunk/Lib/sparse/sparsetools/sparsetools_wrap.cxx
Log:
Templated index types in sparsetools.h
Consolidated redundant code in sparsetools.i
regenerated SWIG wrappers



Modified: trunk/Lib/sparse/sparsetools/numpy.i
===================================================================
--- trunk/Lib/sparse/sparsetools/numpy.i	2007-01-09 05:49:05 UTC (rev 2509)
+++ trunk/Lib/sparse/sparsetools/numpy.i	2007-01-09 11:36:44 UTC (rev 2510)
@@ -41,11 +41,14 @@
 
 /* Given a Numeric typecode, return a string describing the type.
  */
-char* typecode_string(int typecode) {
-  char* type_names[20] = {"char","unsigned byte","byte","short",
-			  "unsigned short","int","unsigned int","long",
-			  "float","double","complex float","complex double",
-			  "object","ntype","unkown"};
+char* type_names[20] = {"char","unsigned byte","byte","short",
+			"unsigned short","int","unsigned int","long",
+			"float","double","complex float","complex double",
+			"object","ntype","unkown"};
+ char* typecode_string(int typecode) {
+  if(typecode < 0 || typecode > 19)
+    typecode = 19;
+
   return type_names[typecode];
 }
 
@@ -298,7 +301,7 @@
 /* Define concrete examples of the TYPEMAP_IN1 macros */
 TYPEMAP_IN1(char,          PyArray_CHAR  )
 TYPEMAP_IN1(unsigned char, PyArray_UBYTE )
-TYPEMAP_IN1(signed char,   PyArray_SBYTE )
+TYPEMAP_IN1(signed char,   PyArray_BYTE  )
 TYPEMAP_IN1(short,         PyArray_SHORT )
 TYPEMAP_IN1(int,           PyArray_INT   )
 TYPEMAP_IN1(long,          PyArray_LONG  )
@@ -310,7 +313,7 @@
 TYPEMAP_IN1(npy_clongdouble,    PyArray_CLONGDOUBLE)
 TYPEMAP_IN1(const char,          PyArray_CHAR  )
 TYPEMAP_IN1(const unsigned char, PyArray_UBYTE )
-TYPEMAP_IN1(const signed char,   PyArray_SBYTE )
+TYPEMAP_IN1(const signed char,   PyArray_BYTE  )
 TYPEMAP_IN1(const short,         PyArray_SHORT )
 TYPEMAP_IN1(const int,           PyArray_INT   )
 TYPEMAP_IN1(const long,          PyArray_LONG  )
@@ -344,7 +347,7 @@
 /* Define concrete examples of the TYPEMAP_IN2 macros */
 TYPEMAP_IN2(char,          PyArray_CHAR  )
 TYPEMAP_IN2(unsigned char, PyArray_UBYTE )
-TYPEMAP_IN2(signed char,   PyArray_SBYTE )
+TYPEMAP_IN2(signed char,   PyArray_BYTE  )
 TYPEMAP_IN2(short,         PyArray_SHORT )
 TYPEMAP_IN2(int,           PyArray_INT   )
 TYPEMAP_IN2(long,          PyArray_LONG  )
@@ -356,7 +359,7 @@
 TYPEMAP_IN2(npy_clongdouble,    PyArray_CLONGDOUBLE)
 TYPEMAP_IN2(const char,          PyArray_CHAR  )
 TYPEMAP_IN2(const unsigned char, PyArray_UBYTE )
-TYPEMAP_IN2(const signed char,   PyArray_SBYTE )
+TYPEMAP_IN2(const signed char,   PyArray_BYTE  )
 TYPEMAP_IN2(const short,         PyArray_SHORT )
 TYPEMAP_IN2(const int,           PyArray_INT   )
 TYPEMAP_IN2(const long,          PyArray_LONG  )
@@ -408,7 +411,7 @@
 /* Define concrete examples of the TYPEMAP_INPLACE1 macro */
 TYPEMAP_INPLACE1(char,          PyArray_CHAR  )
 TYPEMAP_INPLACE1(unsigned char, PyArray_UBYTE )
-TYPEMAP_INPLACE1(signed char,   PyArray_SBYTE )
+TYPEMAP_INPLACE1(signed char,   PyArray_BYTE  )
 TYPEMAP_INPLACE1(short,         PyArray_SHORT )
 TYPEMAP_INPLACE1(int,           PyArray_INT   )
 TYPEMAP_INPLACE1(long,          PyArray_LONG  )
@@ -420,7 +423,7 @@
 TYPEMAP_INPLACE1(npy_clongdouble,    PyArray_CLONGDOUBLE)
 TYPEMAP_INPLACE1(const char,          PyArray_CHAR  )
 TYPEMAP_INPLACE1(const unsigned char, PyArray_UBYTE )
-TYPEMAP_INPLACE1(const signed char,   PyArray_SBYTE )
+TYPEMAP_INPLACE1(const signed char,   PyArray_BYTE  )
 TYPEMAP_INPLACE1(const short,         PyArray_SHORT )
 TYPEMAP_INPLACE1(const int,           PyArray_INT   )
 TYPEMAP_INPLACE1(const long,          PyArray_LONG  )
@@ -450,7 +453,7 @@
 /* Define concrete examples of the TYPEMAP_INPLACE2 macro */
 TYPEMAP_INPLACE2(char,          PyArray_CHAR  )
 TYPEMAP_INPLACE2(unsigned char, PyArray_UBYTE )
-TYPEMAP_INPLACE2(signed char,   PyArray_SBYTE )
+TYPEMAP_INPLACE2(signed char,   PyArray_BYTE  )
 TYPEMAP_INPLACE2(short,         PyArray_SHORT )
 TYPEMAP_INPLACE2(int,           PyArray_INT   )
 TYPEMAP_INPLACE2(long,          PyArray_LONG  )
@@ -462,7 +465,7 @@
 TYPEMAP_INPLACE2(npy_clongdouble,    PyArray_CLONGDOUBLE)
 TYPEMAP_INPLACE2(const char,          PyArray_CHAR  )
 TYPEMAP_INPLACE2(const unsigned char, PyArray_UBYTE )
-TYPEMAP_INPLACE2(const signed char,   PyArray_SBYTE )
+TYPEMAP_INPLACE2(const signed char,   PyArray_BYTE  )
 TYPEMAP_INPLACE2(const short,         PyArray_SHORT )
 TYPEMAP_INPLACE2(const int,           PyArray_INT   )
 TYPEMAP_INPLACE2(const long,          PyArray_LONG  )
@@ -521,7 +524,7 @@
 /* Define concrete examples of the TYPEMAP_ARGOUT1 macro */
 TYPEMAP_ARGOUT1(char,          PyArray_CHAR  )
 TYPEMAP_ARGOUT1(unsigned char, PyArray_UBYTE )
-TYPEMAP_ARGOUT1(signed char,   PyArray_SBYTE )
+TYPEMAP_ARGOUT1(signed char,   PyArray_BYTE  )
 TYPEMAP_ARGOUT1(short,         PyArray_SHORT )
 TYPEMAP_ARGOUT1(int,           PyArray_INT   )
 TYPEMAP_ARGOUT1(long,          PyArray_LONG  )
@@ -549,7 +552,7 @@
 /* Define concrete examples of the TYPEMAP_ARGOUT2 macro */
 TYPEMAP_ARGOUT2(char,          PyArray_CHAR  )
 TYPEMAP_ARGOUT2(unsigned char, PyArray_UBYTE )
-TYPEMAP_ARGOUT2(signed char,   PyArray_SBYTE )
+TYPEMAP_ARGOUT2(signed char,   PyArray_BYTE  )
 TYPEMAP_ARGOUT2(short,         PyArray_SHORT )
 TYPEMAP_ARGOUT2(int,           PyArray_INT   )
 TYPEMAP_ARGOUT2(long,          PyArray_LONG  )

Modified: trunk/Lib/sparse/sparsetools/sparsetools.h
===================================================================
--- trunk/Lib/sparse/sparsetools/sparsetools.h	2007-01-09 05:49:05 UTC (rev 2509)
+++ trunk/Lib/sparse/sparsetools/sparsetools.h	2007-01-09 11:36:44 UTC (rev 2510)
@@ -10,6 +10,7 @@
  *    Nathan Bell
  *
  * Revisions:
+ *    01/09/2007 - index type is now templated
  *    01/06/2007 - initial inclusion into SciPy
  *
  */
@@ -25,6 +26,10 @@
 
 /*
  * Return zero of the appropriate type
+ *
+ *  this is a workaround for NumPy complex types 
+ *  where T x = 0; doesn't make sense.
+ *
  */
 template <class T> 
 T ZERO(){
@@ -43,16 +48,16 @@
  *   - convert CSC->CSR
  *
  * Input Arguments:
- *   int  n_row         - number of rows in A
- *   int  n_col         - number of columns in A
- *   int  Ap[n_row+1]   - row pointer
- *   int  Aj[nnz(A)]    - column indices
- *   T    Ax[nnz(A)]    - nonzeros
+ *   I  n_row         - number of rows in A
+ *   I  n_col         - number of columns in A
+ *   I  Ap[n_row+1]   - row pointer
+ *   I  Aj[nnz(A)]    - column indices
+ *   T  Ax[nnz(A)]    - nonzeros
  *
  * Output Arguments:
- *   vec<int> Bp  - row pointer
- *   vec<int> Bj  - column indices
- *   vec<T>   Bx  - nonzeros
+ *   vec<I>  Bp  - row pointer
+ *   vec<I>  Bj  - column indices
+ *   vec<T>  Bx  - nonzeros
  *
  * Note:
  *   Output arrays Bp,Bj,Bx will be allocated within in the method
@@ -64,43 +69,43 @@
  *   Complexity: Linear.  Specifically O(nnz(A) + max(n_row,n_col))
  * 
  */
-template <class T>
-void csrtocsc(const int n_row,
-	      const int n_col, 
-	      const int Ap[], 
-	      const int Aj[], 
-	      const T   Ax[],
-	      std::vector<int>* Bp,
-	      std::vector<int>* Bi,
-	      std::vector<T>*   Bx)
+template <class I, class T>
+void csrtocsc(const I n_row,
+	      const I n_col, 
+	      const I Ap[], 
+	      const I Aj[], 
+	      const T Ax[],
+	      std::vector<I>* Bp,
+	      std::vector<I>* Bi,
+	      std::vector<T>* Bx)
 {  
-  int NNZ = Ap[n_row];
+  I NNZ = Ap[n_row];
   
-  *Bp = std::vector<int>(n_col+1);
-  *Bi = std::vector<int>(NNZ);
+  *Bp = std::vector<I>(n_col+1);
+  *Bi = std::vector<I>(NNZ);
   *Bx = std::vector<T>(NNZ);
  
-  std::vector<int> nnz_per_col(n_col,0); //temp array
+  std::vector<I> nnz_per_col(n_col,0); //temp array
  
   //compute number of non-zero entries per column of A 
-  for (int i = 0; i < NNZ; i++){            
+  for (I i = 0; i < NNZ; i++){            
     nnz_per_col[Aj[i]]++;
   }
         
   //cumsum the nnz_per_col to get Bp[]
-  for(int i = 0, cumsum = 0; i < n_col; i++){     
+  for(I i = 0, cumsum = 0; i < n_col; i++){     
     (*Bp)[i]   = cumsum; 
     cumsum += nnz_per_col[i];
     nnz_per_col[i] = 0;              //reset count
   }
   (*Bp)[n_col] = NNZ;
   
-  for(int i = 0; i < n_row; i++){
-    int row_start = Ap[i];
-    int row_end   = Ap[i+1];
-    for(int j = row_start; j < row_end; j++){
-      int col = Aj[j];
-      int k   = (*Bp)[col] + nnz_per_col[col];
+  for(I i = 0; i < n_row; i++){
+    I row_start = Ap[i];
+    I row_end   = Ap[i+1];
+    for(I j = row_start; j < row_end; j++){
+      I col = Aj[j];
+      I k   = (*Bp)[col] + nnz_per_col[col];
 
       (*Bi)[k] = i;
       (*Bx)[k] = Ax[j];
@@ -120,16 +125,16 @@
  *   - convert CSC->COO
  *
  * Input Arguments:
- *   int  n_row         - number of rows in A
- *   int  n_col         - number of columns in A
- *   int  Ap[n_row+1]   - row pointer
- *   int  Aj[nnz(A)]    - column indices
- *   T    Ax[nnz(A)]    - nonzeros
+ *   I  n_row         - number of rows in A
+ *   I  n_col         - number of columns in A
+ *   I  Ap[n_row+1]   - row pointer
+ *   I  Aj[nnz(A)]    - column indices
+ *   T  Ax[nnz(A)]    - nonzeros
  *
  * Output Arguments:
- *   vec<int> Bi  - row indices
- *   vec<int> Bj  - column indices
- *   vec<T>   Bx  - nonzeros
+ *   vec<I> Bi  - row indices
+ *   vec<I> Bj  - column indices
+ *   vec<T> Bx  - nonzeros
  *
  * Note:
  *   Output arrays Bi,Bj,Bx will be allocated within in the method
@@ -138,20 +143,20 @@
  *   Complexity: Linear.
  * 
  */
-template<class T>
-void csrtocoo(const int n_row,
-	      const int n_col, 
-	      const int Ap [], 
-	      const int Aj[], 
-	      const T   Ax[],
-	      std::vector<int>*    Bi,
-	      std::vector<int>*    Bj,
+template <class I, class T>
+void csrtocoo(const I n_row,
+	      const I n_col, 
+	      const I Ap [], 
+	      const I Aj[], 
+	      const T Ax[],
+	      std::vector<I>* Bi,
+	      std::vector<I>* Bj,
 	      std::vector<T>* Bx)
 {
-  for(int i = 0; i < n_row; i++){
-    int row_start = Ap[i];
-    int row_end   = Ap[i+1];
-    for(int jj = row_start; jj < row_end; jj++){
+  for(I i = 0; i < n_row; i++){
+    I row_start = Ap[i];
+    I row_end   = Ap[i+1];
+    for(I jj = row_start; jj < row_end; jj++){
       Bi->push_back(i);
       Bj->push_back(Aj[jj]);
       Bx->push_back(Ax[jj]);
@@ -166,18 +171,18 @@
  *
  *
  * Input Arguments:
- *   int  n_row       - number of rows in A
- *   int  n_col       - number of columns in B (hence C is n_row by n_col)
- *   int  Ap[n_row+1] - row pointer
- *   int  Aj[nnz(A)]  - column indices
- *   T    Ax[nnz(A)]  - nonzeros
- *   int  Bp[?]       - row pointer
- *   int  Bj[nnz(B)]  - column indices
- *   T    Bx[nnz(B)]  - nonzeros
+ *   I  n_row       - number of rows in A
+ *   I  n_col       - number of columns in B (hence C is n_row by n_col)
+ *   I  Ap[n_row+1] - row pointer
+ *   I  Aj[nnz(A)]  - column indices
+ *   T  Ax[nnz(A)]  - nonzeros
+ *   I  Bp[?]       - row pointer
+ *   I  Bj[nnz(B)]  - column indices
+ *   T  Bx[nnz(B)]  - nonzeros
  * Output Arguments:
- *   vec<int> Cp - row pointer
- *   vec<int> Cj - column indices
- *   vec<T>   Cx - nonzeros
+ *   vec<I> Cp - row pointer
+ *   vec<I> Cj - column indices
+ *   vec<T> Cx - nonzeros
  *   
  * Note:
  *   Output arrays Cp,Cj, and Cx will be allocated within in the method
@@ -201,36 +206,34 @@
  *    http://www.mgnet.org/~douglas/ccd-codes.html
  *
  */
-template<class T>
-void csrmucsr(const int n_row,
-	      const int n_col, 
-	      const int Ap [], 
-	      const int Aj[], 
+template <class I, class T>
+void csrmucsr(const I n_row,
+	      const I n_col, 
+	      const I Ap[], 
+	      const I Aj[], 
 	      const T Ax[],
-	      const int Bp[],
-	      const int Bj[],
+	      const I Bp[],
+	      const I Bj[],
 	      const T Bx[],
-	      std::vector<int>* Cp,
-	      std::vector<int>* Cj,
+	      std::vector<I>* Cp,
+	      std::vector<I>* Cj,
 	      std::vector<T>* Cx)
 {
-  *Cp = std::vector<int>(n_row+1,0);
-  Cj->clear();        
-  Cx->clear();
+  *Cp = std::vector<I>(n_row+1,0);
   
   const T zero = ZERO<T>();
 
-  std::vector<int>    index(n_col,-1);
+  std::vector<I> index(n_col,-1);
   std::vector<T> sums(n_col,zero);
 
-  for(int i = 0; i < n_row; i++){
-    int istart = -1;
-    int length =  0;
+  for(I i = 0; i < n_row; i++){
+    I istart = -1;
+    I length =  0;
     
-    for(int jj = Ap[i]; jj < Ap[i+1]; jj++){
-      int j = Aj[jj];
-      for(int kk = Bp[j]; kk < Bp[j+1]; kk++){
-	int k = Bj[kk];
+    for(I jj = Ap[i]; jj < Ap[i+1]; jj++){
+      I j = Aj[jj];
+      for(I kk = Bp[j]; kk < Bp[j+1]; kk++){
+	I k = Bj[kk];
         
 	sums[k] += Ax[jj]*Bx[kk];
         
@@ -242,13 +245,13 @@
       }
     }         
 
-    for(int jj = 0; jj < length; jj++){
+    for(I jj = 0; jj < length; jj++){
       if(sums[istart] != zero){
 	Cj->push_back(istart);
 	Cx->push_back(sums[istart]);
       }
 	
-      int temp = istart;                
+      I temp = istart;                
       istart = index[istart];
       
       index[temp] = -1; //clear arrays
@@ -267,18 +270,18 @@
  *
  *
  * Input Arguments:
- *   int    n_row       - number of rows in A (and B)
- *   int    n_col       - number of columns in A (and B)
- *   int    Ap[n_row+1] - row pointer
- *   int    Aj[nnz(A)]  - column indices
- *   T      Ax[nnz(A)]  - nonzeros
- *   int    Bp[?]       - row pointer
- *   int    Bj[nnz(B)]  - column indices
- *   T      Bx[nnz(B)]  - nonzeros
+ *   I    n_row       - number of rows in A (and B)
+ *   I    n_col       - number of columns in A (and B)
+ *   I    Ap[n_row+1] - row pointer
+ *   I    Aj[nnz(A)]  - column indices
+ *   T    Ax[nnz(A)]  - nonzeros
+ *   I    Bp[?]       - row pointer
+ *   I    Bj[nnz(B)]  - column indices
+ *   T    Bx[nnz(B)]  - nonzeros
  * Output Arguments:
- *   vec<int> Cp  - row pointer
- *   vec<int> Cj  - column indices
- *   vec<T>   Cx  - nonzeros
+ *   vec<I> Cp  - row pointer
+ *   vec<I> Cj  - column indices
+ *   vec<T> Cx  - nonzeros
  *   
  * Note:
  *   Output arrays Cp,Cj, and Cx will be allocated within in the method
@@ -289,36 +292,34 @@
  *           Cx will not contain any zero entries
  *
  */
-template <class T>
-void csrplcsr(const int n_row,
-	      const int n_col, 
-	      const int Ap[], 
-	      const int Aj[], 
-	      const T   Ax[],
-	      const int Bp[],
-	      const int Bj[],
-	      const T   Bx[],
-	      std::vector<int>* Cp,
-	      std::vector<int>* Cj,
-	      std::vector<T>  * Cx)
+template <class I, class T>
+void csrplcsr(const I n_row,
+	      const I n_col, 
+	      const I Ap[], 
+	      const I Aj[], 
+	      const T Ax[],
+	      const I Bp[],
+	      const I Bj[],
+	      const T Bx[],
+	      std::vector<I>* Cp,
+	      std::vector<I>* Cj,
+	      std::vector<T>* Cx)
 {
 
-  *Cp = std::vector<int>(n_row+1,0);
-  Cj->clear();        
-  Cx->clear();
+  *Cp = std::vector<I>(n_row+1,0);
   
   const T zero = ZERO<T>();
 
-  std::vector<int> index(n_col,-1);
-  std::vector<T>   sums(n_col,zero);
+  std::vector<I> index(n_col,-1);
+  std::vector<T>  sums(n_col,zero);
 
-  for(int i = 0; i < n_row; i++){
-    int istart = -1;
-    int length =  0;
+  for(I i = 0; i < n_row; i++){
+    I istart = -1;
+    I length =  0;
     
     //add a row of A to sums
-    for(int jj = Ap[i]; jj < Ap[i+1]; jj++){
-      int j = Aj[jj];
+    for(I jj = Ap[i]; jj < Ap[i+1]; jj++){
+      I j = Aj[jj];
       sums[j] += Ax[jj];
               
       if(index[j] == -1){
@@ -329,8 +330,8 @@
     }
     
     //add a row of B to sums
-    for(int jj = Bp[i]; jj < Bp[i+1]; jj++){
-      int j = Bj[jj];
+    for(I jj = Bp[i]; jj < Bp[i+1]; jj++){
+      I j = Bj[jj];
       sums[j] += Bx[jj];
 
       if(index[j] == -1){
@@ -341,13 +342,13 @@
     }
 
 
-    for(int jj = 0; jj < length; jj++){
+    for(I jj = 0; jj < length; jj++){
       if(sums[istart] != zero){
 	Cj->push_back(istart);
 	Cx->push_back(sums[istart]);
       }
       
-      int temp = istart;                
+      I temp = istart;                
       istart = index[istart];
       
       index[temp] = -1;
@@ -364,18 +365,18 @@
  *   (elmul) - elementwise multiplication
  *
  * Input Arguments:
- *   int    n_row       - number of rows in A (and B)
- *   int    n_col       - number of columns in A (and B)
- *   int    Ap[n_row+1] - row pointer
- *   int    Aj[nnz(A)]  - column indices
- *   T      Ax[nnz(A)]  - nonzeros
- *   int    Bp[?]       - row pointer
- *   int    Bj[nnz(B)]  - column indices
- *   T      Bx[nnz(B)]  - nonzeros
+ *   I    n_row       - number of rows in A (and B)
+ *   I    n_col       - number of columns in A (and B)
+ *   I    Ap[n_row+1] - row pointer
+ *   I    Aj[nnz(A)]  - column indices
+ *   T    Ax[nnz(A)]  - nonzeros
+ *   I    Bp[?]       - row pointer
+ *   I    Bj[nnz(B)]  - column indices
+ *   T    Bx[nnz(B)]  - nonzeros
  * Output Arguments:
- *   vec<int> Cp  - row pointer
- *   vec<int> Cj  - column indices
- *   vec<T>   Cx  - nonzeros
+ *   vec<I> Cp  - row pointer
+ *   vec<I> Cj  - column indices
+ *   vec<T> Cx  - nonzeros
  *   
  * Note:
  *   Output arrays Cp,Cj, and Cx will be allocated within in the method
@@ -386,36 +387,34 @@
  *           Cx will not contain any zero entries
  *
  */
-template <class T>
-void csrelmulcsr(const int n_row,
-		 const int n_col, 
-		 const int Ap [], 
-		 const int Aj[], 
-		 const T   Ax[],
-		 const int Bp[],
-		 const int Bj[],
-		 const T   Bx[],
-		 std::vector<int>* Cp,
-		 std::vector<int>* Cj,
-		 std::vector<T>*   Cx)
+template <class I, class T>
+void csrelmulcsr(const I n_row,
+		 const I n_col, 
+		 const I Ap [], 
+		 const I Aj[], 
+		 const T Ax[],
+		 const I Bp[],
+		 const I Bj[],
+		 const T Bx[],
+		 std::vector<I>* Cp,
+		 std::vector<I>* Cj,
+		 std::vector<T>* Cx)
 {
-  *Cp = std::vector<int>(n_row+1,0);
-  Cj->clear();        
-  Cx->clear();
+  *Cp = std::vector<I>(n_row+1,0);
   
   const T zero = ZERO<T>();
 
-  std::vector<int>   index(n_col,-1);
+  std::vector<I>   index(n_col,-1);
   std::vector<T> A_row(n_col,zero);
   std::vector<T> B_row(n_col,zero);
 
-  for(int i = 0; i < n_row; i++){
-    int istart = -1;
-    int length =  0;
+  for(I i = 0; i < n_row; i++){
+    I istart = -1;
+    I length =  0;
     
     //add a row of A to A_row
-    for(int jj = Ap[i]; jj < Ap[i+1]; jj++){
-      int j = Aj[jj];
+    for(I jj = Ap[i]; jj < Ap[i+1]; jj++){
+      I j = Aj[jj];
 
       A_row[j] += Ax[jj];
       
@@ -427,8 +426,8 @@
     }
     
     //add a row of B to B_row
-    for(int jj = Bp[i]; jj < Bp[i+1]; jj++){
-      int j = Bj[jj];
+    for(I jj = Bp[i]; jj < Bp[i+1]; jj++){
+      I j = Bj[jj];
 
       B_row[j] += Bx[jj];
 
@@ -440,7 +439,7 @@
     }
 
 
-    for(int jj = 0; jj < length; jj++){
+    for(I jj = 0; jj < length; jj++){
       T prod = A_row[istart] * B_row[istart];
       
       if(prod != zero){
@@ -448,7 +447,7 @@
 	Cx->push_back(prod);
       }
       
-      int temp = istart;                
+      I temp = istart;                
       istart = index[istart];
       
       index[temp] = -1;
@@ -466,15 +465,15 @@
  *
  *
  * Input Arguments:
- *   int  n_row         - number of rows in A
- *   int  n_col         - number of columns in A
- *   int  Ai[nnz(A)]    - row indices
- *   int  Aj[nnz(A)]    - column indices
- *   T    Ax[nnz(A)]    - nonzeros
+ *   I  n_row         - number of rows in A
+ *   I  n_col         - number of columns in A
+ *   I  Ai[nnz(A)]    - row indices
+ *   I  Aj[nnz(A)]    - column indices
+ *   T  Ax[nnz(A)]    - nonzeros
  * Output Arguments:
- *   vec<int> Bp        - row pointer
- *   vec<int> Bj        - column indices
- *   vec<T>   Bx        - nonzeros
+ *   vec<I> Bp        - row pointer
+ *   vec<I> Bj        - column indices
+ *   vec<T> Bx        - nonzeros
  *
  * Note:
  *   Output arrays Bp,Bj,Bx will be allocated within in the method
@@ -488,28 +487,28 @@
  *   Complexity: Linear.  Specifically O(nnz(A) + max(n_row,n_col))
  * 
  */
-template<class T>
-void cootocsr(const int n_row,
-	      const int n_col,
-	      const int NNZ,
-	      const int Ai[],
-	      const int Aj[],
-	      const T   Ax[],
-	      std::vector<int>* Bp,
-	      std::vector<int>* Bj,
+template <class I, class T>
+void cootocsr(const I n_row,
+	      const I n_col,
+	      const I NNZ,
+	      const I Ai[],
+	      const I Aj[],
+	      const T Ax[],
+	      std::vector<I>* Bp,
+	      std::vector<I>* Bj,
 	      std::vector<T>* Bx)
 {
-  std::vector<int> tempBp(n_row+1,0);
-  std::vector<int> tempBj(NNZ);
-  std::vector<T>   tempBx(NNZ);
+  std::vector<I> tempBp(n_row+1,0);
+  std::vector<I> tempBj(NNZ);
+  std::vector<T> tempBx(NNZ);
 
-  std::vector<int> nnz_per_row(n_row,0); //temp array
+  std::vector<I> nnz_per_row(n_row,0); //temp array
 
   //compute nnz per row, then compute Bp
-  for(int i = 0; i < NNZ; i++){
+  for(I i = 0; i < NNZ; i++){
     nnz_per_row[Ai[i]]++;
   }
-  for(int i = 0, cumsum = 0; i < n_row; i++){
+  for(I i = 0, cumsum = 0; i < n_row; i++){
     tempBp[i]      = cumsum;
     cumsum        += nnz_per_row[i];
     nnz_per_row[i] = 0; //reset count
@@ -517,10 +516,10 @@
   tempBp[n_row] = NNZ;
 
 
-  //write Aj,Ax into tempBj,tempBx
-  for(int i = 0; i < NNZ; i++){
-    int row = Ai[i];
-    int n   = tempBp[row] + nnz_per_row[row];
+  //write Aj,Ax Io tempBj,tempBx
+  for(I i = 0; i < NNZ; i++){
+    I row = Ai[i];
+    I n   = tempBp[row] + nnz_per_row[row];
 
     tempBj[n] = Aj[i];
     tempBx[n] = Ax[i];
@@ -531,12 +530,12 @@
 
 
   //use (tempB + 0) to sum duplicates
-  std::vector<int> Xp(n_row+1,0); //row pointer for an empty matrix
+  std::vector<I> Xp(n_row+1,0); //row pointer for an empty matrix
 
-  csrplcsr<T>(n_row,n_col,
-	      &tempBp[0],&tempBj[0],&tempBx[0],
-	      &Xp[0],NULL,NULL,
-	      Bp,Bj,Bx);    	   
+  csrplcsr<I,T>(n_row,n_col,
+		&tempBp[0],&tempBj[0],&tempBx[0],
+		&Xp[0],NULL,NULL,
+		Bp,Bj,Bx);    	   
 }
 	    
 
@@ -548,12 +547,12 @@
  *
  *
  * Input Arguments:
- *   int  n_row         - number of rows in A
- *   int  n_col         - number of columns in A
- *   int  Ap[n_row+1]   - row pointer
- *   int  Aj[nnz(A)]    - column indices
- *   T    Ax[n_col]     - nonzeros
- *   T    Xx[n_col]     - nonzeros
+ *   I  n_row         - number of rows in A
+ *   I  n_col         - number of columns in A
+ *   I  Ap[n_row+1]   - row pointer
+ *   I  Aj[nnz(A)]    - column indices
+ *   T  Ax[n_col]     - nonzeros
+ *   T  Xx[n_col]     - nonzeros
  *
  * Output Arguments:
  *   vec<T> Yx - nonzeros (real part)
@@ -564,25 +563,25 @@
  *   Complexity: Linear.  Specifically O(nnz(A) + max(n_row,n_col))
  * 
  */
-template <class T>
-void csrmux(const int n_row,
-	    const int n_col, 
-	    const int Ap [], 
-	    const int Aj[], 
-	    const T   Ax[],
-	    const T   Xx[],
+template <class I, class T>
+void csrmux(const I n_row,
+	    const I n_col, 
+	    const I Ap [], 
+	    const I Aj[], 
+	    const T Ax[],
+	    const T Xx[],
 	    std::vector<T>*  Yx)
 {
   const T zero = ZERO<T>();
 
   *Yx = std::vector<T>(n_row,zero);
 
-  for(int i = 0; i < n_row; i++){
-    int row_start = Ap[i];
-    int row_end   = Ap[i+1];
+  for(I i = 0; i < n_row; i++){
+    I row_start = Ap[i];
+    I row_end   = Ap[i+1];
     
     T& Yx_i = (*Yx)[i];
-    for(int jj = row_start; jj < row_end; jj++){
+    for(I jj = row_start; jj < row_end; jj++){
       Yx_i += Ax[jj] * Xx[Aj[jj]];
     }
   }
@@ -595,10 +594,10 @@
  *
  *
  * Input Arguments:
- *   int  n_row         - number of rows in A
- *   int  n_col         - number of columns in A
- *   int  Ap[n_row+1]   - column pointer
- *   int  Ai[nnz(A)]    - row indices
+ *   I  n_row         - number of rows in A
+ *   I  n_col         - number of columns in A
+ *   I  Ap[n_row+1]   - column pointer
+ *   I  Ai[nnz(A)]    - row indices
  *   T    Ax[n_col]     - nonzeros (real part)
  *   T    Xx[n_col]     - nonzeros (real part)
  *   bool do_complex    - switch scalar/complex modes
@@ -612,25 +611,25 @@
  *   Complexity: Linear.  Specifically O(nnz(A) + max(n_row,n_col))
  * 
  */
-template <class T>
-void cscmux(const int n_row,
-	    const int n_col, 
-	    const int Ap[], 
-	    const int Ai[], 
-	    const T   Ax[],
-	    const T   Xx[],
+template <class I, class T>
+void cscmux(const I n_row,
+	    const I n_col, 
+	    const I Ap[], 
+	    const I Ai[], 
+	    const T Ax[],
+	    const T Xx[],
 	    std::vector<T>*  Yx)
 {
   const T zero = ZERO<T>();
 
   *Yx = std::vector<T>(n_row,zero);
   
-  for(int j = 0; j < n_col; j++){
-    int col_start = Ap[j];
-    int col_end   = Ap[j+1];
+  for(I j = 0; j < n_col; j++){
+    I col_start = Ap[j];
+    I col_end   = Ap[j+1];
     
-    for(int ii = col_start; ii < col_end; ii++){
-      int row  = Ai[ii];
+    for(I ii = col_start; ii < col_end; ii++){
+      I row  = Ai[ii];
       (*Yx)[row] += Ax[ii] * Xx[j];
     }
   }
@@ -643,16 +642,16 @@
  * Construct CSC matrix A from diagonals
  *
  * Input Arguments:
- *   int  n_row                            - number of rows in A
- *   int  n_col                            - number of columns in A
- *   int  n_diags                          - number of diagonals
- *   int  diags_indx[n_diags]              - where to place each diagonal 
- *   T    diags[n_diags][min(n_row,n_col)] - diagonals
+ *   I  n_row                            - number of rows in A
+ *   I  n_col                            - number of columns in A
+ *   I  n_diags                          - number of diagonals
+ *   I  diags_indx[n_diags]              - where to place each diagonal 
+ *   T  diags[n_diags][min(n_row,n_col)] - diagonals
  *
  * Output Arguments:
- *   vec<int> Ap  - row pointer
- *   vec<int> Aj  - column indices
- *   vec<T>   Ax  - nonzeros
+ *   vec<I> Ap  - row pointer
+ *   vec<I> Aj  - column indices
+ *   vec<T> Ax  - nonzeros
  *
  * Note:
  *   Output arrays Ap,Aj,Ax will be allocated within in the method
@@ -663,30 +662,30 @@
  *   Complexity: Linear
  * 
  */
-template<class T>
-void spdiags(const int n_row,
-	     const int n_col,
-	     const int n_diag,
-	     const int offsets[],
-	     const T   diags[],
-	     std::vector<int> * Ap,
-	     std::vector<int> * Ai,
-	     std::vector<T>   * Ax)
+template <class I, class T>
+void spdiags(const I n_row,
+	     const I n_col,
+	     const I n_diag,
+	     const I offsets[],
+	     const T diags[],
+	     std::vector<I> * Ap,
+	     std::vector<I> * Ai,
+	     std::vector<T> * Ax)
 {
-  const int diags_length = std::min(n_row,n_col);
+  const I diags_length = std::min(n_row,n_col);
   Ap->push_back(0);
 
-  for(int i = 0; i < n_col; i++){
-    for(int j = 0; j < n_diag; j++){
+  for(I i = 0; i < n_col; i++){
+    for(I j = 0; j < n_diag; j++){
       if(offsets[j] <= 0){              //sub-diagonal
-	int row = i - offsets[j];
+	I row = i - offsets[j];
 	if (row >= n_row){ continue; }
 	
 	Ai->push_back(row);
 	Ax->push_back(diags[j*diags_length + i]);
 
       } else {                          //super-diagonal
-	int row = i - offsets[j];
+	I row = i - offsets[j];
 	if (row < 0 || row >= n_row){ continue; }
 
 	Ai->push_back(row);
@@ -703,36 +702,36 @@
  * Compute M = A for CSR matrix A, dense matrix M
  *
  * Input Arguments:
- *   int  n_row           - number of rows in A
- *   int  n_col           - number of columns in A
- *   int  Ap[n_row+1]     - row pointer
- *   int  Aj[nnz(A)]      - column indices
+ *   I  n_row           - number of rows in A
+ *   I  n_col           - number of columns in A
+ *   I  Ap[n_row+1]     - row pointer
+ *   I  Aj[nnz(A)]      - column indices
  *   T    Ax[nnz(A)]      - nonzeros 
  *   T    Mx[n_row*n_col] - dense matrix
  *
  * Note:
- *   Output arrays Mx are assumed to be allocated and
+ *   Output array Mx is assumed to be allocated and
  *   initialized to 0 by the caller.
  *
  */
-template<class T>
-void csrtodense(const int  n_row,
-		const int  n_col,
-		const int  Ap[],
-		const int  Aj[],
-		const T    Ax[],
-		      T    Mx[])
+template <class I, class T>
+void csrtodense(const I  n_row,
+		const I  n_col,
+		const I  Ap[],
+		const I  Aj[],
+		const T  Ax[],
+		      T  Mx[])
 {
-  int row_base = 0;
-  for(int i = 0; i < n_row; i++){
-    int row_start = Ap[i];
-    int row_end   = Ap[i+1];
-    for(int jj = row_start; jj < row_end; jj++){
-      int j = Aj[jj];
+  I row_base = 0;
+  for(I i = 0; i < n_row; i++){
+    I row_start = Ap[i];
+    I row_end   = Ap[i+1];
+    for(I jj = row_start; jj < row_end; jj++){
+      I j = Aj[jj];
 
       Mx[row_base + j] = Ax[jj];
     }	
-    row_base +=  n_col;
+    row_base += n_col;
   }
 }
 
@@ -742,31 +741,31 @@
  * Compute A = M for CSR matrix A, dense matrix M
  *
  * Input Arguments:
- *   int  n_row           - number of rows in A
- *   int  n_col           - number of columns in A
- *   T    Mx[n_row*n_col] - dense matrix
- *   int  Ap[n_row+1]     - row pointer
- *   int  Aj[nnz(A)]      - column indices
- *   T    Ax[nnz(A)]      - nonzeros 
+ *   I  n_row           - number of rows in A
+ *   I  n_col           - number of columns in A
+ *   T  Mx[n_row*n_col] - dense matrix
+ *   I  Ap[n_row+1]     - row pointer
+ *   I  Aj[nnz(A)]      - column indices
+ *   T  Ax[nnz(A)]      - nonzeros 
  *
  * Note:
  *    Output arrays Ap,Aj,Ax will be allocated within the method
  *
  */
-template<class T>
-void densetocsr(const int  n_row,
-		const int  n_col,
-		const T    Mx[],
-		std::vector<int>* Ap,
-		std::vector<int>* Aj,
-		std::vector<T>*   Ax)
+template <class I, class T>
+void densetocsr(const I n_row,
+		const I n_col,
+		const T Mx[],
+		std::vector<I>* Ap,
+		std::vector<I>* Aj,
+		std::vector<T>* Ax)
 {
-  const T zero = ZERO<T>();
+  const T  zero  = ZERO<T>();
   const T* x_ptr = Mx;
 
   Ap->push_back(0);
-  for(int i = 0; i < n_row; i++){
-    for(int j = 0; j < n_col; j++){
+  for(I i = 0; i < n_row; i++){
+    for(I j = 0; j < n_col; j++){
       if(*x_ptr != zero){
 	Aj->push_back(j);
 	Ax->push_back(*x_ptr);
@@ -782,81 +781,81 @@
 /*
  * Derived methods
  */
-template <class T>
-void csctocsr(const int n_row,
-	      const int n_col, 
-	      const int Ap[], 
-	      const int Ai[], 
-	      const T   Ax[],
-	      std::vector<int>* Bp,
-	      std::vector<int>* Bj,
-	      std::vector<T>*   Bx)
-{ csrtocsc<T>(n_col,n_row,Ap,Ai,Ax,Bp,Bj,Bx); }
+template <class I, class T>
+void csctocsr(const I n_row,
+	      const I n_col, 
+	      const I Ap[], 
+	      const I Ai[], 
+	      const T Ax[],
+	      std::vector<I>* Bp,
+	      std::vector<I>* Bj,
+	      std::vector<T>* Bx)
+{ csrtocsc<I,T>(n_col,n_row,Ap,Ai,Ax,Bp,Bj,Bx); }
 
-template<class T>
-void csctocoo(const int n_row,
-	      const int n_col, 
-	      const int Ap[], 
-	      const int Ai[], 
-	      const T   Ax[],
-	      std::vector<int>*    Bi,
-	      std::vector<int>*    Bj,
-	      std::vector<T>*      Bx)
-{ csrtocoo<T>(n_col,n_row,Ap,Ai,Ax,Bj,Bi,Bx); }
+template <class I, class T>
+void csctocoo(const I n_row,
+	      const I n_col, 
+	      const I Ap[], 
+	      const I Ai[], 
+	      const T Ax[],
+	      std::vector<I>* Bi,
+	      std::vector<I>* Bj,
+	      std::vector<T>* Bx)
+{ csrtocoo<I,T>(n_col,n_row,Ap,Ai,Ax,Bj,Bi,Bx); }
 
-template<class T>
-void cscmucsc(const int n_row,
-	      const int n_col, 
-	      const int Ap [], 
-	      const int Ai[], 
-	      const T   Ax[],
-	      const int Bp[],
-	      const int Bi[],
-	      const T   Bx[],
-	      std::vector<int>* Cp,
-	      std::vector<int>* Ci,
-	      std::vector<T>  * Cx)
-{ csrmucsr<T>(n_col,n_row,Bp,Bi,Bx,Ap,Ai,Ax,Cp,Ci,Cx); }
+template <class I, class T>
+void cscmucsc(const I n_row,
+	      const I n_col, 
+	      const I Ap[], 
+	      const I Ai[], 
+	      const T Ax[],
+	      const I Bp[],
+	      const I Bi[],
+	      const T Bx[],
+	      std::vector<I>* Cp,
+	      std::vector<I>* Ci,
+	      std::vector<T>* Cx)
+{ csrmucsr<I,T>(n_col,n_row,Bp,Bi,Bx,Ap,Ai,Ax,Cp,Ci,Cx); }
 
-template <class T>
-void cscplcsc(const int n_row,
-	      const int n_col, 
-	      const int Ap [], 
-	      const int Ai[], 
-	      const T   Ax[],
-	      const int Bp[],
-	      const int Bi[],
-	      const T   Bx[],
-	      std::vector<int>* Cp,
-	      std::vector<int>* Ci,
-	      std::vector<T>*   Cx)
-{ csrplcsr<T>(n_col,n_row,Ap,Ai,Ax,Bp,Bi,Bx,Cp,Ci,Cx); }
+template <class I, class T>
+void cscplcsc(const I n_row,
+	      const I n_col, 
+	      const I Ap[], 
+	      const I Ai[], 
+	      const T Ax[],
+	      const I Bp[],
+	      const I Bi[],
+	      const T Bx[],
+	      std::vector<I>* Cp,
+	      std::vector<I>* Ci,
+	      std::vector<T>* Cx)
+{ csrplcsr<I,T>(n_col,n_row,Ap,Ai,Ax,Bp,Bi,Bx,Cp,Ci,Cx); }
 
-template <class T>
-void cscelmulcsc(const int n_row,
-		 const int n_col, 
-		 const int Ap [], 
-		 const int Ai[], 
-		 const T   Ax[],
-		 const int Bp[],
-		 const int Bi[],
-		 const T   Bx[],
-		 std::vector<int>* Cp,
-		 std::vector<int>* Ci,
-		 std::vector<T>*   Cx)
-{ csrelmulcsr<T>(n_col,n_row,Ap,Ai,Ax,Bp,Bi,Bx,Cp,Ci,Cx); }
+template <class I, class T>
+void cscelmulcsc(const I n_row,
+		 const I n_col, 
+		 const I Ap[], 
+		 const I Ai[], 
+		 const T Ax[],
+		 const I Bp[],
+		 const I Bi[],
+		 const T Bx[],
+		 std::vector<I>* Cp,
+		 std::vector<I>* Ci,
+		 std::vector<T>* Cx)
+{ csrelmulcsr<I,T>(n_col,n_row,Ap,Ai,Ax,Bp,Bi,Bx,Cp,Ci,Cx); }
 
-template<class T>
-void cootocsc(const int n_row,
-	      const int n_col,
-	      const int NNZ,
-	      const int Ai[],
-	      const int Aj[],
-	      const T   Ax[],
-	      std::vector<int>* Bp,
-	      std::vector<int>* Bi,
-	      std::vector<T>*   Bx)
-{ cootocsr<T>(n_col,n_row,NNZ,Aj,Ai,Ax,Bp,Bi,Bx); }
+template<class I, class T>
+void cootocsc(const I n_row,
+	      const I n_col,
+	      const I NNZ,
+	      const I Ai[],
+	      const I Aj[],
+	      const T Ax[],
+	      std::vector<I>* Bp,
+	      std::vector<I>* Bi,
+	      std::vector<T>* Bx)
+{ cootocsr<I,T>(n_col,n_row,NNZ,Aj,Ai,Ax,Bp,Bi,Bx); }
 
 
 

Modified: trunk/Lib/sparse/sparsetools/sparsetools.i
===================================================================
--- trunk/Lib/sparse/sparsetools/sparsetools.i	2007-01-09 05:49:05 UTC (rev 2509)
+++ trunk/Lib/sparse/sparsetools/sparsetools.i	2007-01-09 11:36:44 UTC (rev 2510)
@@ -49,14 +49,10 @@
   }
   return where;
 }
+%} //end inline code
 
 
 
-
-%}
-
-
-
 /*
  * Use STL vectors for ARGOUTs
  */
@@ -76,366 +72,205 @@
 
 
 
-
+ /*
+  * make typechecks - used for overloading
+  */
 %include "typemaps.i"
 
-%typemap(typecheck) int *, const int *, int [], const int []
+%define NPY_TYPECHECK( ctype, atype )
+%typemap(typecheck) ctype *, const ctype *, ctype [], const ctype []
 {
-  $1 = (is_array($input) && PyArray_CanCastSafely(PyArray_TYPE($input),PyArray_INT)) ? 1 : 0;
+  $1 = (is_array($input) && PyArray_CanCastSafely(PyArray_TYPE($input),PyArray_##atype)) ? 1 : 0;
 };
+%enddef
 
-%typemap(typecheck) float *, const float *, float [], const float []
-{
-  $1 = (is_array($input) && PyArray_CanCastSafely(PyArray_TYPE($input),PyArray_FLOAT)) ? 1 : 0;
-};
+NPY_TYPECHECK(         int,      INT )
+NPY_TYPECHECK(        long,     LONG )
+NPY_TYPECHECK(       float,    FLOAT )
+NPY_TYPECHECK(      double,   DOUBLE )
+NPY_TYPECHECK(  npy_cfloat,   CFLOAT )
+NPY_TYPECHECK(  npy_cdouble, CDOUBLE )
 
-%typemap(typecheck) double *, const double *, double [], const double []
-{
-  $1 = (is_array($input) && PyArray_CanCastSafely(PyArray_TYPE($input),PyArray_DOUBLE)) ? 1 : 0;
-};
 
-%typemap(typecheck) long double *, const long double *, long double [], const long double []
-{
-  $1 = (is_array($input) && PyArray_CanCastSafely(PyArray_TYPE($input),PyArray_LONGDOUBLE)) ? 1 : 0;
-};
 
-%typemap(typecheck) npy_cfloat *, const npy_cfloat *, npy_cfloat [], const npy_cfloat []
-{
-  $1 = (is_array($input) && PyArray_CanCastSafely(PyArray_TYPE($input),PyArray_CFLOAT)) ? 1 : 0;
+ /*
+  * IN types
+  */
+%define I_IN_ARRAY1( ctype )
+%apply ctype * IN_ARRAY1 {
+    const ctype Ap [ ],
+    const ctype Ai [ ],
+    const ctype Aj [ ],
+    const ctype Bp [ ],
+    const ctype Bi [ ],	
+    const ctype Bj [ ],
+    const ctype offsets [ ]
 };
+%enddef
 
-%typemap(typecheck) npy_cdouble *, const npy_cdouble *, npy_cdouble [], const npy_cdouble []
-{
-  $1 = (is_array($input) && PyArray_CanCastSafely(PyArray_TYPE($input),PyArray_CDOUBLE)) ? 1 : 0;
+%define T_IN_ARRAY1( ctype )
+%apply ctype * IN_ARRAY1 {
+    const ctype Ax [ ],
+    const ctype Bx [ ],
+    const ctype Xx [ ],
+    const ctype Yx [ ]
 };
+%enddef
 
-%typemap(typecheck) npy_clongdouble *, const npy_clongdouble *, npy_clongdouble [], const npy_clongdouble []
-{
-  $1 = (is_array($input) && PyArray_CanCastSafely(PyArray_TYPE($input),PyArray_CLONGDOUBLE)) ? 1 : 0;
+%define T_IN_ARRAY2( ctype )
+%apply ctype * IN_ARRAY2 {
+  const ctype Mx    [ ],
+  const ctype diags [ ]
 };
+%enddef
 
 
+I_IN_ARRAY1( int  )
+I_IN_ARRAY1( long )
 
+T_IN_ARRAY1( int         )
+T_IN_ARRAY1( long        )
+T_IN_ARRAY1( float       )
+T_IN_ARRAY1( double      )
+T_IN_ARRAY1( npy_cfloat  )
+T_IN_ARRAY1( npy_cdouble )
 
+T_IN_ARRAY2( int         )
+T_IN_ARRAY2( long        )
+T_IN_ARRAY2( float       )
+T_IN_ARRAY2( double      )
+T_IN_ARRAY2( npy_cfloat  )
+T_IN_ARRAY2( npy_cdouble )
 
 
-/*
- * IN types
- */
-%apply int * IN_ARRAY1 {
-    const int Ap [ ],
-    const int Ai [ ],
-    const int Aj [ ],
-    const int Bp [ ],
-    const int Bi [ ],	
-    const int Bj [ ],
-    const int offsets [ ]
-};
 
-%apply float * IN_ARRAY1 {
-    const float Ax [ ],
-    const float Bx [ ],
-    const float Xx [ ],
-    const float Yx [ ]
+ /*
+  * OUT types
+  */
+%define I_ARRAY_ARGOUT( ctype, atype )
+VEC_ARRAY_ARGOUT( ctype, atype )
+%apply std::vector<ctype>* array_argout {
+    std::vector<ctype>* Ap,
+    std::vector<ctype>* Ai,
+    std::vector<ctype>* Aj,
+    std::vector<ctype>* Bp,
+    std::vector<ctype>* Bi,
+    std::vector<ctype>* Bj,
+    std::vector<ctype>* Cp,
+    std::vector<ctype>* Ci,
+    std::vector<ctype>* Cj
 };
+%enddef
 
-%apply double * IN_ARRAY1 {
-    const double Ax [ ],
-    const double Bx [ ],
-    const double Xx [ ],
-    const double Yx [ ]
+%define T_ARRAY_ARGOUT( ctype, atype )
+VEC_ARRAY_ARGOUT( ctype, atype )
+%apply std::vector<ctype>* array_argout {
+    std::vector<ctype>* Ax, 
+    std::vector<ctype>* Bx,
+    std::vector<ctype>* Cx, 
+    std::vector<ctype>* Xx,
+    std::vector<ctype>* Yx 
 };
+%enddef
 
-%apply long double * IN_ARRAY1 {
-    const long double Ax [ ],
-    const long double Bx [ ],
-    const long double Xx [ ],
-    const long double Yx [ ]
-};
 
-%apply npy_cfloat * IN_ARRAY1 {
-    const npy_cfloat Ax [ ],
-    const npy_cfloat Bx [ ],
-    const npy_cfloat Xx [ ],
-    const npy_cfloat Yx [ ]
-};
 
-%apply npy_cdouble * IN_ARRAY1 {
-    const npy_cdouble Ax [ ],
-    const npy_cdouble Bx [ ],
-    const npy_cdouble Xx [ ],
-    const npy_cdouble Yx [ ]
-};
+I_ARRAY_ARGOUT( int,   INT)
+I_ARRAY_ARGOUT( long, LONG)
 
-%apply npy_clongdouble * IN_ARRAY1 {
-    const npy_clongdouble Ax [ ],
-    const npy_clongdouble Bx [ ],
-    const npy_clongdouble Xx [ ],
-    const npy_clongdouble Yx [ ]
-};
+T_ARRAY_ARGOUT( int,         INT     )
+T_ARRAY_ARGOUT( long,        LONG    )
+T_ARRAY_ARGOUT( float,       FLOAT   )
+T_ARRAY_ARGOUT( double,      DOUBLE  )
+T_ARRAY_ARGOUT( npy_cfloat,  CFLOAT  )
+T_ARRAY_ARGOUT( npy_cdouble, CDOUBLE )
 
 
-%apply float * IN_ARRAY2 { const float Mx[] }
-%apply double * IN_ARRAY2 { const double Mx[] }
-%apply long double * IN_ARRAY2 { const long double Mx[] }
-%apply npy_cfloat * IN_ARRAY2 { const npy_cfloat Mx[] }
-%apply npy_cdouble * IN_ARRAY2 { const npy_cdouble Mx[] }
-%apply npy_clongdouble * IN_ARRAY2 { const npy_longdouble Mx[] }
 
-
-%apply float * IN_ARRAY2 { const float diags[] }
-%apply double * IN_ARRAY2 { const double diags[] }
-%apply long double * IN_ARRAY2 { const long double diags[] }
-%apply npy_cfloat * IN_ARRAY2 { const npy_cfloat diags[] }
-%apply npy_cdouble * IN_ARRAY2 { const npy_cdouble diags[] }
-%apply npy_clongdouble * IN_ARRAY2 { const npy_longdouble diags[] }
-
-
-
-/*
- * OUT types
- */
-VEC_ARRAY_ARGOUT( int, INT )
-%apply std::vector<int>* array_argout {
-    std::vector<int>* Ap,
-    std::vector<int>* Ai,
-    std::vector<int>* Aj,
-    std::vector<int>* Bp,
-    std::vector<int>* Bi,
-    std::vector<int>* Bj,
-    std::vector<int>* Cp,
-    std::vector<int>* Ci,
-    std::vector<int>* Cj
+ /*
+  * INOUT types
+  */
+%define T_INPLACE_ARRAY2( ctype )
+%apply ctype * INPLACE_ARRAY2 {
+  ctype Mx [ ]
 };
+%enddef
 
-VEC_ARRAY_ARGOUT( float, FLOAT )
-%apply std::vector<float>* array_argout {
-    std::vector<float>* Ax,
-    std::vector<float>* Bx,
-    std::vector<float>* Cx,
-    std::vector<float>* Xx,
-    std::vector<float>* Yx
-};
+T_INPLACE_ARRAY2( int         )
+T_INPLACE_ARRAY2( long        )
+T_INPLACE_ARRAY2( float       )
+T_INPLACE_ARRAY2( double      )
+T_INPLACE_ARRAY2( npy_cfloat  )
+T_INPLACE_ARRAY2( npy_cdouble )
 
-VEC_ARRAY_ARGOUT( double, DOUBLE )
-%apply std::vector<double>* array_argout {
-    std::vector<double>* Ax,
-    std::vector<double>* Bx,
-    std::vector<double>* Cx,
-    std::vector<double>* Xx,
-    std::vector<double>* Yx
-};
 
 
-VEC_ARRAY_ARGOUT( long double, LONGDOUBLE )
-%apply std::vector<long double>* array_argout {
-    std::vector<long double>* Ax,
-    std::vector<long double>* Bx,
-    std::vector<long double>* Cx,
-    std::vector<long double>* Xx,
-    std::vector<long double>* Yx
-};
 
-VEC_ARRAY_ARGOUT( npy_cfloat, CFLOAT )
-%apply std::vector<npy_cfloat>* array_argout {
-    std::vector<npy_cfloat>* Ax,
-    std::vector<npy_cfloat>* Bx,
-    std::vector<npy_cfloat>* Cx,
-    std::vector<npy_cfloat>* Xx,
-    std::vector<npy_cfloat>* Yx
-};
 
 
-VEC_ARRAY_ARGOUT( npy_cdouble, CDOUBLE )
-%apply std::vector<npy_cdouble>* array_argout {
-    std::vector<npy_cdouble>* Ax,
-    std::vector<npy_cdouble>* Bx,
-    std::vector<npy_cdouble>* Cx,
-    std::vector<npy_cdouble>* Xx,
-    std::vector<npy_cdouble>* Yx
-};
-
-
-VEC_ARRAY_ARGOUT( npy_clongdouble, CLONGDOUBLE )
-%apply std::vector<npy_clongdouble>* array_argout {
-    std::vector<npy_clongdouble>* Ax,
-    std::vector<npy_clongdouble>* Bx,
-    std::vector<npy_clongdouble>* Cx,
-    std::vector<npy_clongdouble>* Xx,
-    std::vector<npy_clongdouble>* Yx
-};
-
-
-
-/*
- * INOUT types
- */
-%apply float * INPLACE_ARRAY2 { float Mx [] }
-%apply double * INPLACE_ARRAY2 { double Mx [] }
-%apply long double * INPLACE_ARRAY2 { long double Mx[] }
-%apply npy_cfloat * INPLACE_ARRAY2 { npy_cfloat Mx[] }
-%apply npy_cdouble * INPLACE_ARRAY2 { npy_cdouble Mx[] }
-%apply npy_clongdouble * INPLACE_ARRAY2 { npy_longdouble Mx[] }
-
-
-
-
-
-
 %include "sparsetools.h"
+ /*
+  * Order may be important here, list float before npy_float64, scalar before complex
+  */
 
+%define INSTANTIATE_ALL( f_name )		     
+%template(f_name)   f_name<int,int>;
+%template(f_name)   f_name<int,long>;
+%template(f_name)   f_name<int,float>;
+%template(f_name)   f_name<int,double>;
+%template(f_name)   f_name<int,npy_cfloat>;
+%template(f_name)   f_name<int,npy_cdouble>;
+/* 64-bit indices would go here */
+%enddef
 
 
- /*
-  * Order may be important here, list float before double
-  */
 
 /*
  *  CSR->CSC or CSC->CSR or CSR = CSR^T or CSC = CSC^T
  */
-%template(csrtocsc)   csrtocsc<float>; 
-%template(csrtocsc)   csrtocsc<double>; 
-%template(csrtocsc)   csrtocsc<long double>; 
-%template(csrtocsc)   csrtocsc<npy_cfloat>; 
-%template(csrtocsc)   csrtocsc<npy_cdouble>; 
-%template(csrtocsc)   csrtocsc<npy_clongdouble>; 
+INSTANTIATE_ALL(csrtocsc)
+INSTANTIATE_ALL(csctocsr)
 
-%template(csctocsr)   csctocsr<float>; 
-%template(csctocsr)   csctocsr<double>; 
-%template(csctocsr)   csctocsr<long double>; 
-%template(csctocsr)   csctocsr<npy_cfloat>; 
-%template(csctocsr)   csctocsr<npy_cdouble>; 
-%template(csctocsr)   csctocsr<npy_clongdouble>; 
-
-
 /*
  * CSR<->COO and CSC<->COO
  */
-%template(csrtocoo)   csrtocoo<float>; 
-%template(csrtocoo)   csrtocoo<double>; 
-%template(csrtocoo)   csrtocoo<long double>; 
-%template(csrtocoo)   csrtocoo<npy_cfloat>; 
-%template(csrtocoo)   csrtocoo<npy_cdouble>; 
-%template(csrtocoo)   csrtocoo<npy_clongdouble>; 
+INSTANTIATE_ALL(csrtocoo)
+INSTANTIATE_ALL(csctocoo)
+INSTANTIATE_ALL(cootocsr)
+INSTANTIATE_ALL(cootocsc)
 
-%template(cootocsr)   cootocsr<float>; 
-%template(cootocsr)   cootocsr<double>; 
-%template(cootocsr)   cootocsr<long double>; 
-%template(cootocsr)   cootocsr<npy_cfloat>; 
-%template(cootocsr)   cootocsr<npy_cdouble>; 
-%template(cootocsr)   cootocsr<npy_clongdouble>; 
-
-%template(csctocoo)   csctocoo<float>; 
-%template(csctocoo)   csctocoo<double>; 
-%template(csctocoo)   csctocoo<long double>; 
-%template(csctocoo)   csctocoo<npy_cfloat>; 
-%template(csctocoo)   csctocoo<npy_cdouble>; 
-%template(csctocoo)   csctocoo<npy_clongdouble>; 
-
-%template(cootocsc)   cootocsc<float>; 
-%template(cootocsc)   cootocsc<double>; 
-%template(cootocsc)   cootocsc<long double>; 
-%template(cootocsc)   cootocsc<npy_cfloat>; 
-%template(cootocsc)   cootocsc<npy_cdouble>; 
-%template(cootocsc)   cootocsc<npy_clongdouble>; 
-
-
 /*
  * CSR+CSR and CSC+CSC
  */
-%template(csrplcsr)   csrplcsr<float>; 
-%template(csrplcsr)   csrplcsr<double>; 
-%template(csrplcsr)   csrplcsr<long double>; 
-%template(csrplcsr)   csrplcsr<npy_cfloat>; 
-%template(csrplcsr)   csrplcsr<npy_cdouble>; 
-%template(csrplcsr)   csrplcsr<npy_clongdouble>; 
+INSTANTIATE_ALL(csrplcsr)
+INSTANTIATE_ALL(cscplcsc)
 
-%template(cscplcsc)   cscplcsc<float>; 
-%template(cscplcsc)   cscplcsc<double>; 
-%template(cscplcsc)   cscplcsc<long double>; 
-%template(cscplcsc)   cscplcsc<npy_cfloat>; 
-%template(cscplcsc)   cscplcsc<npy_cdouble>; 
-%template(cscplcsc)   cscplcsc<npy_clongdouble>; 
-
-
-
 /*
  * CSR*CSR and CSC*CSC
  */
-%template(csrmucsr)   csrmucsr<float>; 
-%template(csrmucsr)   csrmucsr<double>; 
-%template(csrmucsr)   csrmucsr<long double>; 
-%template(csrmucsr)   csrmucsr<npy_cfloat>; 
-%template(csrmucsr)   csrmucsr<npy_cdouble>; 
-%template(csrmucsr)   csrmucsr<npy_clongdouble>; 
+INSTANTIATE_ALL(csrmucsr)
+INSTANTIATE_ALL(cscmucsc)
 
-%template(cscmucsc)   cscmucsc<float>; 
-%template(cscmucsc)   cscmucsc<double>; 
-%template(cscmucsc)   cscmucsc<long double>; 
-%template(cscmucsc)   cscmucsc<npy_cfloat>; 
-%template(cscmucsc)   cscmucsc<npy_cdouble>; 
-%template(cscmucsc)   cscmucsc<npy_clongdouble>; 
-
 /*
  * CSR*x and CSC*x
  */
-%template(csrmux)   csrmux<float>; 
-%template(csrmux)   csrmux<double>; 
-%template(csrmux)   csrmux<long double>; 
-%template(csrmux)   csrmux<npy_cfloat>; 
-%template(csrmux)   csrmux<npy_cdouble>; 
-%template(csrmux)   csrmux<npy_clongdouble>; 
+INSTANTIATE_ALL(csrmux)
+INSTANTIATE_ALL(cscmux)
 
-%template(cscmux)   cscmux<float>; 
-%template(cscmux)   cscmux<double>; 
-%template(cscmux)   cscmux<long double>; 
-%template(cscmux)   cscmux<npy_cfloat>; 
-%template(cscmux)   cscmux<npy_cdouble>; 
-%template(cscmux)   cscmux<npy_clongdouble>; 
-
-
 /*
  * CSR(elmul)CSR and CSC(elmul)CSC
  */
-%template(csrelmulcsr)   csrelmulcsr<float>; 
-%template(csrelmulcsr)   csrelmulcsr<double>; 
-%template(csrelmulcsr)   csrelmulcsr<long double>; 
-%template(csrelmulcsr)   csrelmulcsr<npy_cfloat>; 
-%template(csrelmulcsr)   csrelmulcsr<npy_cdouble>; 
-%template(csrelmulcsr)   csrelmulcsr<npy_clongdouble>; 
+INSTANTIATE_ALL(csrelmulcsr)
+INSTANTIATE_ALL(cscelmulcsc)
 
-%template(cscelmulcsc)   cscelmulcsc<float>; 
-%template(cscelmulcsc)   cscelmulcsc<double>; 
-%template(cscelmulcsc)   cscelmulcsc<long double>; 
-%template(cscelmulcsc)   cscelmulcsc<npy_cfloat>; 
-%template(cscelmulcsc)   cscelmulcsc<npy_cdouble>; 
-%template(cscelmulcsc)   cscelmulcsc<npy_clongdouble>; 
 
-
 /*
  * spdiags->CSC
  */
-%template(spdiags)   spdiags<float>; 
-%template(spdiags)   spdiags<double>; 
-%template(spdiags)   spdiags<long double>; 
-%template(spdiags)   spdiags<npy_cfloat>; 
-%template(spdiags)   spdiags<npy_cdouble>; 
-%template(spdiags)   spdiags<npy_clongdouble>; 
+INSTANTIATE_ALL(spdiags)
 
-
 /*
  * CSR<->Dense
  */
-%template(csrtodense)   csrtodense<float>; 
-%template(csrtodense)   csrtodense<double>; 
-%template(csrtodense)   csrtodense<long double>; 
-%template(csrtodense)   csrtodense<npy_cfloat>; 
-%template(csrtodense)   csrtodense<npy_cdouble>; 
-%template(csrtodense)   csrtodense<npy_clongdouble>; 
-
-%template(densetocsr)   densetocsr<float>; 
-%template(densetocsr)   densetocsr<double>; 
-%template(densetocsr)   densetocsr<long double>; 
-%template(densetocsr)   densetocsr<npy_cfloat>; 
-%template(densetocsr)   densetocsr<npy_cdouble>; 
-%template(densetocsr)   densetocsr<npy_clongdouble>; 
+INSTANTIATE_ALL(csrtodense)
+INSTANTIATE_ALL(densetocsr)

Modified: trunk/Lib/sparse/sparsetools/sparsetools.py
===================================================================
--- trunk/Lib/sparse/sparsetools/sparsetools.py	2007-01-09 05:49:05 UTC (rev 2509)
+++ trunk/Lib/sparse/sparsetools/sparsetools.py	2007-01-09 11:36:44 UTC (rev 2510)
@@ -52,358 +52,348 @@
 
 def csrtocsc(*args):
   """
+    csrtocsc(int n_row, int n_col, int Ap, int Aj, int Ax, std::vector<(int)> Bp, 
+        std::vector<(int)> Bi, std::vector<(int)> Bx)
+    csrtocsc(int n_row, int n_col, int Ap, int Aj, long Ax, std::vector<(int)> Bp, 
+        std::vector<(int)> Bi, std::vector<(long)> Bx)
     csrtocsc(int n_row, int n_col, int Ap, int Aj, float Ax, std::vector<(int)> Bp, 
         std::vector<(int)> Bi, std::vector<(float)> Bx)
     csrtocsc(int n_row, int n_col, int Ap, int Aj, double Ax, std::vector<(int)> Bp, 
         std::vector<(int)> Bi, std::vector<(double)> Bx)
-    csrtocsc(int n_row, int n_col, int Ap, int Aj, long double Ax, 
-        std::vector<(int)> Bp, std::vector<(int)> Bi, 
-        std::vector<(long double)> Bx)
     csrtocsc(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bi, 
         std::vector<(npy_cfloat)> Bx)
     csrtocsc(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bi, 
         std::vector<(npy_cdouble)> Bx)
-    csrtocsc(int n_row, int n_col, int Ap, int Aj, npy_clongdouble Ax, 
-        std::vector<(int)> Bp, std::vector<(int)> Bi, 
-        std::vector<(npy_clongdouble)> Bx)
     """
   return _sparsetools.csrtocsc(*args)
 
 def csctocsr(*args):
   """
+    csctocsr(int n_row, int n_col, int Ap, int Ai, int Ax, std::vector<(int)> Bp, 
+        std::vector<(int)> Bj, std::vector<(int)> Bx)
+    csctocsr(int n_row, int n_col, int Ap, int Ai, long Ax, std::vector<(int)> Bp, 
+        std::vector<(int)> Bj, std::vector<(long)> Bx)
     csctocsr(int n_row, int n_col, int Ap, int Ai, float Ax, std::vector<(int)> Bp, 
         std::vector<(int)> Bj, std::vector<(float)> Bx)
     csctocsr(int n_row, int n_col, int Ap, int Ai, double Ax, std::vector<(int)> Bp, 
         std::vector<(int)> Bj, std::vector<(double)> Bx)
-    csctocsr(int n_row, int n_col, int Ap, int Ai, long double Ax, 
-        std::vector<(int)> Bp, std::vector<(int)> Bj, 
-        std::vector<(long double)> Bx)
     csctocsr(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bj, 
         std::vector<(npy_cfloat)> Bx)
     csctocsr(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bj, 
         std::vector<(npy_cdouble)> Bx)
-    csctocsr(int n_row, int n_col, int Ap, int Ai, npy_clongdouble Ax, 
-        std::vector<(int)> Bp, std::vector<(int)> Bj, 
-        std::vector<(npy_clongdouble)> Bx)
     """
   return _sparsetools.csctocsr(*args)
 
 def csrtocoo(*args):
   """
+    csrtocoo(int n_row, int n_col, int Ap, int Aj, int Ax, std::vector<(int)> Bi, 
+        std::vector<(int)> Bj, std::vector<(int)> Bx)
+    csrtocoo(int n_row, int n_col, int Ap, int Aj, long Ax, std::vector<(int)> Bi, 
+        std::vector<(int)> Bj, std::vector<(long)> Bx)
     csrtocoo(int n_row, int n_col, int Ap, int Aj, float Ax, std::vector<(int)> Bi, 
         std::vector<(int)> Bj, std::vector<(float)> Bx)
     csrtocoo(int n_row, int n_col, int Ap, int Aj, double Ax, std::vector<(int)> Bi, 
         std::vector<(int)> Bj, std::vector<(double)> Bx)
-    csrtocoo(int n_row, int n_col, int Ap, int Aj, long double Ax, 
-        std::vector<(int)> Bi, std::vector<(int)> Bj, 
-        std::vector<(long double)> Bx)
     csrtocoo(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, 
         std::vector<(int)> Bi, std::vector<(int)> Bj, 
         std::vector<(npy_cfloat)> Bx)
     csrtocoo(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, 
         std::vector<(int)> Bi, std::vector<(int)> Bj, 
         std::vector<(npy_cdouble)> Bx)
-    csrtocoo(int n_row, int n_col, int Ap, int Aj, npy_clongdouble Ax, 
-        std::vector<(int)> Bi, std::vector<(int)> Bj, 
-        std::vector<(npy_clongdouble)> Bx)
     """
   return _sparsetools.csrtocoo(*args)
 
+def csctocoo(*args):
+  """
+    csctocoo(int n_row, int n_col, int Ap, int Ai, int Ax, std::vector<(int)> Bi, 
+        std::vector<(int)> Bj, std::vector<(int)> Bx)
+    csctocoo(int n_row, int n_col, int Ap, int Ai, long Ax, std::vector<(int)> Bi, 
+        std::vector<(int)> Bj, std::vector<(long)> Bx)
+    csctocoo(int n_row, int n_col, int Ap, int Ai, float Ax, std::vector<(int)> Bi, 
+        std::vector<(int)> Bj, std::vector<(float)> Bx)
+    csctocoo(int n_row, int n_col, int Ap, int Ai, double Ax, std::vector<(int)> Bi, 
+        std::vector<(int)> Bj, std::vector<(double)> Bx)
+    csctocoo(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, 
+        std::vector<(int)> Bi, std::vector<(int)> Bj, 
+        std::vector<(npy_cfloat)> Bx)
+    csctocoo(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, 
+        std::vector<(int)> Bi, std::vector<(int)> Bj, 
+        std::vector<(npy_cdouble)> Bx)
+    """
+  return _sparsetools.csctocoo(*args)
+
 def cootocsr(*args):
   """
+    cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, int Ax, 
+        std::vector<(int)> Bp, std::vector<(int)> Bj, 
+        std::vector<(int)> Bx)
+    cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, long Ax, 
+        std::vector<(int)> Bp, std::vector<(int)> Bj, 
+        std::vector<(long)> Bx)
     cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, float Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bj, 
         std::vector<(float)> Bx)
     cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, double Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bj, 
         std::vector<(double)> Bx)
-    cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, long double Ax, 
-        std::vector<(int)> Bp, std::vector<(int)> Bj, 
-        std::vector<(long double)> Bx)
     cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cfloat Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bj, 
         std::vector<(npy_cfloat)> Bx)
     cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cdouble Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bj, 
         std::vector<(npy_cdouble)> Bx)
-    cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_clongdouble Ax, 
-        std::vector<(int)> Bp, std::vector<(int)> Bj, 
-        std::vector<(npy_clongdouble)> Bx)
     """
   return _sparsetools.cootocsr(*args)
 
-def csctocoo(*args):
-  """
-    csctocoo(int n_row, int n_col, int Ap, int Ai, float Ax, std::vector<(int)> Bi, 
-        std::vector<(int)> Bj, std::vector<(float)> Bx)
-    csctocoo(int n_row, int n_col, int Ap, int Ai, double Ax, std::vector<(int)> Bi, 
-        std::vector<(int)> Bj, std::vector<(double)> Bx)
-    csctocoo(int n_row, int n_col, int Ap, int Ai, long double Ax, 
-        std::vector<(int)> Bi, std::vector<(int)> Bj, 
-        std::vector<(long double)> Bx)
-    csctocoo(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, 
-        std::vector<(int)> Bi, std::vector<(int)> Bj, 
-        std::vector<(npy_cfloat)> Bx)
-    csctocoo(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, 
-        std::vector<(int)> Bi, std::vector<(int)> Bj, 
-        std::vector<(npy_cdouble)> Bx)
-    csctocoo(int n_row, int n_col, int Ap, int Ai, npy_clongdouble Ax, 
-        std::vector<(int)> Bi, std::vector<(int)> Bj, 
-        std::vector<(npy_clongdouble)> Bx)
-    """
-  return _sparsetools.csctocoo(*args)
-
 def cootocsc(*args):
   """
+    cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, int Ax, 
+        std::vector<(int)> Bp, std::vector<(int)> Bi, 
+        std::vector<(int)> Bx)
+    cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, long Ax, 
+        std::vector<(int)> Bp, std::vector<(int)> Bi, 
+        std::vector<(long)> Bx)
     cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, float Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bi, 
         std::vector<(float)> Bx)
     cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, double Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bi, 
         std::vector<(double)> Bx)
-    cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, long double Ax, 
-        std::vector<(int)> Bp, std::vector<(int)> Bi, 
-        std::vector<(long double)> Bx)
     cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cfloat Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bi, 
         std::vector<(npy_cfloat)> Bx)
     cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cdouble Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bi, 
         std::vector<(npy_cdouble)> Bx)
-    cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_clongdouble Ax, 
-        std::vector<(int)> Bp, std::vector<(int)> Bi, 
-        std::vector<(npy_clongdouble)> Bx)
     """
   return _sparsetools.cootocsc(*args)
 
 def csrplcsr(*args):
   """
+    csrplcsr(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp, 
+        int Bj, int Bx, std::vector<(int)> Cp, std::vector<(int)> Cj, 
+        std::vector<(int)> Cx)
+    csrplcsr(int n_row, int n_col, int Ap, int Aj, long Ax, int Bp, 
+        int Bj, long Bx, std::vector<(int)> Cp, std::vector<(int)> Cj, 
+        std::vector<(long)> Cx)
     csrplcsr(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp, 
         int Bj, float Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Cj, std::vector<(float)> Cx)
     csrplcsr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, 
         int Bj, double Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Cj, std::vector<(double)> Cx)
-    csrplcsr(int n_row, int n_col, int Ap, int Aj, long double Ax, 
-        int Bp, int Bj, long double Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Cj, std::vector<(long double)> Cx)
     csrplcsr(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, 
         int Bp, int Bj, npy_cfloat Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Cj, std::vector<(npy_cfloat)> Cx)
     csrplcsr(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, 
         int Bp, int Bj, npy_cdouble Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Cj, std::vector<(npy_cdouble)> Cx)
-    csrplcsr(int n_row, int n_col, int Ap, int Aj, npy_clongdouble Ax, 
-        int Bp, int Bj, npy_clongdouble Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Cj, std::vector<(npy_clongdouble)> Cx)
     """
   return _sparsetools.csrplcsr(*args)
 
 def cscplcsc(*args):
   """
+    cscplcsc(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp, 
+        int Bi, int Bx, std::vector<(int)> Cp, std::vector<(int)> Ci, 
+        std::vector<(int)> Cx)
+    cscplcsc(int n_row, int n_col, int Ap, int Ai, long Ax, int Bp, 
+        int Bi, long Bx, std::vector<(int)> Cp, std::vector<(int)> Ci, 
+        std::vector<(long)> Cx)
     cscplcsc(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp, 
         int Bi, float Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Ci, std::vector<(float)> Cx)
     cscplcsc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, 
         int Bi, double Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Ci, std::vector<(double)> Cx)
-    cscplcsc(int n_row, int n_col, int Ap, int Ai, long double Ax, 
-        int Bp, int Bi, long double Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Ci, std::vector<(long double)> Cx)
     cscplcsc(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, 
         int Bp, int Bi, npy_cfloat Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Ci, std::vector<(npy_cfloat)> Cx)
     cscplcsc(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, 
         int Bp, int Bi, npy_cdouble Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Ci, std::vector<(npy_cdouble)> Cx)
-    cscplcsc(int n_row, int n_col, int Ap, int Ai, npy_clongdouble Ax, 
-        int Bp, int Bi, npy_clongdouble Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Ci, std::vector<(npy_clongdouble)> Cx)
     """
   return _sparsetools.cscplcsc(*args)
 
 def csrmucsr(*args):
   """
+    csrmucsr(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp, 
+        int Bj, int Bx, std::vector<(int)> Cp, std::vector<(int)> Cj, 
+        std::vector<(int)> Cx)
+    csrmucsr(int n_row, int n_col, int Ap, int Aj, long Ax, int Bp, 
+        int Bj, long Bx, std::vector<(int)> Cp, std::vector<(int)> Cj, 
+        std::vector<(long)> Cx)
     csrmucsr(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp, 
         int Bj, float Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Cj, std::vector<(float)> Cx)
     csrmucsr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, 
         int Bj, double Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Cj, std::vector<(double)> Cx)
-    csrmucsr(int n_row, int n_col, int Ap, int Aj, long double Ax, 
-        int Bp, int Bj, long double Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Cj, std::vector<(long double)> Cx)
     csrmucsr(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, 
         int Bp, int Bj, npy_cfloat Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Cj, std::vector<(npy_cfloat)> Cx)
     csrmucsr(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, 
         int Bp, int Bj, npy_cdouble Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Cj, std::vector<(npy_cdouble)> Cx)
-    csrmucsr(int n_row, int n_col, int Ap, int Aj, npy_clongdouble Ax, 
-        int Bp, int Bj, npy_clongdouble Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Cj, std::vector<(npy_clongdouble)> Cx)
     """
   return _sparsetools.csrmucsr(*args)
 
 def cscmucsc(*args):
   """
+    cscmucsc(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp, 
+        int Bi, int Bx, std::vector<(int)> Cp, std::vector<(int)> Ci, 
+        std::vector<(int)> Cx)
+    cscmucsc(int n_row, int n_col, int Ap, int Ai, long Ax, int Bp, 
+        int Bi, long Bx, std::vector<(int)> Cp, std::vector<(int)> Ci, 
+        std::vector<(long)> Cx)
     cscmucsc(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp, 
         int Bi, float Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Ci, std::vector<(float)> Cx)
     cscmucsc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, 
         int Bi, double Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Ci, std::vector<(double)> Cx)
-    cscmucsc(int n_row, int n_col, int Ap, int Ai, long double Ax, 
-        int Bp, int Bi, long double Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Ci, std::vector<(long double)> Cx)
     cscmucsc(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, 
         int Bp, int Bi, npy_cfloat Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Ci, std::vector<(npy_cfloat)> Cx)
     cscmucsc(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, 
         int Bp, int Bi, npy_cdouble Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Ci, std::vector<(npy_cdouble)> Cx)
-    cscmucsc(int n_row, int n_col, int Ap, int Ai, npy_clongdouble Ax, 
-        int Bp, int Bi, npy_clongdouble Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Ci, std::vector<(npy_clongdouble)> Cx)
     """
   return _sparsetools.cscmucsc(*args)
 
 def csrmux(*args):
   """
+    csrmux(int n_row, int n_col, int Ap, int Aj, int Ax, int Xx, 
+        std::vector<(int)> Yx)
+    csrmux(int n_row, int n_col, int Ap, int Aj, long Ax, long Xx, 
+        std::vector<(long)> Yx)
     csrmux(int n_row, int n_col, int Ap, int Aj, float Ax, float Xx, 
         std::vector<(float)> Yx)
     csrmux(int n_row, int n_col, int Ap, int Aj, double Ax, double Xx, 
         std::vector<(double)> Yx)
-    csrmux(int n_row, int n_col, int Ap, int Aj, long double Ax, 
-        long double Xx, std::vector<(long double)> Yx)
     csrmux(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, 
         npy_cfloat Xx, std::vector<(npy_cfloat)> Yx)
     csrmux(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, 
         npy_cdouble Xx, std::vector<(npy_cdouble)> Yx)
-    csrmux(int n_row, int n_col, int Ap, int Aj, npy_clongdouble Ax, 
-        npy_clongdouble Xx, std::vector<(npy_clongdouble)> Yx)
     """
   return _sparsetools.csrmux(*args)
 
 def cscmux(*args):
   """
+    cscmux(int n_row, int n_col, int Ap, int Ai, int Ax, int Xx, 
+        std::vector<(int)> Yx)
+    cscmux(int n_row, int n_col, int Ap, int Ai, long Ax, long Xx, 
+        std::vector<(long)> Yx)
     cscmux(int n_row, int n_col, int Ap, int Ai, float Ax, float Xx, 
         std::vector<(float)> Yx)
     cscmux(int n_row, int n_col, int Ap, int Ai, double Ax, double Xx, 
         std::vector<(double)> Yx)
-    cscmux(int n_row, int n_col, int Ap, int Ai, long double Ax, 
-        long double Xx, std::vector<(long double)> Yx)
     cscmux(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, 
         npy_cfloat Xx, std::vector<(npy_cfloat)> Yx)
     cscmux(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, 
         npy_cdouble Xx, std::vector<(npy_cdouble)> Yx)
-    cscmux(int n_row, int n_col, int Ap, int Ai, npy_clongdouble Ax, 
-        npy_clongdouble Xx, std::vector<(npy_clongdouble)> Yx)
     """
   return _sparsetools.cscmux(*args)
 
 def csrelmulcsr(*args):
   """
+    csrelmulcsr(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp, 
+        int Bj, int Bx, std::vector<(int)> Cp, std::vector<(int)> Cj, 
+        std::vector<(int)> Cx)
+    csrelmulcsr(int n_row, int n_col, int Ap, int Aj, long Ax, int Bp, 
+        int Bj, long Bx, std::vector<(int)> Cp, std::vector<(int)> Cj, 
+        std::vector<(long)> Cx)
     csrelmulcsr(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp, 
         int Bj, float Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Cj, std::vector<(float)> Cx)
     csrelmulcsr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, 
         int Bj, double Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Cj, std::vector<(double)> Cx)
-    csrelmulcsr(int n_row, int n_col, int Ap, int Aj, long double Ax, 
-        int Bp, int Bj, long double Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Cj, std::vector<(long double)> Cx)
     csrelmulcsr(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, 
         int Bp, int Bj, npy_cfloat Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Cj, std::vector<(npy_cfloat)> Cx)
     csrelmulcsr(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, 
         int Bp, int Bj, npy_cdouble Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Cj, std::vector<(npy_cdouble)> Cx)
-    csrelmulcsr(int n_row, int n_col, int Ap, int Aj, npy_clongdouble Ax, 
-        int Bp, int Bj, npy_clongdouble Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Cj, std::vector<(npy_clongdouble)> Cx)
     """
   return _sparsetools.csrelmulcsr(*args)
 
 def cscelmulcsc(*args):
   """
+    cscelmulcsc(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp, 
+        int Bi, int Bx, std::vector<(int)> Cp, std::vector<(int)> Ci, 
+        std::vector<(int)> Cx)
+    cscelmulcsc(int n_row, int n_col, int Ap, int Ai, long Ax, int Bp, 
+        int Bi, long Bx, std::vector<(int)> Cp, std::vector<(int)> Ci, 
+        std::vector<(long)> Cx)
     cscelmulcsc(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp, 
         int Bi, float Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Ci, std::vector<(float)> Cx)
     cscelmulcsc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, 
         int Bi, double Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Ci, std::vector<(double)> Cx)
-    cscelmulcsc(int n_row, int n_col, int Ap, int Ai, long double Ax, 
-        int Bp, int Bi, long double Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Ci, std::vector<(long double)> Cx)
     cscelmulcsc(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, 
         int Bp, int Bi, npy_cfloat Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Ci, std::vector<(npy_cfloat)> Cx)
     cscelmulcsc(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, 
         int Bp, int Bi, npy_cdouble Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Ci, std::vector<(npy_cdouble)> Cx)
-    cscelmulcsc(int n_row, int n_col, int Ap, int Ai, npy_clongdouble Ax, 
-        int Bp, int Bi, npy_clongdouble Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Ci, std::vector<(npy_clongdouble)> Cx)
     """
   return _sparsetools.cscelmulcsc(*args)
 
 def spdiags(*args):
   """
+    spdiags(int n_row, int n_col, int n_diag, int offsets, int diags, 
+        std::vector<(int)> Ap, std::vector<(int)> Ai, 
+        std::vector<(int)> Ax)
+    spdiags(int n_row, int n_col, int n_diag, int offsets, long diags, 
+        std::vector<(int)> Ap, std::vector<(int)> Ai, 
+        std::vector<(long)> Ax)
     spdiags(int n_row, int n_col, int n_diag, int offsets, float diags, 
         std::vector<(int)> Ap, std::vector<(int)> Ai, 
         std::vector<(float)> Ax)
     spdiags(int n_row, int n_col, int n_diag, int offsets, double diags, 
         std::vector<(int)> Ap, std::vector<(int)> Ai, 
         std::vector<(double)> Ax)
-    spdiags(int n_row, int n_col, int n_diag, int offsets, long double diags, 
-        std::vector<(int)> Ap, std::vector<(int)> Ai, 
-        std::vector<(long double)> Ax)
     spdiags(int n_row, int n_col, int n_diag, int offsets, npy_cfloat diags, 
         std::vector<(int)> Ap, std::vector<(int)> Ai, 
         std::vector<(npy_cfloat)> Ax)
     spdiags(int n_row, int n_col, int n_diag, int offsets, npy_cdouble diags, 
         std::vector<(int)> Ap, std::vector<(int)> Ai, 
         std::vector<(npy_cdouble)> Ax)
-    spdiags(int n_row, int n_col, int n_diag, int offsets, npy_clongdouble diags, 
-        std::vector<(int)> Ap, std::vector<(int)> Ai, 
-        std::vector<(npy_clongdouble)> Ax)
     """
   return _sparsetools.spdiags(*args)
 
 def csrtodense(*args):
   """
+    csrtodense(int n_row, int n_col, int Ap, int Aj, int Ax, int Mx)
+    csrtodense(int n_row, int n_col, int Ap, int Aj, long Ax, long Mx)
     csrtodense(int n_row, int n_col, int Ap, int Aj, float Ax, float Mx)
     csrtodense(int n_row, int n_col, int Ap, int Aj, double Ax, double Mx)
-    csrtodense(int n_row, int n_col, int Ap, int Aj, long double Ax, 
-        long double Mx)
     csrtodense(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, 
         npy_cfloat Mx)
     csrtodense(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, 
         npy_cdouble Mx)
-    csrtodense(int n_row, int n_col, int Ap, int Aj, npy_clongdouble Ax, 
-        npy_clongdouble Mx)
     """
   return _sparsetools.csrtodense(*args)
 
 def densetocsr(*args):
   """
+    densetocsr(int n_row, int n_col, int Mx, std::vector<(int)> Ap, 
+        std::vector<(int)> Aj, std::vector<(int)> Ax)
+    densetocsr(int n_row, int n_col, long Mx, std::vector<(int)> Ap, 
+        std::vector<(int)> Aj, std::vector<(long)> Ax)
     densetocsr(int n_row, int n_col, float Mx, std::vector<(int)> Ap, 
         std::vector<(int)> Aj, std::vector<(float)> Ax)
     densetocsr(int n_row, int n_col, double Mx, std::vector<(int)> Ap, 
         std::vector<(int)> Aj, std::vector<(double)> Ax)
-    densetocsr(int n_row, int n_col, long double Mx, std::vector<(int)> Ap, 
-        std::vector<(int)> Aj, std::vector<(long double)> Ax)
     densetocsr(int n_row, int n_col, npy_cfloat Mx, std::vector<(int)> Ap, 
         std::vector<(int)> Aj, std::vector<(npy_cfloat)> Ax)
     densetocsr(int n_row, int n_col, npy_cdouble Mx, std::vector<(int)> Ap, 
         std::vector<(int)> Aj, std::vector<(npy_cdouble)> Ax)
-    densetocsr(int n_row, int n_col, npy_clongdouble Mx, std::vector<(int)> Ap, 
-        std::vector<(int)> Aj, std::vector<(npy_clongdouble)> Ax)
     """
   return _sparsetools.densetocsr(*args)
 

Modified: trunk/Lib/sparse/sparsetools/sparsetools_wrap.cxx
===================================================================
--- trunk/Lib/sparse/sparsetools/sparsetools_wrap.cxx	2007-01-09 05:49:05 UTC (rev 2509)
+++ trunk/Lib/sparse/sparsetools/sparsetools_wrap.cxx	2007-01-09 11:36:44 UTC (rev 2510)
@@ -2466,16 +2466,14 @@
 /* -------- TYPES TABLE (BEGIN) -------- */
 
 #define SWIGTYPE_p_char swig_types[0]
-#define SWIGTYPE_p_npy_clongdouble swig_types[1]
-#define SWIGTYPE_p_std__vectorTdouble_t swig_types[2]
-#define SWIGTYPE_p_std__vectorTfloat_t swig_types[3]
-#define SWIGTYPE_p_std__vectorTint_t swig_types[4]
-#define SWIGTYPE_p_std__vectorTlong_double_t swig_types[5]
-#define SWIGTYPE_p_std__vectorTnpy_cdouble_t swig_types[6]
-#define SWIGTYPE_p_std__vectorTnpy_cfloat_t swig_types[7]
-#define SWIGTYPE_p_std__vectorTnpy_clongdouble_t swig_types[8]
-static swig_type_info *swig_types[10];
-static swig_module_info swig_module = {swig_types, 9, 0, 0, 0, 0};
+#define SWIGTYPE_p_std__vectorTdouble_t swig_types[1]
+#define SWIGTYPE_p_std__vectorTfloat_t swig_types[2]
+#define SWIGTYPE_p_std__vectorTint_t swig_types[3]
+#define SWIGTYPE_p_std__vectorTlong_t swig_types[4]
+#define SWIGTYPE_p_std__vectorTnpy_cdouble_t swig_types[5]
+#define SWIGTYPE_p_std__vectorTnpy_cfloat_t swig_types[6]
+static swig_type_info *swig_types[8];
+static swig_module_info swig_module = {swig_types, 7, 0, 0, 0, 0};
 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
 
@@ -2613,11 +2611,14 @@
 
 /* Given a Numeric typecode, return a string describing the type.
  */
-char* typecode_string(int typecode) {
-  char* type_names[20] = {"char","unsigned byte","byte","short",
-			  "unsigned short","int","unsigned int","long",
-			  "float","double","complex float","complex double",
-			  "object","ntype","unkown"};
+char* type_names[20] = {"char","unsigned byte","byte","short",
+			"unsigned short","int","unsigned int","long",
+			"float","double","complex float","complex double",
+			"object","ntype","unkown"};
+ char* typecode_string(int typecode) {
+  if(typecode < 0 || typecode > 19)
+    typecode = 19;
+
   return type_names[typecode];
 }
 
@@ -2859,10 +2860,6 @@
 }
 
 
-
-
-
-
 #include <limits.h>
 #ifndef LLONG_MIN
 # define LLONG_MIN	LONG_LONG_MIN
@@ -3018,10 +3015,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  float *arg5 ;
+  int *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<float > *arg8 = (std::vector<float > *) 0 ;
+  std::vector<int > *arg8 = (std::vector<int > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -3034,7 +3031,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<float > *tmp8 ;
+  std::vector<int > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -3050,7 +3047,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<float>(); 
+    tmp8 = new std::vector<int>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csrtocsc",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -3084,11 +3081,11 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (float*) array5->data;
+    arg5 = (int*) array5->data;
   }
-  csrtocsc<float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,arg6,arg7,arg8);
+  csrtocsc<int,int >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(int const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -3106,8 +3103,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(float)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(int)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -3141,10 +3138,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  double *arg5 ;
+  long *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<double > *arg8 = (std::vector<double > *) 0 ;
+  std::vector<long > *arg8 = (std::vector<long > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -3157,7 +3154,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<double > *tmp8 ;
+  std::vector<long > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -3173,7 +3170,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<double>(); 
+    tmp8 = new std::vector<long>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csrtocsc",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -3207,11 +3204,11 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONG, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (double*) array5->data;
+    arg5 = (long*) array5->data;
   }
-  csrtocsc<double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,arg6,arg7,arg8);
+  csrtocsc<int,long >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -3229,8 +3226,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONG); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(long)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -3264,10 +3261,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  long double *arg5 ;
+  float *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<long double > *arg8 = (std::vector<long double > *) 0 ;
+  std::vector<float > *arg8 = (std::vector<float > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -3280,7 +3277,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<long double > *tmp8 ;
+  std::vector<float > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -3296,7 +3293,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<long double>(); 
+    tmp8 = new std::vector<float>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csrtocsc",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -3330,11 +3327,11 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (long double*) array5->data;
+    arg5 = (float*) array5->data;
   }
-  csrtocsc<long double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long double const (*))arg5,arg6,arg7,arg8);
+  csrtocsc<int,float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -3352,8 +3349,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(long double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(float)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -3387,10 +3384,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  double *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg8 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<double > *arg8 = (std::vector<double > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -3403,7 +3400,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cfloat > *tmp8 ;
+  std::vector<double > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -3419,7 +3416,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cfloat>(); 
+    tmp8 = new std::vector<double>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csrtocsc",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -3453,11 +3450,11 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (double*) array5->data;
   }
-  csrtocsc<npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,arg6,arg7,arg8);
+  csrtocsc<int,double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -3475,8 +3472,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(double)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -3510,10 +3507,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cfloat *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg8 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cfloat > *arg8 = (std::vector<npy_cfloat > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -3526,7 +3523,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cdouble > *tmp8 ;
+  std::vector<npy_cfloat > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -3542,7 +3539,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cdouble>(); 
+    tmp8 = new std::vector<npy_cfloat>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csrtocsc",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -3576,11 +3573,11 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cfloat*) array5->data;
   }
-  csrtocsc<npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,arg6,arg7,arg8);
+  csrtocsc<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -3598,8 +3595,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -3633,10 +3630,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_clongdouble *arg5 ;
+  npy_cdouble *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_clongdouble > *arg8 = (std::vector<npy_clongdouble > *) 0 ;
+  std::vector<npy_cdouble > *arg8 = (std::vector<npy_cdouble > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -3649,7 +3646,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_clongdouble > *tmp8 ;
+  std::vector<npy_cdouble > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -3665,7 +3662,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_clongdouble>(); 
+    tmp8 = new std::vector<npy_cdouble>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csrtocsc",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -3699,11 +3696,11 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CLONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_clongdouble*) array5->data;
+    arg5 = (npy_cdouble*) array5->data;
   }
-  csrtocsc<npy_clongdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_clongdouble const (*))arg5,arg6,arg7,arg8);
+  csrtocsc<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -3721,8 +3718,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CLONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_clongdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -3781,7 +3778,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_csrtocsc__SWIG_1(self, args);
@@ -3812,7 +3809,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONG)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_csrtocsc__SWIG_2(self, args);
@@ -3843,7 +3840,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_csrtocsc__SWIG_3(self, args);
@@ -3874,7 +3871,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_csrtocsc__SWIG_4(self, args);
@@ -3905,7 +3902,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_csrtocsc__SWIG_5(self, args);
@@ -3936,7 +3933,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_csrtocsc__SWIG_6(self, args);
@@ -3948,7 +3945,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrtocsc'.\n  Possible C/C++ prototypes are:\n    csrtocsc<(float)>(int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csrtocsc<(double)>(int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csrtocsc<(long double)>(int const,int const,int const [],int const [],long double const [],std::vector<int > *,std::vector<int > *,std::vector<long double > *)\n    csrtocsc<(npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csrtocsc<(npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n    csrtocsc<(npy_clongdouble)>(int const,int const,int const [],int const [],npy_clongdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_clongdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrtocsc'.\n  Possible C/C++ prototypes are:\n    csrtocsc<(int,int)>(int const,int const,int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csrtocsc<(int,long)>(int const,int const,int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csrtocsc<(int,float)>(int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csrtocsc<(int,double)>(int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csrtocsc<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csrtocsc<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
   return NULL;
 }
 
@@ -3959,10 +3956,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  float *arg5 ;
+  int *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<float > *arg8 = (std::vector<float > *) 0 ;
+  std::vector<int > *arg8 = (std::vector<int > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -3975,7 +3972,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<float > *tmp8 ;
+  std::vector<int > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -3991,7 +3988,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<float>(); 
+    tmp8 = new std::vector<int>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocsr",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -4025,11 +4022,11 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (float*) array5->data;
+    arg5 = (int*) array5->data;
   }
-  csctocsr<float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,arg6,arg7,arg8);
+  csctocsr<int,int >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(int const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -4047,8 +4044,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(float)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(int)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -4082,10 +4079,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  double *arg5 ;
+  long *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<double > *arg8 = (std::vector<double > *) 0 ;
+  std::vector<long > *arg8 = (std::vector<long > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -4098,7 +4095,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<double > *tmp8 ;
+  std::vector<long > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -4114,7 +4111,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<double>(); 
+    tmp8 = new std::vector<long>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocsr",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -4148,11 +4145,11 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONG, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (double*) array5->data;
+    arg5 = (long*) array5->data;
   }
-  csctocsr<double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,arg6,arg7,arg8);
+  csctocsr<int,long >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -4170,8 +4167,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONG); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(long)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -4205,10 +4202,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  long double *arg5 ;
+  float *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<long double > *arg8 = (std::vector<long double > *) 0 ;
+  std::vector<float > *arg8 = (std::vector<float > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -4221,7 +4218,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<long double > *tmp8 ;
+  std::vector<float > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -4237,7 +4234,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<long double>(); 
+    tmp8 = new std::vector<float>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocsr",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -4271,11 +4268,11 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (long double*) array5->data;
+    arg5 = (float*) array5->data;
   }
-  csctocsr<long double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long double const (*))arg5,arg6,arg7,arg8);
+  csctocsr<int,float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -4293,8 +4290,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(long double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(float)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -4328,10 +4325,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  double *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg8 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<double > *arg8 = (std::vector<double > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -4344,7 +4341,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cfloat > *tmp8 ;
+  std::vector<double > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -4360,7 +4357,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cfloat>(); 
+    tmp8 = new std::vector<double>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocsr",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -4394,11 +4391,11 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (double*) array5->data;
   }
-  csctocsr<npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,arg6,arg7,arg8);
+  csctocsr<int,double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -4416,8 +4413,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(double)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -4451,10 +4448,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cfloat *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg8 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cfloat > *arg8 = (std::vector<npy_cfloat > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -4467,7 +4464,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cdouble > *tmp8 ;
+  std::vector<npy_cfloat > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -4483,7 +4480,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cdouble>(); 
+    tmp8 = new std::vector<npy_cfloat>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocsr",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -4517,11 +4514,11 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cfloat*) array5->data;
   }
-  csctocsr<npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,arg6,arg7,arg8);
+  csctocsr<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -4539,8 +4536,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -4574,10 +4571,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_clongdouble *arg5 ;
+  npy_cdouble *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_clongdouble > *arg8 = (std::vector<npy_clongdouble > *) 0 ;
+  std::vector<npy_cdouble > *arg8 = (std::vector<npy_cdouble > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -4590,7 +4587,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_clongdouble > *tmp8 ;
+  std::vector<npy_cdouble > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -4606,7 +4603,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_clongdouble>(); 
+    tmp8 = new std::vector<npy_cdouble>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocsr",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -4640,11 +4637,11 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CLONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_clongdouble*) array5->data;
+    arg5 = (npy_cdouble*) array5->data;
   }
-  csctocsr<npy_clongdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_clongdouble const (*))arg5,arg6,arg7,arg8);
+  csctocsr<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -4662,8 +4659,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CLONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_clongdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -4722,7 +4719,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_csctocsr__SWIG_1(self, args);
@@ -4753,7 +4750,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONG)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_csctocsr__SWIG_2(self, args);
@@ -4784,7 +4781,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_csctocsr__SWIG_3(self, args);
@@ -4815,7 +4812,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_csctocsr__SWIG_4(self, args);
@@ -4846,7 +4843,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_csctocsr__SWIG_5(self, args);
@@ -4877,7 +4874,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_csctocsr__SWIG_6(self, args);
@@ -4889,7 +4886,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csctocsr'.\n  Possible C/C++ prototypes are:\n    csctocsr<(float)>(int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csctocsr<(double)>(int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csctocsr<(long double)>(int const,int const,int const [],int const [],long double const [],std::vector<int > *,std::vector<int > *,std::vector<long double > *)\n    csctocsr<(npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csctocsr<(npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n    csctocsr<(npy_clongdouble)>(int const,int const,int const [],int const [],npy_clongdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_clongdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csctocsr'.\n  Possible C/C++ prototypes are:\n    csctocsr<(int,int)>(int const,int const,int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csctocsr<(int,long)>(int const,int const,int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csctocsr<(int,float)>(int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csctocsr<(int,double)>(int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csctocsr<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csctocsr<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
   return NULL;
 }
 
@@ -4900,10 +4897,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  float *arg5 ;
+  int *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<float > *arg8 = (std::vector<float > *) 0 ;
+  std::vector<int > *arg8 = (std::vector<int > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -4916,7 +4913,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<float > *tmp8 ;
+  std::vector<int > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -4932,7 +4929,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<float>(); 
+    tmp8 = new std::vector<int>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csrtocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -4966,11 +4963,11 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (float*) array5->data;
+    arg5 = (int*) array5->data;
   }
-  csrtocoo<float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,arg6,arg7,arg8);
+  csrtocoo<int,int >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(int const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -4988,8 +4985,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(float)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(int)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -5023,10 +5020,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  double *arg5 ;
+  long *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<double > *arg8 = (std::vector<double > *) 0 ;
+  std::vector<long > *arg8 = (std::vector<long > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -5039,7 +5036,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<double > *tmp8 ;
+  std::vector<long > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -5055,7 +5052,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<double>(); 
+    tmp8 = new std::vector<long>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csrtocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -5089,11 +5086,11 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONG, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (double*) array5->data;
+    arg5 = (long*) array5->data;
   }
-  csrtocoo<double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,arg6,arg7,arg8);
+  csrtocoo<int,long >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -5111,8 +5108,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONG); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(long)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -5146,10 +5143,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  long double *arg5 ;
+  float *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<long double > *arg8 = (std::vector<long double > *) 0 ;
+  std::vector<float > *arg8 = (std::vector<float > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -5162,7 +5159,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<long double > *tmp8 ;
+  std::vector<float > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -5178,7 +5175,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<long double>(); 
+    tmp8 = new std::vector<float>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csrtocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -5212,11 +5209,11 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (long double*) array5->data;
+    arg5 = (float*) array5->data;
   }
-  csrtocoo<long double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long double const (*))arg5,arg6,arg7,arg8);
+  csrtocoo<int,float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -5234,8 +5231,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(long double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(float)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -5269,10 +5266,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  double *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg8 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<double > *arg8 = (std::vector<double > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -5285,7 +5282,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cfloat > *tmp8 ;
+  std::vector<double > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -5301,7 +5298,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cfloat>(); 
+    tmp8 = new std::vector<double>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csrtocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -5335,11 +5332,11 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (double*) array5->data;
   }
-  csrtocoo<npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,arg6,arg7,arg8);
+  csrtocoo<int,double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -5357,8 +5354,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(double)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -5392,10 +5389,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cfloat *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg8 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cfloat > *arg8 = (std::vector<npy_cfloat > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -5408,7 +5405,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cdouble > *tmp8 ;
+  std::vector<npy_cfloat > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -5424,7 +5421,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cdouble>(); 
+    tmp8 = new std::vector<npy_cfloat>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csrtocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -5458,11 +5455,11 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cfloat*) array5->data;
   }
-  csrtocoo<npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,arg6,arg7,arg8);
+  csrtocoo<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -5480,8 +5477,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -5515,10 +5512,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_clongdouble *arg5 ;
+  npy_cdouble *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_clongdouble > *arg8 = (std::vector<npy_clongdouble > *) 0 ;
+  std::vector<npy_cdouble > *arg8 = (std::vector<npy_cdouble > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -5531,7 +5528,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_clongdouble > *tmp8 ;
+  std::vector<npy_cdouble > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -5547,7 +5544,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_clongdouble>(); 
+    tmp8 = new std::vector<npy_cdouble>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csrtocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -5581,11 +5578,11 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CLONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_clongdouble*) array5->data;
+    arg5 = (npy_cdouble*) array5->data;
   }
-  csrtocoo<npy_clongdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_clongdouble const (*))arg5,arg6,arg7,arg8);
+  csrtocoo<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -5603,8 +5600,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CLONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_clongdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -5663,7 +5660,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_csrtocoo__SWIG_1(self, args);
@@ -5694,7 +5691,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONG)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_csrtocoo__SWIG_2(self, args);
@@ -5725,7 +5722,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_csrtocoo__SWIG_3(self, args);
@@ -5756,7 +5753,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_csrtocoo__SWIG_4(self, args);
@@ -5787,7 +5784,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_csrtocoo__SWIG_5(self, args);
@@ -5818,7 +5815,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_csrtocoo__SWIG_6(self, args);
@@ -5830,45 +5827,45 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrtocoo'.\n  Possible C/C++ prototypes are:\n    csrtocoo<(float)>(int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csrtocoo<(double)>(int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csrtocoo<(long double)>(int const,int const,int const [],int const [],long double const [],std::vector<int > *,std::vector<int > *,std::vector<long double > *)\n    csrtocoo<(npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csrtocoo<(npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n    csrtocoo<(npy_clongdouble)>(int const,int const,int const [],int const [],npy_clongdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_clongdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrtocoo'.\n  Possible C/C++ prototypes are:\n    csrtocoo<(int,int)>(int const,int const,int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csrtocoo<(int,long)>(int const,int const,int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csrtocoo<(int,float)>(int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csrtocoo<(int,double)>(int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csrtocoo<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csrtocoo<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_cootocsr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_csctocoo__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  int arg3 ;
+  int *arg3 ;
   int *arg4 ;
   int *arg5 ;
-  float *arg6 ;
+  std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
   std::vector<int > *arg8 = (std::vector<int > *) 0 ;
-  std::vector<float > *arg9 = (std::vector<float > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
   int ecode2 = 0 ;
-  int val3 ;
-  int ecode3 = 0 ;
+  PyArrayObject *array3 = NULL ;
+  int is_new_object3 ;
   PyArrayObject *array4 = NULL ;
   int is_new_object4 ;
   PyArrayObject *array5 = NULL ;
   int is_new_object5 ;
-  PyArrayObject *array6 = NULL ;
-  int is_new_object6 ;
+  std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
   std::vector<int > *tmp8 ;
-  std::vector<float > *tmp9 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
   PyObject * obj3 = 0 ;
   PyObject * obj4 = 0 ;
-  PyObject * obj5 = 0 ;
   
   {
+    tmp6 = new std::vector<int>(); 
+    arg6 = tmp6; 
+  }
+  {
     tmp7 = new std::vector<int>(); 
     arg7 = tmp7; 
   }
@@ -5876,30 +5873,29 @@
     tmp8 = new std::vector<int>(); 
     arg8 = tmp8; 
   }
-  {
-    tmp9 = new std::vector<float>(); 
-    arg9 = tmp9; 
-  }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cootocsr" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csctocoo" "', argument " "1"" of type '" "int""'");
   } 
   arg1 = static_cast< int >(val1);
   ecode2 = SWIG_AsVal_int(obj1, &val2);
   if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cootocsr" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "csctocoo" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
-  ecode3 = SWIG_AsVal_int(obj2, &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cootocsr" "', argument " "3"" of type '" "int""'");
-  } 
-  arg3 = static_cast< int >(val3);
   {
     npy_intp size[1] = {
       -1
     };
+    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_INT, &is_new_object3);
+    if (!array3 || !require_dimensions(array3,1) || !require_size(array3,size,1)) SWIG_fail;
+    arg3 = (int*) array3->data;
+  }
+  {
+    npy_intp size[1] = {
+      -1
+    };
     array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
     if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
     arg4 = (int*) array4->data;
@@ -5912,16 +5908,15 @@
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
     arg5 = (int*) array5->data;
   }
+  csctocoo<int,int >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(int const (*))arg5,arg6,arg7,arg8);
+  resultobj = SWIG_Py_Void();
   {
-    npy_intp size[1] = {
-      -1
-    };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_FLOAT, &is_new_object6);
-    if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (float*) array6->data;
+    int length = (arg6)->size(); 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(int)*length);	 
+    delete arg6; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
-  cootocsr<float >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(float const (*))arg6,arg7,arg8,arg9);
-  resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
@@ -5937,11 +5932,7 @@
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
-    int length = (arg9)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(float)*length);	 
-    delete arg9; 
-    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+    if (is_new_object3 && array3) Py_DECREF(array3);
   }
   {
     if (is_new_object4 && array4) Py_DECREF(array4);
@@ -5949,112 +5940,107 @@
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
-  {
-    if (is_new_object6 && array6) Py_DECREF(array6);
-  }
   return resultobj;
 fail:
   {
+    if (is_new_object3 && array3) Py_DECREF(array3);
+  }
+  {
     if (is_new_object4 && array4) Py_DECREF(array4);
   }
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
-  {
-    if (is_new_object6 && array6) Py_DECREF(array6);
-  }
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_cootocsr__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_csctocoo__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  int arg3 ;
+  int *arg3 ;
   int *arg4 ;
-  int *arg5 ;
-  double *arg6 ;
+  long *arg5 ;
+  std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<int > *arg8 = (std::vector<int > *) 0 ;
-  std::vector<double > *arg9 = (std::vector<double > *) 0 ;
+  std::vector<long > *arg8 = (std::vector<long > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
   int ecode2 = 0 ;
-  int val3 ;
-  int ecode3 = 0 ;
+  PyArrayObject *array3 = NULL ;
+  int is_new_object3 ;
   PyArrayObject *array4 = NULL ;
   int is_new_object4 ;
   PyArrayObject *array5 = NULL ;
   int is_new_object5 ;
-  PyArrayObject *array6 = NULL ;
-  int is_new_object6 ;
+  std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<int > *tmp8 ;
-  std::vector<double > *tmp9 ;
+  std::vector<long > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
   PyObject * obj3 = 0 ;
   PyObject * obj4 = 0 ;
-  PyObject * obj5 = 0 ;
   
   {
+    tmp6 = new std::vector<int>(); 
+    arg6 = tmp6; 
+  }
+  {
     tmp7 = new std::vector<int>(); 
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<int>(); 
+    tmp8 = new std::vector<long>(); 
     arg8 = tmp8; 
   }
-  {
-    tmp9 = new std::vector<double>(); 
-    arg9 = tmp9; 
-  }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cootocsr" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csctocoo" "', argument " "1"" of type '" "int""'");
   } 
   arg1 = static_cast< int >(val1);
   ecode2 = SWIG_AsVal_int(obj1, &val2);
   if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cootocsr" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "csctocoo" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
-  ecode3 = SWIG_AsVal_int(obj2, &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cootocsr" "', argument " "3"" of type '" "int""'");
-  } 
-  arg3 = static_cast< int >(val3);
   {
     npy_intp size[1] = {
       -1
     };
-    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
-    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
-    arg4 = (int*) array4->data;
+    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_INT, &is_new_object3);
+    if (!array3 || !require_dimensions(array3,1) || !require_size(array3,size,1)) SWIG_fail;
+    arg3 = (int*) array3->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
-    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (int*) array5->data;
+    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
+    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
+    arg4 = (int*) array4->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_DOUBLE, &is_new_object6);
-    if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (double*) array6->data;
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONG, &is_new_object5);
+    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
+    arg5 = (long*) array5->data;
   }
-  cootocsr<double >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(double const (*))arg6,arg7,arg8,arg9);
+  csctocoo<int,long >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
+    int length = (arg6)->size(); 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(int)*length);	 
+    delete arg6; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+  }
+  {
     int length = (arg7)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
     memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(int)*length);	 
@@ -6063,17 +6049,13 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(int)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONG); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(long)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
-    int length = (arg9)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(double)*length);	 
-    delete arg9; 
-    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+    if (is_new_object3 && array3) Py_DECREF(array3);
   }
   {
     if (is_new_object4 && array4) Py_DECREF(array4);
@@ -6081,112 +6063,107 @@
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
-  {
-    if (is_new_object6 && array6) Py_DECREF(array6);
-  }
   return resultobj;
 fail:
   {
+    if (is_new_object3 && array3) Py_DECREF(array3);
+  }
+  {
     if (is_new_object4 && array4) Py_DECREF(array4);
   }
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
-  {
-    if (is_new_object6 && array6) Py_DECREF(array6);
-  }
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_cootocsr__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_csctocoo__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  int arg3 ;
+  int *arg3 ;
   int *arg4 ;
-  int *arg5 ;
-  long double *arg6 ;
+  float *arg5 ;
+  std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<int > *arg8 = (std::vector<int > *) 0 ;
-  std::vector<long double > *arg9 = (std::vector<long double > *) 0 ;
+  std::vector<float > *arg8 = (std::vector<float > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
   int ecode2 = 0 ;
-  int val3 ;
-  int ecode3 = 0 ;
+  PyArrayObject *array3 = NULL ;
+  int is_new_object3 ;
   PyArrayObject *array4 = NULL ;
   int is_new_object4 ;
   PyArrayObject *array5 = NULL ;
   int is_new_object5 ;
-  PyArrayObject *array6 = NULL ;
-  int is_new_object6 ;
+  std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<int > *tmp8 ;
-  std::vector<long double > *tmp9 ;
+  std::vector<float > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
   PyObject * obj3 = 0 ;
   PyObject * obj4 = 0 ;
-  PyObject * obj5 = 0 ;
   
   {
+    tmp6 = new std::vector<int>(); 
+    arg6 = tmp6; 
+  }
+  {
     tmp7 = new std::vector<int>(); 
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<int>(); 
+    tmp8 = new std::vector<float>(); 
     arg8 = tmp8; 
   }
-  {
-    tmp9 = new std::vector<long double>(); 
-    arg9 = tmp9; 
-  }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cootocsr" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csctocoo" "', argument " "1"" of type '" "int""'");
   } 
   arg1 = static_cast< int >(val1);
   ecode2 = SWIG_AsVal_int(obj1, &val2);
   if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cootocsr" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "csctocoo" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
-  ecode3 = SWIG_AsVal_int(obj2, &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cootocsr" "', argument " "3"" of type '" "int""'");
-  } 
-  arg3 = static_cast< int >(val3);
   {
     npy_intp size[1] = {
       -1
     };
-    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
-    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
-    arg4 = (int*) array4->data;
+    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_INT, &is_new_object3);
+    if (!array3 || !require_dimensions(array3,1) || !require_size(array3,size,1)) SWIG_fail;
+    arg3 = (int*) array3->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
-    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (int*) array5->data;
+    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
+    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
+    arg4 = (int*) array4->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_LONGDOUBLE, &is_new_object6);
-    if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (long double*) array6->data;
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
+    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
+    arg5 = (float*) array5->data;
   }
-  cootocsr<long double >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(long double const (*))arg6,arg7,arg8,arg9);
+  csctocoo<int,float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
+    int length = (arg6)->size(); 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(int)*length);	 
+    delete arg6; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+  }
+  {
     int length = (arg7)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
     memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(int)*length);	 
@@ -6195,17 +6172,13 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(int)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(float)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
-    int length = (arg9)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(long double)*length);	 
-    delete arg9; 
-    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+    if (is_new_object3 && array3) Py_DECREF(array3);
   }
   {
     if (is_new_object4 && array4) Py_DECREF(array4);
@@ -6213,112 +6186,107 @@
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
-  {
-    if (is_new_object6 && array6) Py_DECREF(array6);
-  }
   return resultobj;
 fail:
   {
+    if (is_new_object3 && array3) Py_DECREF(array3);
+  }
+  {
     if (is_new_object4 && array4) Py_DECREF(array4);
   }
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
-  {
-    if (is_new_object6 && array6) Py_DECREF(array6);
-  }
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_cootocsr__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_csctocoo__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  int arg3 ;
+  int *arg3 ;
   int *arg4 ;
-  int *arg5 ;
-  npy_cfloat *arg6 ;
+  double *arg5 ;
+  std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<int > *arg8 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg9 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<double > *arg8 = (std::vector<double > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
   int ecode2 = 0 ;
-  int val3 ;
-  int ecode3 = 0 ;
+  PyArrayObject *array3 = NULL ;
+  int is_new_object3 ;
   PyArrayObject *array4 = NULL ;
   int is_new_object4 ;
   PyArrayObject *array5 = NULL ;
   int is_new_object5 ;
-  PyArrayObject *array6 = NULL ;
-  int is_new_object6 ;
+  std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<int > *tmp8 ;
-  std::vector<npy_cfloat > *tmp9 ;
+  std::vector<double > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
   PyObject * obj3 = 0 ;
   PyObject * obj4 = 0 ;
-  PyObject * obj5 = 0 ;
   
   {
+    tmp6 = new std::vector<int>(); 
+    arg6 = tmp6; 
+  }
+  {
     tmp7 = new std::vector<int>(); 
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<int>(); 
+    tmp8 = new std::vector<double>(); 
     arg8 = tmp8; 
   }
-  {
-    tmp9 = new std::vector<npy_cfloat>(); 
-    arg9 = tmp9; 
-  }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cootocsr" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csctocoo" "', argument " "1"" of type '" "int""'");
   } 
   arg1 = static_cast< int >(val1);
   ecode2 = SWIG_AsVal_int(obj1, &val2);
   if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cootocsr" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "csctocoo" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
-  ecode3 = SWIG_AsVal_int(obj2, &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cootocsr" "', argument " "3"" of type '" "int""'");
-  } 
-  arg3 = static_cast< int >(val3);
   {
     npy_intp size[1] = {
       -1
     };
-    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
-    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
-    arg4 = (int*) array4->data;
+    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_INT, &is_new_object3);
+    if (!array3 || !require_dimensions(array3,1) || !require_size(array3,size,1)) SWIG_fail;
+    arg3 = (int*) array3->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
-    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (int*) array5->data;
+    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
+    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
+    arg4 = (int*) array4->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CFLOAT, &is_new_object6);
-    if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_cfloat*) array6->data;
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
+    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
+    arg5 = (double*) array5->data;
   }
-  cootocsr<npy_cfloat >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(npy_cfloat const (*))arg6,arg7,arg8,arg9);
+  csctocoo<int,double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
+    int length = (arg6)->size(); 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(int)*length);	 
+    delete arg6; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+  }
+  {
     int length = (arg7)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
     memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(int)*length);	 
@@ -6327,17 +6295,13 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(int)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(double)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
-    int length = (arg9)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(npy_cfloat)*length);	 
-    delete arg9; 
-    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+    if (is_new_object3 && array3) Py_DECREF(array3);
   }
   {
     if (is_new_object4 && array4) Py_DECREF(array4);
@@ -6345,112 +6309,107 @@
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
-  {
-    if (is_new_object6 && array6) Py_DECREF(array6);
-  }
   return resultobj;
 fail:
   {
+    if (is_new_object3 && array3) Py_DECREF(array3);
+  }
+  {
     if (is_new_object4 && array4) Py_DECREF(array4);
   }
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
-  {
-    if (is_new_object6 && array6) Py_DECREF(array6);
-  }
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_cootocsr__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_csctocoo__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  int arg3 ;
+  int *arg3 ;
   int *arg4 ;
-  int *arg5 ;
-  npy_cdouble *arg6 ;
+  npy_cfloat *arg5 ;
+  std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<int > *arg8 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg9 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cfloat > *arg8 = (std::vector<npy_cfloat > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
   int ecode2 = 0 ;
-  int val3 ;
-  int ecode3 = 0 ;
+  PyArrayObject *array3 = NULL ;
+  int is_new_object3 ;
   PyArrayObject *array4 = NULL ;
   int is_new_object4 ;
   PyArrayObject *array5 = NULL ;
   int is_new_object5 ;
-  PyArrayObject *array6 = NULL ;
-  int is_new_object6 ;
+  std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<int > *tmp8 ;
-  std::vector<npy_cdouble > *tmp9 ;
+  std::vector<npy_cfloat > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
   PyObject * obj3 = 0 ;
   PyObject * obj4 = 0 ;
-  PyObject * obj5 = 0 ;
   
   {
+    tmp6 = new std::vector<int>(); 
+    arg6 = tmp6; 
+  }
+  {
     tmp7 = new std::vector<int>(); 
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<int>(); 
+    tmp8 = new std::vector<npy_cfloat>(); 
     arg8 = tmp8; 
   }
-  {
-    tmp9 = new std::vector<npy_cdouble>(); 
-    arg9 = tmp9; 
-  }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cootocsr" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csctocoo" "', argument " "1"" of type '" "int""'");
   } 
   arg1 = static_cast< int >(val1);
   ecode2 = SWIG_AsVal_int(obj1, &val2);
   if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cootocsr" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "csctocoo" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
-  ecode3 = SWIG_AsVal_int(obj2, &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cootocsr" "', argument " "3"" of type '" "int""'");
-  } 
-  arg3 = static_cast< int >(val3);
   {
     npy_intp size[1] = {
       -1
     };
-    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
-    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
-    arg4 = (int*) array4->data;
+    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_INT, &is_new_object3);
+    if (!array3 || !require_dimensions(array3,1) || !require_size(array3,size,1)) SWIG_fail;
+    arg3 = (int*) array3->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
-    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (int*) array5->data;
+    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
+    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
+    arg4 = (int*) array4->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CDOUBLE, &is_new_object6);
-    if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_cdouble*) array6->data;
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
+    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
+    arg5 = (npy_cfloat*) array5->data;
   }
-  cootocsr<npy_cdouble >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(npy_cdouble const (*))arg6,arg7,arg8,arg9);
+  csctocoo<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
+    int length = (arg6)->size(); 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(int)*length);	 
+    delete arg6; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+  }
+  {
     int length = (arg7)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
     memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(int)*length);	 
@@ -6459,17 +6418,13 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(int)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
-    int length = (arg9)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(npy_cdouble)*length);	 
-    delete arg9; 
-    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+    if (is_new_object3 && array3) Py_DECREF(array3);
   }
   {
     if (is_new_object4 && array4) Py_DECREF(array4);
@@ -6477,112 +6432,107 @@
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
-  {
-    if (is_new_object6 && array6) Py_DECREF(array6);
-  }
   return resultobj;
 fail:
   {
+    if (is_new_object3 && array3) Py_DECREF(array3);
+  }
+  {
     if (is_new_object4 && array4) Py_DECREF(array4);
   }
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
-  {
-    if (is_new_object6 && array6) Py_DECREF(array6);
-  }
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_cootocsr__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_csctocoo__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  int arg3 ;
+  int *arg3 ;
   int *arg4 ;
-  int *arg5 ;
-  npy_clongdouble *arg6 ;
+  npy_cdouble *arg5 ;
+  std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<int > *arg8 = (std::vector<int > *) 0 ;
-  std::vector<npy_clongdouble > *arg9 = (std::vector<npy_clongdouble > *) 0 ;
+  std::vector<npy_cdouble > *arg8 = (std::vector<npy_cdouble > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
   int ecode2 = 0 ;
-  int val3 ;
-  int ecode3 = 0 ;
+  PyArrayObject *array3 = NULL ;
+  int is_new_object3 ;
   PyArrayObject *array4 = NULL ;
   int is_new_object4 ;
   PyArrayObject *array5 = NULL ;
   int is_new_object5 ;
-  PyArrayObject *array6 = NULL ;
-  int is_new_object6 ;
+  std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<int > *tmp8 ;
-  std::vector<npy_clongdouble > *tmp9 ;
+  std::vector<npy_cdouble > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
   PyObject * obj3 = 0 ;
   PyObject * obj4 = 0 ;
-  PyObject * obj5 = 0 ;
   
   {
+    tmp6 = new std::vector<int>(); 
+    arg6 = tmp6; 
+  }
+  {
     tmp7 = new std::vector<int>(); 
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<int>(); 
+    tmp8 = new std::vector<npy_cdouble>(); 
     arg8 = tmp8; 
   }
-  {
-    tmp9 = new std::vector<npy_clongdouble>(); 
-    arg9 = tmp9; 
-  }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cootocsr" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csctocoo" "', argument " "1"" of type '" "int""'");
   } 
   arg1 = static_cast< int >(val1);
   ecode2 = SWIG_AsVal_int(obj1, &val2);
   if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cootocsr" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "csctocoo" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
-  ecode3 = SWIG_AsVal_int(obj2, &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cootocsr" "', argument " "3"" of type '" "int""'");
-  } 
-  arg3 = static_cast< int >(val3);
   {
     npy_intp size[1] = {
       -1
     };
-    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
-    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
-    arg4 = (int*) array4->data;
+    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_INT, &is_new_object3);
+    if (!array3 || !require_dimensions(array3,1) || !require_size(array3,size,1)) SWIG_fail;
+    arg3 = (int*) array3->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
-    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (int*) array5->data;
+    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
+    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
+    arg4 = (int*) array4->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CLONGDOUBLE, &is_new_object6);
-    if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_clongdouble*) array6->data;
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
+    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
+    arg5 = (npy_cdouble*) array5->data;
   }
-  cootocsr<npy_clongdouble >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(npy_clongdouble const (*))arg6,arg7,arg8,arg9);
+  csctocoo<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
+    int length = (arg6)->size(); 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(int)*length);	 
+    delete arg6; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+  }
+  {
     int length = (arg7)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
     memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(int)*length);	 
@@ -6591,17 +6541,13 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(int)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
-    int length = (arg9)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CLONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(npy_clongdouble)*length);	 
-    delete arg9; 
-    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+    if (is_new_object3 && array3) Py_DECREF(array3);
   }
   {
     if (is_new_object4 && array4) Py_DECREF(array4);
@@ -6609,35 +6555,32 @@
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
-  {
-    if (is_new_object6 && array6) Py_DECREF(array6);
-  }
   return resultobj;
 fail:
   {
+    if (is_new_object3 && array3) Py_DECREF(array3);
+  }
+  {
     if (is_new_object4 && array4) Py_DECREF(array4);
   }
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
-  {
-    if (is_new_object6 && array6) Py_DECREF(array6);
-  }
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_cootocsr(PyObject *self, PyObject *args) {
+SWIGINTERN PyObject *_wrap_csctocoo(PyObject *self, PyObject *args) {
   int argc;
-  PyObject *argv[7];
+  PyObject *argv[6];
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
   argc = PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 6); ii++) {
+  for (ii = 0; (ii < argc) && (ii < 5); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
-  if (argc == 6) {
+  if (argc == 5) {
     int _v;
     {
       int res = SWIG_AsVal_int(argv[0], NULL);
@@ -6650,8 +6593,7 @@
       }
       if (_v) {
         {
-          int res = SWIG_AsVal_int(argv[2], NULL);
-          _v = SWIG_CheckState(res);
+          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
         }
         if (_v) {
           {
@@ -6662,19 +6604,14 @@
               _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
-              {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_FLOAT)) ? 1 : 0;
-              }
-              if (_v) {
-                return _wrap_cootocsr__SWIG_1(self, args);
-              }
+              return _wrap_csctocoo__SWIG_1(self, args);
             }
           }
         }
       }
     }
   }
-  if (argc == 6) {
+  if (argc == 5) {
     int _v;
     {
       int res = SWIG_AsVal_int(argv[0], NULL);
@@ -6687,8 +6624,7 @@
       }
       if (_v) {
         {
-          int res = SWIG_AsVal_int(argv[2], NULL);
-          _v = SWIG_CheckState(res);
+          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
         }
         if (_v) {
           {
@@ -6696,22 +6632,17 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONG)) ? 1 : 0;
             }
             if (_v) {
-              {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_DOUBLE)) ? 1 : 0;
-              }
-              if (_v) {
-                return _wrap_cootocsr__SWIG_2(self, args);
-              }
+              return _wrap_csctocoo__SWIG_2(self, args);
             }
           }
         }
       }
     }
   }
-  if (argc == 6) {
+  if (argc == 5) {
     int _v;
     {
       int res = SWIG_AsVal_int(argv[0], NULL);
@@ -6724,8 +6655,7 @@
       }
       if (_v) {
         {
-          int res = SWIG_AsVal_int(argv[2], NULL);
-          _v = SWIG_CheckState(res);
+          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
         }
         if (_v) {
           {
@@ -6733,22 +6663,17 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
             }
             if (_v) {
-              {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_LONGDOUBLE)) ? 1 : 0;
-              }
-              if (_v) {
-                return _wrap_cootocsr__SWIG_3(self, args);
-              }
+              return _wrap_csctocoo__SWIG_3(self, args);
             }
           }
         }
       }
     }
   }
-  if (argc == 6) {
+  if (argc == 5) {
     int _v;
     {
       int res = SWIG_AsVal_int(argv[0], NULL);
@@ -6761,8 +6686,7 @@
       }
       if (_v) {
         {
-          int res = SWIG_AsVal_int(argv[2], NULL);
-          _v = SWIG_CheckState(res);
+          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
         }
         if (_v) {
           {
@@ -6770,22 +6694,17 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
             }
             if (_v) {
-              {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CFLOAT)) ? 1 : 0;
-              }
-              if (_v) {
-                return _wrap_cootocsr__SWIG_4(self, args);
-              }
+              return _wrap_csctocoo__SWIG_4(self, args);
             }
           }
         }
       }
     }
   }
-  if (argc == 6) {
+  if (argc == 5) {
     int _v;
     {
       int res = SWIG_AsVal_int(argv[0], NULL);
@@ -6798,8 +6717,7 @@
       }
       if (_v) {
         {
-          int res = SWIG_AsVal_int(argv[2], NULL);
-          _v = SWIG_CheckState(res);
+          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
         }
         if (_v) {
           {
@@ -6807,22 +6725,17 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
             }
             if (_v) {
-              {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CDOUBLE)) ? 1 : 0;
-              }
-              if (_v) {
-                return _wrap_cootocsr__SWIG_5(self, args);
-              }
+              return _wrap_csctocoo__SWIG_5(self, args);
             }
           }
         }
       }
     }
   }
-  if (argc == 6) {
+  if (argc == 5) {
     int _v;
     {
       int res = SWIG_AsVal_int(argv[0], NULL);
@@ -6835,8 +6748,7 @@
       }
       if (_v) {
         {
-          int res = SWIG_AsVal_int(argv[2], NULL);
-          _v = SWIG_CheckState(res);
+          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
         }
         if (_v) {
           {
@@ -6844,15 +6756,10 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
             }
             if (_v) {
-              {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CLONGDOUBLE)) ? 1 : 0;
-              }
-              if (_v) {
-                return _wrap_cootocsr__SWIG_6(self, args);
-              }
+              return _wrap_csctocoo__SWIG_6(self, args);
             }
           }
         }
@@ -6861,97 +6768,99 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cootocsr'.\n  Possible C/C++ prototypes are:\n    cootocsr<(float)>(int const,int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    cootocsr<(double)>(int const,int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    cootocsr<(long double)>(int const,int const,int const,int const [],int const [],long double const [],std::vector<int > *,std::vector<int > *,std::vector<long double > *)\n    cootocsr<(npy_cfloat)>(int const,int const,int const,int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    cootocsr<(npy_cdouble)>(int const,int const,int const,int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n    cootocsr<(npy_clongdouble)>(int const,int const,int const,int const [],int const [],npy_clongdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_clongdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csctocoo'.\n  Possible C/C++ prototypes are:\n    csctocoo<(int,int)>(int const,int const,int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csctocoo<(int,long)>(int const,int const,int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csctocoo<(int,float)>(int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csctocoo<(int,double)>(int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csctocoo<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csctocoo<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_csctocoo__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_cootocsr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  int *arg3 ;
+  int arg3 ;
   int *arg4 ;
-  float *arg5 ;
-  std::vector<int > *arg6 = (std::vector<int > *) 0 ;
+  int *arg5 ;
+  int *arg6 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<float > *arg8 = (std::vector<float > *) 0 ;
+  std::vector<int > *arg8 = (std::vector<int > *) 0 ;
+  std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
   int ecode2 = 0 ;
-  PyArrayObject *array3 = NULL ;
-  int is_new_object3 ;
+  int val3 ;
+  int ecode3 = 0 ;
   PyArrayObject *array4 = NULL ;
   int is_new_object4 ;
   PyArrayObject *array5 = NULL ;
   int is_new_object5 ;
-  std::vector<int > *tmp6 ;
+  PyArrayObject *array6 = NULL ;
+  int is_new_object6 ;
   std::vector<int > *tmp7 ;
-  std::vector<float > *tmp8 ;
+  std::vector<int > *tmp8 ;
+  std::vector<int > *tmp9 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
   PyObject * obj3 = 0 ;
   PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
   
   {
-    tmp6 = new std::vector<int>(); 
-    arg6 = tmp6; 
-  }
-  {
     tmp7 = new std::vector<int>(); 
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<float>(); 
+    tmp8 = new std::vector<int>(); 
     arg8 = tmp8; 
   }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  {
+    tmp9 = new std::vector<int>(); 
+    arg9 = tmp9; 
+  }
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csctocoo" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cootocsr" "', argument " "1"" of type '" "int""'");
   } 
   arg1 = static_cast< int >(val1);
   ecode2 = SWIG_AsVal_int(obj1, &val2);
   if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "csctocoo" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cootocsr" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cootocsr" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = static_cast< int >(val3);
   {
     npy_intp size[1] = {
       -1
     };
-    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_INT, &is_new_object3);
-    if (!array3 || !require_dimensions(array3,1) || !require_size(array3,size,1)) SWIG_fail;
-    arg3 = (int*) array3->data;
+    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
+    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
+    arg4 = (int*) array4->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
-    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
-    arg4 = (int*) array4->data;
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
+    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
+    arg5 = (int*) array5->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
-    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (float*) array5->data;
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_INT, &is_new_object6);
+    if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
+    arg6 = (int*) array6->data;
   }
-  csctocoo<float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,arg6,arg7,arg8);
+  cootocsr<int,int >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(int const (*))arg6,arg7,arg8,arg9);
   resultobj = SWIG_Py_Void();
   {
-    int length = (arg6)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
-    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(int)*length);	 
-    delete arg6; 
-    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
-  }
-  {
     int length = (arg7)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
     memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(int)*length);	 
@@ -6960,13 +6869,17 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(float)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(int)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
-    if (is_new_object3 && array3) Py_DECREF(array3);
+    int length = (arg9)->size(); 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(int)*length);	 
+    delete arg9; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
     if (is_new_object4 && array4) Py_DECREF(array4);
@@ -6974,107 +6887,112 @@
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
+  {
+    if (is_new_object6 && array6) Py_DECREF(array6);
+  }
   return resultobj;
 fail:
   {
-    if (is_new_object3 && array3) Py_DECREF(array3);
-  }
-  {
     if (is_new_object4 && array4) Py_DECREF(array4);
   }
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
+  {
+    if (is_new_object6 && array6) Py_DECREF(array6);
+  }
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_csctocoo__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_cootocsr__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  int *arg3 ;
+  int arg3 ;
   int *arg4 ;
-  double *arg5 ;
-  std::vector<int > *arg6 = (std::vector<int > *) 0 ;
+  int *arg5 ;
+  long *arg6 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<double > *arg8 = (std::vector<double > *) 0 ;
+  std::vector<int > *arg8 = (std::vector<int > *) 0 ;
+  std::vector<long > *arg9 = (std::vector<long > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
   int ecode2 = 0 ;
-  PyArrayObject *array3 = NULL ;
-  int is_new_object3 ;
+  int val3 ;
+  int ecode3 = 0 ;
   PyArrayObject *array4 = NULL ;
   int is_new_object4 ;
   PyArrayObject *array5 = NULL ;
   int is_new_object5 ;
-  std::vector<int > *tmp6 ;
+  PyArrayObject *array6 = NULL ;
+  int is_new_object6 ;
   std::vector<int > *tmp7 ;
-  std::vector<double > *tmp8 ;
+  std::vector<int > *tmp8 ;
+  std::vector<long > *tmp9 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
   PyObject * obj3 = 0 ;
   PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
   
   {
-    tmp6 = new std::vector<int>(); 
-    arg6 = tmp6; 
-  }
-  {
     tmp7 = new std::vector<int>(); 
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<double>(); 
+    tmp8 = new std::vector<int>(); 
     arg8 = tmp8; 
   }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  {
+    tmp9 = new std::vector<long>(); 
+    arg9 = tmp9; 
+  }
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csctocoo" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cootocsr" "', argument " "1"" of type '" "int""'");
   } 
   arg1 = static_cast< int >(val1);
   ecode2 = SWIG_AsVal_int(obj1, &val2);
   if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "csctocoo" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cootocsr" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cootocsr" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = static_cast< int >(val3);
   {
     npy_intp size[1] = {
       -1
     };
-    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_INT, &is_new_object3);
-    if (!array3 || !require_dimensions(array3,1) || !require_size(array3,size,1)) SWIG_fail;
-    arg3 = (int*) array3->data;
+    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
+    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
+    arg4 = (int*) array4->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
-    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
-    arg4 = (int*) array4->data;
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
+    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
+    arg5 = (int*) array5->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
-    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (double*) array5->data;
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_LONG, &is_new_object6);
+    if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
+    arg6 = (long*) array6->data;
   }
-  csctocoo<double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,arg6,arg7,arg8);
+  cootocsr<int,long >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(long const (*))arg6,arg7,arg8,arg9);
   resultobj = SWIG_Py_Void();
   {
-    int length = (arg6)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
-    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(int)*length);	 
-    delete arg6; 
-    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
-  }
-  {
     int length = (arg7)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
     memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(int)*length);	 
@@ -7083,13 +7001,17 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(int)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
-    if (is_new_object3 && array3) Py_DECREF(array3);
+    int length = (arg9)->size(); 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONG); 
+    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(long)*length);	 
+    delete arg9; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
     if (is_new_object4 && array4) Py_DECREF(array4);
@@ -7097,107 +7019,112 @@
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
+  {
+    if (is_new_object6 && array6) Py_DECREF(array6);
+  }
   return resultobj;
 fail:
   {
-    if (is_new_object3 && array3) Py_DECREF(array3);
-  }
-  {
     if (is_new_object4 && array4) Py_DECREF(array4);
   }
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
+  {
+    if (is_new_object6 && array6) Py_DECREF(array6);
+  }
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_csctocoo__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_cootocsr__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  int *arg3 ;
+  int arg3 ;
   int *arg4 ;
-  long double *arg5 ;
-  std::vector<int > *arg6 = (std::vector<int > *) 0 ;
+  int *arg5 ;
+  float *arg6 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<long double > *arg8 = (std::vector<long double > *) 0 ;
+  std::vector<int > *arg8 = (std::vector<int > *) 0 ;
+  std::vector<float > *arg9 = (std::vector<float > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
   int ecode2 = 0 ;
-  PyArrayObject *array3 = NULL ;
-  int is_new_object3 ;
+  int val3 ;
+  int ecode3 = 0 ;
   PyArrayObject *array4 = NULL ;
   int is_new_object4 ;
   PyArrayObject *array5 = NULL ;
   int is_new_object5 ;
-  std::vector<int > *tmp6 ;
+  PyArrayObject *array6 = NULL ;
+  int is_new_object6 ;
   std::vector<int > *tmp7 ;
-  std::vector<long double > *tmp8 ;
+  std::vector<int > *tmp8 ;
+  std::vector<float > *tmp9 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
   PyObject * obj3 = 0 ;
   PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
   
   {
-    tmp6 = new std::vector<int>(); 
-    arg6 = tmp6; 
-  }
-  {
     tmp7 = new std::vector<int>(); 
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<long double>(); 
+    tmp8 = new std::vector<int>(); 
     arg8 = tmp8; 
   }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  {
+    tmp9 = new std::vector<float>(); 
+    arg9 = tmp9; 
+  }
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csctocoo" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cootocsr" "', argument " "1"" of type '" "int""'");
   } 
   arg1 = static_cast< int >(val1);
   ecode2 = SWIG_AsVal_int(obj1, &val2);
   if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "csctocoo" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cootocsr" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cootocsr" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = static_cast< int >(val3);
   {
     npy_intp size[1] = {
       -1
     };
-    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_INT, &is_new_object3);
-    if (!array3 || !require_dimensions(array3,1) || !require_size(array3,size,1)) SWIG_fail;
-    arg3 = (int*) array3->data;
+    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
+    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
+    arg4 = (int*) array4->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
-    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
-    arg4 = (int*) array4->data;
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
+    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
+    arg5 = (int*) array5->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONGDOUBLE, &is_new_object5);
-    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (long double*) array5->data;
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_FLOAT, &is_new_object6);
+    if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
+    arg6 = (float*) array6->data;
   }
-  csctocoo<long double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long double const (*))arg5,arg6,arg7,arg8);
+  cootocsr<int,float >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(float const (*))arg6,arg7,arg8,arg9);
   resultobj = SWIG_Py_Void();
   {
-    int length = (arg6)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
-    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(int)*length);	 
-    delete arg6; 
-    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
-  }
-  {
     int length = (arg7)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
     memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(int)*length);	 
@@ -7206,13 +7133,17 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(long double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(int)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
-    if (is_new_object3 && array3) Py_DECREF(array3);
+    int length = (arg9)->size(); 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(float)*length);	 
+    delete arg9; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
     if (is_new_object4 && array4) Py_DECREF(array4);
@@ -7220,107 +7151,112 @@
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
+  {
+    if (is_new_object6 && array6) Py_DECREF(array6);
+  }
   return resultobj;
 fail:
   {
-    if (is_new_object3 && array3) Py_DECREF(array3);
-  }
-  {
     if (is_new_object4 && array4) Py_DECREF(array4);
   }
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
+  {
+    if (is_new_object6 && array6) Py_DECREF(array6);
+  }
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_csctocoo__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_cootocsr__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  int *arg3 ;
+  int arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
-  std::vector<int > *arg6 = (std::vector<int > *) 0 ;
+  int *arg5 ;
+  double *arg6 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg8 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<int > *arg8 = (std::vector<int > *) 0 ;
+  std::vector<double > *arg9 = (std::vector<double > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
   int ecode2 = 0 ;
-  PyArrayObject *array3 = NULL ;
-  int is_new_object3 ;
+  int val3 ;
+  int ecode3 = 0 ;
   PyArrayObject *array4 = NULL ;
   int is_new_object4 ;
   PyArrayObject *array5 = NULL ;
   int is_new_object5 ;
-  std::vector<int > *tmp6 ;
+  PyArrayObject *array6 = NULL ;
+  int is_new_object6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cfloat > *tmp8 ;
+  std::vector<int > *tmp8 ;
+  std::vector<double > *tmp9 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
   PyObject * obj3 = 0 ;
   PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
   
   {
-    tmp6 = new std::vector<int>(); 
-    arg6 = tmp6; 
-  }
-  {
     tmp7 = new std::vector<int>(); 
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cfloat>(); 
+    tmp8 = new std::vector<int>(); 
     arg8 = tmp8; 
   }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  {
+    tmp9 = new std::vector<double>(); 
+    arg9 = tmp9; 
+  }
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csctocoo" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cootocsr" "', argument " "1"" of type '" "int""'");
   } 
   arg1 = static_cast< int >(val1);
   ecode2 = SWIG_AsVal_int(obj1, &val2);
   if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "csctocoo" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cootocsr" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cootocsr" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = static_cast< int >(val3);
   {
     npy_intp size[1] = {
       -1
     };
-    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_INT, &is_new_object3);
-    if (!array3 || !require_dimensions(array3,1) || !require_size(array3,size,1)) SWIG_fail;
-    arg3 = (int*) array3->data;
+    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
+    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
+    arg4 = (int*) array4->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
-    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
-    arg4 = (int*) array4->data;
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
+    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
+    arg5 = (int*) array5->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
-    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_DOUBLE, &is_new_object6);
+    if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
+    arg6 = (double*) array6->data;
   }
-  csctocoo<npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,arg6,arg7,arg8);
+  cootocsr<int,double >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(double const (*))arg6,arg7,arg8,arg9);
   resultobj = SWIG_Py_Void();
   {
-    int length = (arg6)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
-    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(int)*length);	 
-    delete arg6; 
-    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
-  }
-  {
     int length = (arg7)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
     memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(int)*length);	 
@@ -7329,13 +7265,17 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(int)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
-    if (is_new_object3 && array3) Py_DECREF(array3);
+    int length = (arg9)->size(); 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(double)*length);	 
+    delete arg9; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
     if (is_new_object4 && array4) Py_DECREF(array4);
@@ -7343,107 +7283,112 @@
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
+  {
+    if (is_new_object6 && array6) Py_DECREF(array6);
+  }
   return resultobj;
 fail:
   {
-    if (is_new_object3 && array3) Py_DECREF(array3);
-  }
-  {
     if (is_new_object4 && array4) Py_DECREF(array4);
   }
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
+  {
+    if (is_new_object6 && array6) Py_DECREF(array6);
+  }
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_csctocoo__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_cootocsr__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  int *arg3 ;
+  int arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
-  std::vector<int > *arg6 = (std::vector<int > *) 0 ;
+  int *arg5 ;
+  npy_cfloat *arg6 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg8 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<int > *arg8 = (std::vector<int > *) 0 ;
+  std::vector<npy_cfloat > *arg9 = (std::vector<npy_cfloat > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
   int ecode2 = 0 ;
-  PyArrayObject *array3 = NULL ;
-  int is_new_object3 ;
+  int val3 ;
+  int ecode3 = 0 ;
   PyArrayObject *array4 = NULL ;
   int is_new_object4 ;
   PyArrayObject *array5 = NULL ;
   int is_new_object5 ;
-  std::vector<int > *tmp6 ;
+  PyArrayObject *array6 = NULL ;
+  int is_new_object6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cdouble > *tmp8 ;
+  std::vector<int > *tmp8 ;
+  std::vector<npy_cfloat > *tmp9 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
   PyObject * obj3 = 0 ;
   PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
   
   {
-    tmp6 = new std::vector<int>(); 
-    arg6 = tmp6; 
-  }
-  {
     tmp7 = new std::vector<int>(); 
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cdouble>(); 
+    tmp8 = new std::vector<int>(); 
     arg8 = tmp8; 
   }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  {
+    tmp9 = new std::vector<npy_cfloat>(); 
+    arg9 = tmp9; 
+  }
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csctocoo" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cootocsr" "', argument " "1"" of type '" "int""'");
   } 
   arg1 = static_cast< int >(val1);
   ecode2 = SWIG_AsVal_int(obj1, &val2);
   if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "csctocoo" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cootocsr" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cootocsr" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = static_cast< int >(val3);
   {
     npy_intp size[1] = {
       -1
     };
-    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_INT, &is_new_object3);
-    if (!array3 || !require_dimensions(array3,1) || !require_size(array3,size,1)) SWIG_fail;
-    arg3 = (int*) array3->data;
+    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
+    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
+    arg4 = (int*) array4->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
-    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
-    arg4 = (int*) array4->data;
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
+    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
+    arg5 = (int*) array5->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
-    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CFLOAT, &is_new_object6);
+    if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
+    arg6 = (npy_cfloat*) array6->data;
   }
-  csctocoo<npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,arg6,arg7,arg8);
+  cootocsr<int,npy_cfloat >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(npy_cfloat const (*))arg6,arg7,arg8,arg9);
   resultobj = SWIG_Py_Void();
   {
-    int length = (arg6)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
-    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(int)*length);	 
-    delete arg6; 
-    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
-  }
-  {
     int length = (arg7)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
     memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(int)*length);	 
@@ -7452,13 +7397,17 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(int)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
-    if (is_new_object3 && array3) Py_DECREF(array3);
+    int length = (arg9)->size(); 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(npy_cfloat)*length);	 
+    delete arg9; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
     if (is_new_object4 && array4) Py_DECREF(array4);
@@ -7466,107 +7415,112 @@
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
+  {
+    if (is_new_object6 && array6) Py_DECREF(array6);
+  }
   return resultobj;
 fail:
   {
-    if (is_new_object3 && array3) Py_DECREF(array3);
-  }
-  {
     if (is_new_object4 && array4) Py_DECREF(array4);
   }
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
+  {
+    if (is_new_object6 && array6) Py_DECREF(array6);
+  }
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_csctocoo__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_cootocsr__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  int *arg3 ;
+  int arg3 ;
   int *arg4 ;
-  npy_clongdouble *arg5 ;
-  std::vector<int > *arg6 = (std::vector<int > *) 0 ;
+  int *arg5 ;
+  npy_cdouble *arg6 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_clongdouble > *arg8 = (std::vector<npy_clongdouble > *) 0 ;
+  std::vector<int > *arg8 = (std::vector<int > *) 0 ;
+  std::vector<npy_cdouble > *arg9 = (std::vector<npy_cdouble > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
   int ecode2 = 0 ;
-  PyArrayObject *array3 = NULL ;
-  int is_new_object3 ;
+  int val3 ;
+  int ecode3 = 0 ;
   PyArrayObject *array4 = NULL ;
   int is_new_object4 ;
   PyArrayObject *array5 = NULL ;
   int is_new_object5 ;
-  std::vector<int > *tmp6 ;
+  PyArrayObject *array6 = NULL ;
+  int is_new_object6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_clongdouble > *tmp8 ;
+  std::vector<int > *tmp8 ;
+  std::vector<npy_cdouble > *tmp9 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
   PyObject * obj3 = 0 ;
   PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
   
   {
-    tmp6 = new std::vector<int>(); 
-    arg6 = tmp6; 
-  }
-  {
     tmp7 = new std::vector<int>(); 
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_clongdouble>(); 
+    tmp8 = new std::vector<int>(); 
     arg8 = tmp8; 
   }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  {
+    tmp9 = new std::vector<npy_cdouble>(); 
+    arg9 = tmp9; 
+  }
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csctocoo" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cootocsr" "', argument " "1"" of type '" "int""'");
   } 
   arg1 = static_cast< int >(val1);
   ecode2 = SWIG_AsVal_int(obj1, &val2);
   if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "csctocoo" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cootocsr" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cootocsr" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = static_cast< int >(val3);
   {
     npy_intp size[1] = {
       -1
     };
-    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_INT, &is_new_object3);
-    if (!array3 || !require_dimensions(array3,1) || !require_size(array3,size,1)) SWIG_fail;
-    arg3 = (int*) array3->data;
+    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
+    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
+    arg4 = (int*) array4->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array4 = obj_to_array_contiguous_allow_conversion(obj3, PyArray_INT, &is_new_object4);
-    if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
-    arg4 = (int*) array4->data;
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
+    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
+    arg5 = (int*) array5->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CLONGDOUBLE, &is_new_object5);
-    if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_clongdouble*) array5->data;
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CDOUBLE, &is_new_object6);
+    if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
+    arg6 = (npy_cdouble*) array6->data;
   }
-  csctocoo<npy_clongdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_clongdouble const (*))arg5,arg6,arg7,arg8);
+  cootocsr<int,npy_cdouble >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(npy_cdouble const (*))arg6,arg7,arg8,arg9);
   resultobj = SWIG_Py_Void();
   {
-    int length = (arg6)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
-    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(int)*length);	 
-    delete arg6; 
-    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
-  }
-  {
     int length = (arg7)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
     memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(int)*length);	 
@@ -7575,13 +7529,17 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CLONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_clongdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(int)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
-    if (is_new_object3 && array3) Py_DECREF(array3);
+    int length = (arg9)->size(); 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(npy_cdouble)*length);	 
+    delete arg9; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
     if (is_new_object4 && array4) Py_DECREF(array4);
@@ -7589,32 +7547,35 @@
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
+  {
+    if (is_new_object6 && array6) Py_DECREF(array6);
+  }
   return resultobj;
 fail:
   {
-    if (is_new_object3 && array3) Py_DECREF(array3);
-  }
-  {
     if (is_new_object4 && array4) Py_DECREF(array4);
   }
   {
     if (is_new_object5 && array5) Py_DECREF(array5);
   }
+  {
+    if (is_new_object6 && array6) Py_DECREF(array6);
+  }
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_csctocoo(PyObject *self, PyObject *args) {
+SWIGINTERN PyObject *_wrap_cootocsr(PyObject *self, PyObject *args) {
   int argc;
-  PyObject *argv[6];
+  PyObject *argv[7];
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
   argc = PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 5); ii++) {
+  for (ii = 0; (ii < argc) && (ii < 6); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
-  if (argc == 5) {
+  if (argc == 6) {
     int _v;
     {
       int res = SWIG_AsVal_int(argv[0], NULL);
@@ -7627,7 +7588,8 @@
       }
       if (_v) {
         {
-          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
+          int res = SWIG_AsVal_int(argv[2], NULL);
+          _v = SWIG_CheckState(res);
         }
         if (_v) {
           {
@@ -7635,17 +7597,22 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
-              return _wrap_csctocoo__SWIG_1(self, args);
+              {
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_INT)) ? 1 : 0;
+              }
+              if (_v) {
+                return _wrap_cootocsr__SWIG_1(self, args);
+              }
             }
           }
         }
       }
     }
   }
-  if (argc == 5) {
+  if (argc == 6) {
     int _v;
     {
       int res = SWIG_AsVal_int(argv[0], NULL);
@@ -7658,7 +7625,8 @@
       }
       if (_v) {
         {
-          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
+          int res = SWIG_AsVal_int(argv[2], NULL);
+          _v = SWIG_CheckState(res);
         }
         if (_v) {
           {
@@ -7666,17 +7634,22 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
-              return _wrap_csctocoo__SWIG_2(self, args);
+              {
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_LONG)) ? 1 : 0;
+              }
+              if (_v) {
+                return _wrap_cootocsr__SWIG_2(self, args);
+              }
             }
           }
         }
       }
     }
   }
-  if (argc == 5) {
+  if (argc == 6) {
     int _v;
     {
       int res = SWIG_AsVal_int(argv[0], NULL);
@@ -7689,7 +7662,8 @@
       }
       if (_v) {
         {
-          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
+          int res = SWIG_AsVal_int(argv[2], NULL);
+          _v = SWIG_CheckState(res);
         }
         if (_v) {
           {
@@ -7697,17 +7671,22 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
-              return _wrap_csctocoo__SWIG_3(self, args);
+              {
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_FLOAT)) ? 1 : 0;
+              }
+              if (_v) {
+                return _wrap_cootocsr__SWIG_3(self, args);
+              }
             }
           }
         }
       }
     }
   }
-  if (argc == 5) {
+  if (argc == 6) {
     int _v;
     {
       int res = SWIG_AsVal_int(argv[0], NULL);
@@ -7720,7 +7699,8 @@
       }
       if (_v) {
         {
-          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
+          int res = SWIG_AsVal_int(argv[2], NULL);
+          _v = SWIG_CheckState(res);
         }
         if (_v) {
           {
@@ -7728,17 +7708,22 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
-              return _wrap_csctocoo__SWIG_4(self, args);
+              {
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_DOUBLE)) ? 1 : 0;
+              }
+              if (_v) {
+                return _wrap_cootocsr__SWIG_4(self, args);
+              }
             }
           }
         }
       }
     }
   }
-  if (argc == 5) {
+  if (argc == 6) {
     int _v;
     {
       int res = SWIG_AsVal_int(argv[0], NULL);
@@ -7751,7 +7736,8 @@
       }
       if (_v) {
         {
-          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
+          int res = SWIG_AsVal_int(argv[2], NULL);
+          _v = SWIG_CheckState(res);
         }
         if (_v) {
           {
@@ -7759,17 +7745,22 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
-              return _wrap_csctocoo__SWIG_5(self, args);
+              {
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CFLOAT)) ? 1 : 0;
+              }
+              if (_v) {
+                return _wrap_cootocsr__SWIG_5(self, args);
+              }
             }
           }
         }
       }
     }
   }
-  if (argc == 5) {
+  if (argc == 6) {
     int _v;
     {
       int res = SWIG_AsVal_int(argv[0], NULL);
@@ -7782,7 +7773,8 @@
       }
       if (_v) {
         {
-          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
+          int res = SWIG_AsVal_int(argv[2], NULL);
+          _v = SWIG_CheckState(res);
         }
         if (_v) {
           {
@@ -7790,10 +7782,15 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
-              return _wrap_csctocoo__SWIG_6(self, args);
+              {
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CDOUBLE)) ? 1 : 0;
+              }
+              if (_v) {
+                return _wrap_cootocsr__SWIG_6(self, args);
+              }
             }
           }
         }
@@ -7802,7 +7799,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csctocoo'.\n  Possible C/C++ prototypes are:\n    csctocoo<(float)>(int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csctocoo<(double)>(int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csctocoo<(long double)>(int const,int const,int const [],int const [],long double const [],std::vector<int > *,std::vector<int > *,std::vector<long double > *)\n    csctocoo<(npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csctocoo<(npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n    csctocoo<(npy_clongdouble)>(int const,int const,int const [],int const [],npy_clongdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_clongdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cootocsr'.\n  Possible C/C++ prototypes are:\n    cootocsr<(int,int)>(int const,int const,int const,int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    cootocsr<(int,long)>(int const,int const,int const,int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    cootocsr<(int,float)>(int const,int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    cootocsr<(int,double)>(int const,int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    cootocsr<(int,npy_cfloat)>(int const,int const,int const,int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    cootocsr<(int,npy_cdouble)>(int const,int const,int const,int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
   return NULL;
 }
 
@@ -7814,10 +7811,10 @@
   int arg3 ;
   int *arg4 ;
   int *arg5 ;
-  float *arg6 ;
+  int *arg6 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
   std::vector<int > *arg8 = (std::vector<int > *) 0 ;
-  std::vector<float > *arg9 = (std::vector<float > *) 0 ;
+  std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -7832,7 +7829,7 @@
   int is_new_object6 ;
   std::vector<int > *tmp7 ;
   std::vector<int > *tmp8 ;
-  std::vector<float > *tmp9 ;
+  std::vector<int > *tmp9 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -7849,7 +7846,7 @@
     arg8 = tmp8; 
   }
   {
-    tmp9 = new std::vector<float>(); 
+    tmp9 = new std::vector<int>(); 
     arg9 = tmp9; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -7888,11 +7885,11 @@
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_FLOAT, &is_new_object6);
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_INT, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (float*) array6->data;
+    arg6 = (int*) array6->data;
   }
-  cootocsc<float >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(float const (*))arg6,arg7,arg8,arg9);
+  cootocsc<int,int >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(int const (*))arg6,arg7,arg8,arg9);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
@@ -7910,8 +7907,8 @@
   }
   {
     int length = (arg9)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(float)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(int)*length);	 
     delete arg9; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -7946,10 +7943,10 @@
   int arg3 ;
   int *arg4 ;
   int *arg5 ;
-  double *arg6 ;
+  long *arg6 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
   std::vector<int > *arg8 = (std::vector<int > *) 0 ;
-  std::vector<double > *arg9 = (std::vector<double > *) 0 ;
+  std::vector<long > *arg9 = (std::vector<long > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -7964,7 +7961,7 @@
   int is_new_object6 ;
   std::vector<int > *tmp7 ;
   std::vector<int > *tmp8 ;
-  std::vector<double > *tmp9 ;
+  std::vector<long > *tmp9 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -7981,7 +7978,7 @@
     arg8 = tmp8; 
   }
   {
-    tmp9 = new std::vector<double>(); 
+    tmp9 = new std::vector<long>(); 
     arg9 = tmp9; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -8020,11 +8017,11 @@
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_DOUBLE, &is_new_object6);
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_LONG, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (double*) array6->data;
+    arg6 = (long*) array6->data;
   }
-  cootocsc<double >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(double const (*))arg6,arg7,arg8,arg9);
+  cootocsc<int,long >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(long const (*))arg6,arg7,arg8,arg9);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
@@ -8042,8 +8039,8 @@
   }
   {
     int length = (arg9)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONG); 
+    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(long)*length);	 
     delete arg9; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -8078,10 +8075,10 @@
   int arg3 ;
   int *arg4 ;
   int *arg5 ;
-  long double *arg6 ;
+  float *arg6 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
   std::vector<int > *arg8 = (std::vector<int > *) 0 ;
-  std::vector<long double > *arg9 = (std::vector<long double > *) 0 ;
+  std::vector<float > *arg9 = (std::vector<float > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -8096,7 +8093,7 @@
   int is_new_object6 ;
   std::vector<int > *tmp7 ;
   std::vector<int > *tmp8 ;
-  std::vector<long double > *tmp9 ;
+  std::vector<float > *tmp9 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -8113,7 +8110,7 @@
     arg8 = tmp8; 
   }
   {
-    tmp9 = new std::vector<long double>(); 
+    tmp9 = new std::vector<float>(); 
     arg9 = tmp9; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -8152,11 +8149,11 @@
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_LONGDOUBLE, &is_new_object6);
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_FLOAT, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (long double*) array6->data;
+    arg6 = (float*) array6->data;
   }
-  cootocsc<long double >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(long double const (*))arg6,arg7,arg8,arg9);
+  cootocsc<int,float >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(float const (*))arg6,arg7,arg8,arg9);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
@@ -8174,8 +8171,8 @@
   }
   {
     int length = (arg9)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(long double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(float)*length);	 
     delete arg9; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -8210,10 +8207,10 @@
   int arg3 ;
   int *arg4 ;
   int *arg5 ;
-  npy_cfloat *arg6 ;
+  double *arg6 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
   std::vector<int > *arg8 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg9 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<double > *arg9 = (std::vector<double > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -8228,7 +8225,7 @@
   int is_new_object6 ;
   std::vector<int > *tmp7 ;
   std::vector<int > *tmp8 ;
-  std::vector<npy_cfloat > *tmp9 ;
+  std::vector<double > *tmp9 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -8245,7 +8242,7 @@
     arg8 = tmp8; 
   }
   {
-    tmp9 = new std::vector<npy_cfloat>(); 
+    tmp9 = new std::vector<double>(); 
     arg9 = tmp9; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -8284,11 +8281,11 @@
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CFLOAT, &is_new_object6);
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_DOUBLE, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_cfloat*) array6->data;
+    arg6 = (double*) array6->data;
   }
-  cootocsc<npy_cfloat >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(npy_cfloat const (*))arg6,arg7,arg8,arg9);
+  cootocsc<int,double >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(double const (*))arg6,arg7,arg8,arg9);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
@@ -8306,8 +8303,8 @@
   }
   {
     int length = (arg9)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(npy_cfloat)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(double)*length);	 
     delete arg9; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -8342,10 +8339,10 @@
   int arg3 ;
   int *arg4 ;
   int *arg5 ;
-  npy_cdouble *arg6 ;
+  npy_cfloat *arg6 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
   std::vector<int > *arg8 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg9 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cfloat > *arg9 = (std::vector<npy_cfloat > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -8360,7 +8357,7 @@
   int is_new_object6 ;
   std::vector<int > *tmp7 ;
   std::vector<int > *tmp8 ;
-  std::vector<npy_cdouble > *tmp9 ;
+  std::vector<npy_cfloat > *tmp9 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -8377,7 +8374,7 @@
     arg8 = tmp8; 
   }
   {
-    tmp9 = new std::vector<npy_cdouble>(); 
+    tmp9 = new std::vector<npy_cfloat>(); 
     arg9 = tmp9; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -8416,11 +8413,11 @@
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CDOUBLE, &is_new_object6);
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CFLOAT, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_cdouble*) array6->data;
+    arg6 = (npy_cfloat*) array6->data;
   }
-  cootocsc<npy_cdouble >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(npy_cdouble const (*))arg6,arg7,arg8,arg9);
+  cootocsc<int,npy_cfloat >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(npy_cfloat const (*))arg6,arg7,arg8,arg9);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
@@ -8438,8 +8435,8 @@
   }
   {
     int length = (arg9)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(npy_cdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(npy_cfloat)*length);	 
     delete arg9; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -8474,10 +8471,10 @@
   int arg3 ;
   int *arg4 ;
   int *arg5 ;
-  npy_clongdouble *arg6 ;
+  npy_cdouble *arg6 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
   std::vector<int > *arg8 = (std::vector<int > *) 0 ;
-  std::vector<npy_clongdouble > *arg9 = (std::vector<npy_clongdouble > *) 0 ;
+  std::vector<npy_cdouble > *arg9 = (std::vector<npy_cdouble > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -8492,7 +8489,7 @@
   int is_new_object6 ;
   std::vector<int > *tmp7 ;
   std::vector<int > *tmp8 ;
-  std::vector<npy_clongdouble > *tmp9 ;
+  std::vector<npy_cdouble > *tmp9 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -8509,7 +8506,7 @@
     arg8 = tmp8; 
   }
   {
-    tmp9 = new std::vector<npy_clongdouble>(); 
+    tmp9 = new std::vector<npy_cdouble>(); 
     arg9 = tmp9; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -8548,11 +8545,11 @@
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CLONGDOUBLE, &is_new_object6);
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CDOUBLE, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_clongdouble*) array6->data;
+    arg6 = (npy_cdouble*) array6->data;
   }
-  cootocsc<npy_clongdouble >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(npy_clongdouble const (*))arg6,arg7,arg8,arg9);
+  cootocsc<int,npy_cdouble >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(npy_cdouble const (*))arg6,arg7,arg8,arg9);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
@@ -8570,8 +8567,8 @@
   }
   {
     int length = (arg9)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CLONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(npy_clongdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(npy_cdouble)*length);	 
     delete arg9; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -8635,7 +8632,7 @@
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_FLOAT)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_INT)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_cootocsc__SWIG_1(self, args);
@@ -8672,7 +8669,7 @@
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_DOUBLE)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_LONG)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_cootocsc__SWIG_2(self, args);
@@ -8709,7 +8706,7 @@
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_LONGDOUBLE)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_FLOAT)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_cootocsc__SWIG_3(self, args);
@@ -8746,7 +8743,7 @@
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CFLOAT)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_DOUBLE)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_cootocsc__SWIG_4(self, args);
@@ -8783,7 +8780,7 @@
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CDOUBLE)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CFLOAT)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_cootocsc__SWIG_5(self, args);
@@ -8820,7 +8817,7 @@
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CDOUBLE)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_cootocsc__SWIG_6(self, args);
@@ -8833,7 +8830,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cootocsc'.\n  Possible C/C++ prototypes are:\n    cootocsc<(float)>(int const,int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    cootocsc<(double)>(int const,int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    cootocsc<(long double)>(int const,int const,int const,int const [],int const [],long double const [],std::vector<int > *,std::vector<int > *,std::vector<long double > *)\n    cootocsc<(npy_cfloat)>(int const,int const,int const,int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    cootocsc<(npy_cdouble)>(int const,int const,int const,int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n    cootocsc<(npy_clongdouble)>(int const,int const,int const,int const [],int const [],npy_clongdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_clongdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cootocsc'.\n  Possible C/C++ prototypes are:\n    cootocsc<(int,int)>(int const,int const,int const,int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    cootocsc<(int,long)>(int const,int const,int const,int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    cootocsc<(int,float)>(int const,int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    cootocsc<(int,double)>(int const,int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    cootocsc<(int,npy_cfloat)>(int const,int const,int const,int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    cootocsc<(int,npy_cdouble)>(int const,int const,int const,int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
   return NULL;
 }
 
@@ -8844,13 +8841,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  float *arg5 ;
+  int *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  float *arg8 ;
+  int *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<float > *arg11 = (std::vector<float > *) 0 ;
+  std::vector<int > *arg11 = (std::vector<int > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -8869,7 +8866,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<float > *tmp11 ;
+  std::vector<int > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -8888,7 +8885,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<float>(); 
+    tmp11 = new std::vector<int>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrplcsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -8922,9 +8919,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (float*) array5->data;
+    arg5 = (int*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -8946,11 +8943,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_FLOAT, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_INT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (float*) array8->data;
+    arg8 = (int*) array8->data;
   }
-  csrplcsr<float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,(int const (*))arg6,(int const (*))arg7,(float const (*))arg8,arg9,arg10,arg11);
+  csrplcsr<int,int >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(int const (*))arg5,(int const (*))arg6,(int const (*))arg7,(int const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -8968,8 +8965,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(float)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(int)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -9021,13 +9018,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  double *arg5 ;
+  long *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  double *arg8 ;
+  long *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<double > *arg11 = (std::vector<double > *) 0 ;
+  std::vector<long > *arg11 = (std::vector<long > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -9046,7 +9043,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<double > *tmp11 ;
+  std::vector<long > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -9065,7 +9062,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<double>(); 
+    tmp11 = new std::vector<long>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrplcsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -9099,9 +9096,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONG, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (double*) array5->data;
+    arg5 = (long*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -9123,11 +9120,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_DOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_LONG, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (double*) array8->data;
+    arg8 = (long*) array8->data;
   }
-  csrplcsr<double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,(int const (*))arg6,(int const (*))arg7,(double const (*))arg8,arg9,arg10,arg11);
+  csrplcsr<int,long >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long const (*))arg5,(int const (*))arg6,(int const (*))arg7,(long const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -9145,8 +9142,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONG); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(long)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -9198,13 +9195,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  long double *arg5 ;
+  float *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  long double *arg8 ;
+  float *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<long double > *arg11 = (std::vector<long double > *) 0 ;
+  std::vector<float > *arg11 = (std::vector<float > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -9223,7 +9220,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<long double > *tmp11 ;
+  std::vector<float > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -9242,7 +9239,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<long double>(); 
+    tmp11 = new std::vector<float>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrplcsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -9276,9 +9273,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (long double*) array5->data;
+    arg5 = (float*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -9300,11 +9297,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_LONGDOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_FLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (long double*) array8->data;
+    arg8 = (float*) array8->data;
   }
-  csrplcsr<long double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long double const (*))arg5,(int const (*))arg6,(int const (*))arg7,(long double const (*))arg8,arg9,arg10,arg11);
+  csrplcsr<int,float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,(int const (*))arg6,(int const (*))arg7,(float const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -9322,8 +9319,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(long double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(float)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -9375,13 +9372,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  double *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cfloat *arg8 ;
+  double *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<double > *arg11 = (std::vector<double > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -9400,7 +9397,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cfloat > *tmp11 ;
+  std::vector<double > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -9419,7 +9416,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cfloat>(); 
+    tmp11 = new std::vector<double>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrplcsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -9453,9 +9450,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (double*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -9477,11 +9474,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_DOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cfloat*) array8->data;
+    arg8 = (double*) array8->data;
   }
-  csrplcsr<npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
+  csrplcsr<int,double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,(int const (*))arg6,(int const (*))arg7,(double const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -9499,8 +9496,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(double)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -9552,13 +9549,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cfloat *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cdouble *arg8 ;
+  npy_cfloat *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -9577,7 +9574,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cdouble > *tmp11 ;
+  std::vector<npy_cfloat > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -9596,7 +9593,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cdouble>(); 
+    tmp11 = new std::vector<npy_cfloat>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrplcsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -9630,9 +9627,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cfloat*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -9654,11 +9651,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cdouble*) array8->data;
+    arg8 = (npy_cfloat*) array8->data;
   }
-  csrplcsr<npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
+  csrplcsr<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -9676,8 +9673,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -9729,13 +9726,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_clongdouble *arg5 ;
+  npy_cdouble *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_clongdouble *arg8 ;
+  npy_cdouble *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_clongdouble > *arg11 = (std::vector<npy_clongdouble > *) 0 ;
+  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -9754,7 +9751,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_clongdouble > *tmp11 ;
+  std::vector<npy_cdouble > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -9773,7 +9770,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_clongdouble>(); 
+    tmp11 = new std::vector<npy_cdouble>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrplcsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -9807,9 +9804,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CLONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_clongdouble*) array5->data;
+    arg5 = (npy_cdouble*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -9831,11 +9828,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CLONGDOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_clongdouble*) array8->data;
+    arg8 = (npy_cdouble*) array8->data;
   }
-  csrplcsr<npy_clongdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_clongdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_clongdouble const (*))arg8,arg9,arg10,arg11);
+  csrplcsr<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -9853,8 +9850,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CLONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_clongdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -9931,7 +9928,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -9943,7 +9940,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_FLOAT)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_INT)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_csrplcsr__SWIG_1(self, args);
@@ -9977,7 +9974,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONG)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -9989,7 +9986,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_DOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_LONG)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_csrplcsr__SWIG_2(self, args);
@@ -10023,7 +10020,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -10035,7 +10032,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_LONGDOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_FLOAT)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_csrplcsr__SWIG_3(self, args);
@@ -10069,7 +10066,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -10081,7 +10078,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CFLOAT)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_DOUBLE)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_csrplcsr__SWIG_4(self, args);
@@ -10115,7 +10112,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -10127,7 +10124,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CDOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CFLOAT)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_csrplcsr__SWIG_5(self, args);
@@ -10161,7 +10158,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -10173,7 +10170,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CDOUBLE)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_csrplcsr__SWIG_6(self, args);
@@ -10188,7 +10185,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrplcsr'.\n  Possible C/C++ prototypes are:\n    csrplcsr<(float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csrplcsr<(double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csrplcsr<(long double)>(int const,int const,int const [],int const [],long double const [],int const [],int const [],long double const [],std::vector<int > *,std::vector<int > *,std::vector<long double > *)\n    csrplcsr<(npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csrplcsr<(npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n    csrplcsr<(npy_clongdouble)>(int const,int const,int const [],int const [],npy_clongdouble const [],int const [],int const [],npy_clongdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_clongdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrplcsr'.\n  Possible C/C++ prototypes are:\n    csrplcsr<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csrplcsr<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csrplcsr<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csrplcsr<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csrplcsr<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csrplcsr<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
   return NULL;
 }
 
@@ -10199,13 +10196,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  float *arg5 ;
+  int *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  float *arg8 ;
+  int *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<float > *arg11 = (std::vector<float > *) 0 ;
+  std::vector<int > *arg11 = (std::vector<int > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -10224,7 +10221,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<float > *tmp11 ;
+  std::vector<int > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -10243,7 +10240,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<float>(); 
+    tmp11 = new std::vector<int>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscplcsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -10277,9 +10274,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (float*) array5->data;
+    arg5 = (int*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -10301,11 +10298,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_FLOAT, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_INT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (float*) array8->data;
+    arg8 = (int*) array8->data;
   }
-  cscplcsc<float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,(int const (*))arg6,(int const (*))arg7,(float const (*))arg8,arg9,arg10,arg11);
+  cscplcsc<int,int >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(int const (*))arg5,(int const (*))arg6,(int const (*))arg7,(int const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -10323,8 +10320,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(float)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(int)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -10376,13 +10373,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  double *arg5 ;
+  long *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  double *arg8 ;
+  long *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<double > *arg11 = (std::vector<double > *) 0 ;
+  std::vector<long > *arg11 = (std::vector<long > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -10401,7 +10398,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<double > *tmp11 ;
+  std::vector<long > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -10420,7 +10417,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<double>(); 
+    tmp11 = new std::vector<long>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscplcsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -10454,9 +10451,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONG, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (double*) array5->data;
+    arg5 = (long*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -10478,11 +10475,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_DOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_LONG, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (double*) array8->data;
+    arg8 = (long*) array8->data;
   }
-  cscplcsc<double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,(int const (*))arg6,(int const (*))arg7,(double const (*))arg8,arg9,arg10,arg11);
+  cscplcsc<int,long >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long const (*))arg5,(int const (*))arg6,(int const (*))arg7,(long const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -10500,8 +10497,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONG); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(long)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -10553,13 +10550,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  long double *arg5 ;
+  float *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  long double *arg8 ;
+  float *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<long double > *arg11 = (std::vector<long double > *) 0 ;
+  std::vector<float > *arg11 = (std::vector<float > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -10578,7 +10575,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<long double > *tmp11 ;
+  std::vector<float > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -10597,7 +10594,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<long double>(); 
+    tmp11 = new std::vector<float>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscplcsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -10631,9 +10628,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (long double*) array5->data;
+    arg5 = (float*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -10655,11 +10652,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_LONGDOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_FLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (long double*) array8->data;
+    arg8 = (float*) array8->data;
   }
-  cscplcsc<long double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long double const (*))arg5,(int const (*))arg6,(int const (*))arg7,(long double const (*))arg8,arg9,arg10,arg11);
+  cscplcsc<int,float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,(int const (*))arg6,(int const (*))arg7,(float const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -10677,8 +10674,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(long double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(float)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -10730,13 +10727,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  double *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cfloat *arg8 ;
+  double *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<double > *arg11 = (std::vector<double > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -10755,7 +10752,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cfloat > *tmp11 ;
+  std::vector<double > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -10774,7 +10771,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cfloat>(); 
+    tmp11 = new std::vector<double>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscplcsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -10808,9 +10805,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (double*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -10832,11 +10829,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_DOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cfloat*) array8->data;
+    arg8 = (double*) array8->data;
   }
-  cscplcsc<npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
+  cscplcsc<int,double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,(int const (*))arg6,(int const (*))arg7,(double const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -10854,8 +10851,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(double)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -10907,13 +10904,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cfloat *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cdouble *arg8 ;
+  npy_cfloat *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -10932,7 +10929,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cdouble > *tmp11 ;
+  std::vector<npy_cfloat > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -10951,7 +10948,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cdouble>(); 
+    tmp11 = new std::vector<npy_cfloat>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscplcsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -10985,9 +10982,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cfloat*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -11009,11 +11006,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cdouble*) array8->data;
+    arg8 = (npy_cfloat*) array8->data;
   }
-  cscplcsc<npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
+  cscplcsc<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -11031,8 +11028,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -11084,13 +11081,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_clongdouble *arg5 ;
+  npy_cdouble *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_clongdouble *arg8 ;
+  npy_cdouble *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_clongdouble > *arg11 = (std::vector<npy_clongdouble > *) 0 ;
+  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -11109,7 +11106,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_clongdouble > *tmp11 ;
+  std::vector<npy_cdouble > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -11128,7 +11125,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_clongdouble>(); 
+    tmp11 = new std::vector<npy_cdouble>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscplcsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -11162,9 +11159,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CLONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_clongdouble*) array5->data;
+    arg5 = (npy_cdouble*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -11186,11 +11183,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CLONGDOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_clongdouble*) array8->data;
+    arg8 = (npy_cdouble*) array8->data;
   }
-  cscplcsc<npy_clongdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_clongdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_clongdouble const (*))arg8,arg9,arg10,arg11);
+  cscplcsc<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -11208,8 +11205,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CLONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_clongdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -11286,7 +11283,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -11298,7 +11295,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_FLOAT)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_INT)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_cscplcsc__SWIG_1(self, args);
@@ -11332,7 +11329,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONG)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -11344,7 +11341,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_DOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_LONG)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_cscplcsc__SWIG_2(self, args);
@@ -11378,7 +11375,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -11390,7 +11387,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_LONGDOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_FLOAT)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_cscplcsc__SWIG_3(self, args);
@@ -11424,7 +11421,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -11436,7 +11433,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CFLOAT)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_DOUBLE)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_cscplcsc__SWIG_4(self, args);
@@ -11470,7 +11467,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -11482,7 +11479,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CDOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CFLOAT)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_cscplcsc__SWIG_5(self, args);
@@ -11516,7 +11513,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -11528,7 +11525,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CDOUBLE)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_cscplcsc__SWIG_6(self, args);
@@ -11543,7 +11540,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cscplcsc'.\n  Possible C/C++ prototypes are:\n    cscplcsc<(float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    cscplcsc<(double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    cscplcsc<(long double)>(int const,int const,int const [],int const [],long double const [],int const [],int const [],long double const [],std::vector<int > *,std::vector<int > *,std::vector<long double > *)\n    cscplcsc<(npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    cscplcsc<(npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n    cscplcsc<(npy_clongdouble)>(int const,int const,int const [],int const [],npy_clongdouble const [],int const [],int const [],npy_clongdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_clongdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cscplcsc'.\n  Possible C/C++ prototypes are:\n    cscplcsc<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    cscplcsc<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    cscplcsc<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    cscplcsc<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    cscplcsc<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    cscplcsc<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
   return NULL;
 }
 
@@ -11554,13 +11551,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  float *arg5 ;
+  int *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  float *arg8 ;
+  int *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<float > *arg11 = (std::vector<float > *) 0 ;
+  std::vector<int > *arg11 = (std::vector<int > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -11579,7 +11576,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<float > *tmp11 ;
+  std::vector<int > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -11598,7 +11595,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<float>(); 
+    tmp11 = new std::vector<int>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrmucsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -11632,9 +11629,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (float*) array5->data;
+    arg5 = (int*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -11656,11 +11653,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_FLOAT, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_INT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (float*) array8->data;
+    arg8 = (int*) array8->data;
   }
-  csrmucsr<float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,(int const (*))arg6,(int const (*))arg7,(float const (*))arg8,arg9,arg10,arg11);
+  csrmucsr<int,int >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(int const (*))arg5,(int const (*))arg6,(int const (*))arg7,(int const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -11678,8 +11675,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(float)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(int)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -11731,13 +11728,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  double *arg5 ;
+  long *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  double *arg8 ;
+  long *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<double > *arg11 = (std::vector<double > *) 0 ;
+  std::vector<long > *arg11 = (std::vector<long > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -11756,7 +11753,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<double > *tmp11 ;
+  std::vector<long > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -11775,7 +11772,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<double>(); 
+    tmp11 = new std::vector<long>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrmucsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -11809,9 +11806,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONG, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (double*) array5->data;
+    arg5 = (long*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -11833,11 +11830,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_DOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_LONG, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (double*) array8->data;
+    arg8 = (long*) array8->data;
   }
-  csrmucsr<double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,(int const (*))arg6,(int const (*))arg7,(double const (*))arg8,arg9,arg10,arg11);
+  csrmucsr<int,long >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long const (*))arg5,(int const (*))arg6,(int const (*))arg7,(long const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -11855,8 +11852,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONG); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(long)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -11908,13 +11905,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  long double *arg5 ;
+  float *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  long double *arg8 ;
+  float *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<long double > *arg11 = (std::vector<long double > *) 0 ;
+  std::vector<float > *arg11 = (std::vector<float > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -11933,7 +11930,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<long double > *tmp11 ;
+  std::vector<float > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -11952,7 +11949,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<long double>(); 
+    tmp11 = new std::vector<float>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrmucsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -11986,9 +11983,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (long double*) array5->data;
+    arg5 = (float*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -12010,11 +12007,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_LONGDOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_FLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (long double*) array8->data;
+    arg8 = (float*) array8->data;
   }
-  csrmucsr<long double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long double const (*))arg5,(int const (*))arg6,(int const (*))arg7,(long double const (*))arg8,arg9,arg10,arg11);
+  csrmucsr<int,float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,(int const (*))arg6,(int const (*))arg7,(float const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -12032,8 +12029,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(long double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(float)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -12085,13 +12082,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  double *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cfloat *arg8 ;
+  double *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<double > *arg11 = (std::vector<double > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -12110,7 +12107,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cfloat > *tmp11 ;
+  std::vector<double > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -12129,7 +12126,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cfloat>(); 
+    tmp11 = new std::vector<double>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrmucsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -12163,9 +12160,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (double*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -12187,11 +12184,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_DOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cfloat*) array8->data;
+    arg8 = (double*) array8->data;
   }
-  csrmucsr<npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
+  csrmucsr<int,double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,(int const (*))arg6,(int const (*))arg7,(double const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -12209,8 +12206,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(double)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -12262,13 +12259,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cfloat *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cdouble *arg8 ;
+  npy_cfloat *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -12287,7 +12284,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cdouble > *tmp11 ;
+  std::vector<npy_cfloat > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -12306,7 +12303,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cdouble>(); 
+    tmp11 = new std::vector<npy_cfloat>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrmucsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -12340,9 +12337,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cfloat*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -12364,11 +12361,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cdouble*) array8->data;
+    arg8 = (npy_cfloat*) array8->data;
   }
-  csrmucsr<npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
+  csrmucsr<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -12386,8 +12383,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -12439,13 +12436,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_clongdouble *arg5 ;
+  npy_cdouble *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_clongdouble *arg8 ;
+  npy_cdouble *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_clongdouble > *arg11 = (std::vector<npy_clongdouble > *) 0 ;
+  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -12464,7 +12461,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_clongdouble > *tmp11 ;
+  std::vector<npy_cdouble > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -12483,7 +12480,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_clongdouble>(); 
+    tmp11 = new std::vector<npy_cdouble>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrmucsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -12517,9 +12514,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CLONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_clongdouble*) array5->data;
+    arg5 = (npy_cdouble*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -12541,11 +12538,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CLONGDOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_clongdouble*) array8->data;
+    arg8 = (npy_cdouble*) array8->data;
   }
-  csrmucsr<npy_clongdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_clongdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_clongdouble const (*))arg8,arg9,arg10,arg11);
+  csrmucsr<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -12563,8 +12560,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CLONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_clongdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -12641,7 +12638,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -12653,7 +12650,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_FLOAT)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_INT)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_csrmucsr__SWIG_1(self, args);
@@ -12687,7 +12684,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONG)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -12699,7 +12696,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_DOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_LONG)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_csrmucsr__SWIG_2(self, args);
@@ -12733,7 +12730,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -12745,7 +12742,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_LONGDOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_FLOAT)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_csrmucsr__SWIG_3(self, args);
@@ -12779,7 +12776,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -12791,7 +12788,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CFLOAT)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_DOUBLE)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_csrmucsr__SWIG_4(self, args);
@@ -12825,7 +12822,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -12837,7 +12834,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CDOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CFLOAT)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_csrmucsr__SWIG_5(self, args);
@@ -12871,7 +12868,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -12883,7 +12880,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CDOUBLE)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_csrmucsr__SWIG_6(self, args);
@@ -12898,7 +12895,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrmucsr'.\n  Possible C/C++ prototypes are:\n    csrmucsr<(float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csrmucsr<(double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csrmucsr<(long double)>(int const,int const,int const [],int const [],long double const [],int const [],int const [],long double const [],std::vector<int > *,std::vector<int > *,std::vector<long double > *)\n    csrmucsr<(npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csrmucsr<(npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n    csrmucsr<(npy_clongdouble)>(int const,int const,int const [],int const [],npy_clongdouble const [],int const [],int const [],npy_clongdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_clongdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrmucsr'.\n  Possible C/C++ prototypes are:\n    csrmucsr<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csrmucsr<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csrmucsr<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csrmucsr<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csrmucsr<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csrmucsr<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
   return NULL;
 }
 
@@ -12909,13 +12906,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  float *arg5 ;
+  int *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  float *arg8 ;
+  int *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<float > *arg11 = (std::vector<float > *) 0 ;
+  std::vector<int > *arg11 = (std::vector<int > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -12934,7 +12931,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<float > *tmp11 ;
+  std::vector<int > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -12953,7 +12950,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<float>(); 
+    tmp11 = new std::vector<int>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscmucsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -12987,9 +12984,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (float*) array5->data;
+    arg5 = (int*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -13011,11 +13008,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_FLOAT, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_INT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (float*) array8->data;
+    arg8 = (int*) array8->data;
   }
-  cscmucsc<float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,(int const (*))arg6,(int const (*))arg7,(float const (*))arg8,arg9,arg10,arg11);
+  cscmucsc<int,int >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(int const (*))arg5,(int const (*))arg6,(int const (*))arg7,(int const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -13033,8 +13030,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(float)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(int)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -13086,13 +13083,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  double *arg5 ;
+  long *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  double *arg8 ;
+  long *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<double > *arg11 = (std::vector<double > *) 0 ;
+  std::vector<long > *arg11 = (std::vector<long > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -13111,7 +13108,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<double > *tmp11 ;
+  std::vector<long > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -13130,7 +13127,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<double>(); 
+    tmp11 = new std::vector<long>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscmucsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -13164,9 +13161,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONG, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (double*) array5->data;
+    arg5 = (long*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -13188,11 +13185,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_DOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_LONG, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (double*) array8->data;
+    arg8 = (long*) array8->data;
   }
-  cscmucsc<double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,(int const (*))arg6,(int const (*))arg7,(double const (*))arg8,arg9,arg10,arg11);
+  cscmucsc<int,long >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long const (*))arg5,(int const (*))arg6,(int const (*))arg7,(long const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -13210,8 +13207,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONG); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(long)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -13263,13 +13260,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  long double *arg5 ;
+  float *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  long double *arg8 ;
+  float *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<long double > *arg11 = (std::vector<long double > *) 0 ;
+  std::vector<float > *arg11 = (std::vector<float > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -13288,7 +13285,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<long double > *tmp11 ;
+  std::vector<float > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -13307,7 +13304,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<long double>(); 
+    tmp11 = new std::vector<float>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscmucsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -13341,9 +13338,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (long double*) array5->data;
+    arg5 = (float*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -13365,11 +13362,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_LONGDOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_FLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (long double*) array8->data;
+    arg8 = (float*) array8->data;
   }
-  cscmucsc<long double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long double const (*))arg5,(int const (*))arg6,(int const (*))arg7,(long double const (*))arg8,arg9,arg10,arg11);
+  cscmucsc<int,float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,(int const (*))arg6,(int const (*))arg7,(float const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -13387,8 +13384,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(long double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(float)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -13440,13 +13437,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  double *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cfloat *arg8 ;
+  double *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<double > *arg11 = (std::vector<double > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -13465,7 +13462,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cfloat > *tmp11 ;
+  std::vector<double > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -13484,7 +13481,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cfloat>(); 
+    tmp11 = new std::vector<double>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscmucsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -13518,9 +13515,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (double*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -13542,11 +13539,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_DOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cfloat*) array8->data;
+    arg8 = (double*) array8->data;
   }
-  cscmucsc<npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
+  cscmucsc<int,double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,(int const (*))arg6,(int const (*))arg7,(double const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -13564,8 +13561,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(double)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -13617,13 +13614,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cfloat *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cdouble *arg8 ;
+  npy_cfloat *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -13642,7 +13639,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cdouble > *tmp11 ;
+  std::vector<npy_cfloat > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -13661,7 +13658,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cdouble>(); 
+    tmp11 = new std::vector<npy_cfloat>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscmucsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -13695,9 +13692,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cfloat*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -13719,11 +13716,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cdouble*) array8->data;
+    arg8 = (npy_cfloat*) array8->data;
   }
-  cscmucsc<npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
+  cscmucsc<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -13741,8 +13738,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -13794,13 +13791,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_clongdouble *arg5 ;
+  npy_cdouble *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_clongdouble *arg8 ;
+  npy_cdouble *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_clongdouble > *arg11 = (std::vector<npy_clongdouble > *) 0 ;
+  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -13819,7 +13816,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_clongdouble > *tmp11 ;
+  std::vector<npy_cdouble > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -13838,7 +13835,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_clongdouble>(); 
+    tmp11 = new std::vector<npy_cdouble>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscmucsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -13872,9 +13869,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CLONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_clongdouble*) array5->data;
+    arg5 = (npy_cdouble*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -13896,11 +13893,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CLONGDOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_clongdouble*) array8->data;
+    arg8 = (npy_cdouble*) array8->data;
   }
-  cscmucsc<npy_clongdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_clongdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_clongdouble const (*))arg8,arg9,arg10,arg11);
+  cscmucsc<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -13918,8 +13915,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CLONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_clongdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -13996,7 +13993,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -14008,7 +14005,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_FLOAT)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_INT)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_cscmucsc__SWIG_1(self, args);
@@ -14042,7 +14039,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONG)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -14054,7 +14051,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_DOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_LONG)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_cscmucsc__SWIG_2(self, args);
@@ -14088,7 +14085,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -14100,7 +14097,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_LONGDOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_FLOAT)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_cscmucsc__SWIG_3(self, args);
@@ -14134,7 +14131,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -14146,7 +14143,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CFLOAT)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_DOUBLE)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_cscmucsc__SWIG_4(self, args);
@@ -14180,7 +14177,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -14192,7 +14189,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CDOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CFLOAT)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_cscmucsc__SWIG_5(self, args);
@@ -14226,7 +14223,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -14238,7 +14235,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CDOUBLE)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_cscmucsc__SWIG_6(self, args);
@@ -14253,7 +14250,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cscmucsc'.\n  Possible C/C++ prototypes are:\n    cscmucsc<(float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    cscmucsc<(double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    cscmucsc<(long double)>(int const,int const,int const [],int const [],long double const [],int const [],int const [],long double const [],std::vector<int > *,std::vector<int > *,std::vector<long double > *)\n    cscmucsc<(npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    cscmucsc<(npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n    cscmucsc<(npy_clongdouble)>(int const,int const,int const [],int const [],npy_clongdouble const [],int const [],int const [],npy_clongdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_clongdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cscmucsc'.\n  Possible C/C++ prototypes are:\n    cscmucsc<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    cscmucsc<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    cscmucsc<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    cscmucsc<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    cscmucsc<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    cscmucsc<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
   return NULL;
 }
 
@@ -14264,9 +14261,9 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  float *arg5 ;
-  float *arg6 ;
-  std::vector<float > *arg7 = (std::vector<float > *) 0 ;
+  int *arg5 ;
+  int *arg6 ;
+  std::vector<int > *arg7 = (std::vector<int > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -14279,7 +14276,7 @@
   int is_new_object5 ;
   PyArrayObject *array6 = NULL ;
   int is_new_object6 ;
-  std::vector<float > *tmp7 ;
+  std::vector<int > *tmp7 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -14288,7 +14285,7 @@
   PyObject * obj5 = 0 ;
   
   {
-    tmp7 = new std::vector<float>(); 
+    tmp7 = new std::vector<int>(); 
     arg7 = tmp7; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:csrmux",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -14322,24 +14319,24 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (float*) array5->data;
+    arg5 = (int*) array5->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_FLOAT, &is_new_object6);
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_INT, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (float*) array6->data;
+    arg6 = (int*) array6->data;
   }
-  csrmux<float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,(float const (*))arg6,arg7);
+  csrmux<int,int >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(int const (*))arg5,(int const (*))arg6,arg7);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(float)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(int)*length);	 
     delete arg7; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -14379,9 +14376,9 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  double *arg5 ;
-  double *arg6 ;
-  std::vector<double > *arg7 = (std::vector<double > *) 0 ;
+  long *arg5 ;
+  long *arg6 ;
+  std::vector<long > *arg7 = (std::vector<long > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -14394,7 +14391,7 @@
   int is_new_object5 ;
   PyArrayObject *array6 = NULL ;
   int is_new_object6 ;
-  std::vector<double > *tmp7 ;
+  std::vector<long > *tmp7 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -14403,7 +14400,7 @@
   PyObject * obj5 = 0 ;
   
   {
-    tmp7 = new std::vector<double>(); 
+    tmp7 = new std::vector<long>(); 
     arg7 = tmp7; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:csrmux",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -14437,24 +14434,24 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONG, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (double*) array5->data;
+    arg5 = (long*) array5->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_DOUBLE, &is_new_object6);
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_LONG, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (double*) array6->data;
+    arg6 = (long*) array6->data;
   }
-  csrmux<double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,(double const (*))arg6,arg7);
+  csrmux<int,long >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long const (*))arg5,(long const (*))arg6,arg7);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONG); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(long)*length);	 
     delete arg7; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -14494,9 +14491,9 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  long double *arg5 ;
-  long double *arg6 ;
-  std::vector<long double > *arg7 = (std::vector<long double > *) 0 ;
+  float *arg5 ;
+  float *arg6 ;
+  std::vector<float > *arg7 = (std::vector<float > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -14509,7 +14506,7 @@
   int is_new_object5 ;
   PyArrayObject *array6 = NULL ;
   int is_new_object6 ;
-  std::vector<long double > *tmp7 ;
+  std::vector<float > *tmp7 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -14518,7 +14515,7 @@
   PyObject * obj5 = 0 ;
   
   {
-    tmp7 = new std::vector<long double>(); 
+    tmp7 = new std::vector<float>(); 
     arg7 = tmp7; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:csrmux",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -14552,24 +14549,24 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (long double*) array5->data;
+    arg5 = (float*) array5->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_LONGDOUBLE, &is_new_object6);
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_FLOAT, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (long double*) array6->data;
+    arg6 = (float*) array6->data;
   }
-  csrmux<long double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long double const (*))arg5,(long double const (*))arg6,arg7);
+  csrmux<int,float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,(float const (*))arg6,arg7);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(long double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(float)*length);	 
     delete arg7; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -14609,9 +14606,9 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
-  npy_cfloat *arg6 ;
-  std::vector<npy_cfloat > *arg7 = (std::vector<npy_cfloat > *) 0 ;
+  double *arg5 ;
+  double *arg6 ;
+  std::vector<double > *arg7 = (std::vector<double > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -14624,7 +14621,7 @@
   int is_new_object5 ;
   PyArrayObject *array6 = NULL ;
   int is_new_object6 ;
-  std::vector<npy_cfloat > *tmp7 ;
+  std::vector<double > *tmp7 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -14633,7 +14630,7 @@
   PyObject * obj5 = 0 ;
   
   {
-    tmp7 = new std::vector<npy_cfloat>(); 
+    tmp7 = new std::vector<double>(); 
     arg7 = tmp7; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:csrmux",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -14667,24 +14664,24 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (double*) array5->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CFLOAT, &is_new_object6);
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_DOUBLE, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_cfloat*) array6->data;
+    arg6 = (double*) array6->data;
   }
-  csrmux<npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(npy_cfloat const (*))arg6,arg7);
+  csrmux<int,double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,(double const (*))arg6,arg7);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cfloat)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(double)*length);	 
     delete arg7; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -14724,9 +14721,9 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
-  npy_cdouble *arg6 ;
-  std::vector<npy_cdouble > *arg7 = (std::vector<npy_cdouble > *) 0 ;
+  npy_cfloat *arg5 ;
+  npy_cfloat *arg6 ;
+  std::vector<npy_cfloat > *arg7 = (std::vector<npy_cfloat > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -14739,7 +14736,7 @@
   int is_new_object5 ;
   PyArrayObject *array6 = NULL ;
   int is_new_object6 ;
-  std::vector<npy_cdouble > *tmp7 ;
+  std::vector<npy_cfloat > *tmp7 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -14748,7 +14745,7 @@
   PyObject * obj5 = 0 ;
   
   {
-    tmp7 = new std::vector<npy_cdouble>(); 
+    tmp7 = new std::vector<npy_cfloat>(); 
     arg7 = tmp7; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:csrmux",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -14782,24 +14779,24 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cfloat*) array5->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CDOUBLE, &is_new_object6);
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CFLOAT, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_cdouble*) array6->data;
+    arg6 = (npy_cfloat*) array6->data;
   }
-  csrmux<npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(npy_cdouble const (*))arg6,arg7);
+  csrmux<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(npy_cfloat const (*))arg6,arg7);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cfloat)*length);	 
     delete arg7; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -14839,9 +14836,9 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_clongdouble *arg5 ;
-  npy_clongdouble *arg6 ;
-  std::vector<npy_clongdouble > *arg7 = (std::vector<npy_clongdouble > *) 0 ;
+  npy_cdouble *arg5 ;
+  npy_cdouble *arg6 ;
+  std::vector<npy_cdouble > *arg7 = (std::vector<npy_cdouble > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -14854,7 +14851,7 @@
   int is_new_object5 ;
   PyArrayObject *array6 = NULL ;
   int is_new_object6 ;
-  std::vector<npy_clongdouble > *tmp7 ;
+  std::vector<npy_cdouble > *tmp7 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -14863,7 +14860,7 @@
   PyObject * obj5 = 0 ;
   
   {
-    tmp7 = new std::vector<npy_clongdouble>(); 
+    tmp7 = new std::vector<npy_cdouble>(); 
     arg7 = tmp7; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:csrmux",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -14897,24 +14894,24 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CLONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_clongdouble*) array5->data;
+    arg5 = (npy_cdouble*) array5->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CLONGDOUBLE, &is_new_object6);
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CDOUBLE, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_clongdouble*) array6->data;
+    arg6 = (npy_cdouble*) array6->data;
   }
-  csrmux<npy_clongdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_clongdouble const (*))arg5,(npy_clongdouble const (*))arg6,arg7);
+  csrmux<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(npy_cdouble const (*))arg6,arg7);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CLONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_clongdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cdouble)*length);	 
     delete arg7; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -14979,11 +14976,11 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_FLOAT)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_INT)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_csrmux__SWIG_1(self, args);
@@ -15015,11 +15012,11 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONG)) ? 1 : 0;
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_DOUBLE)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_LONG)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_csrmux__SWIG_2(self, args);
@@ -15051,11 +15048,11 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_LONGDOUBLE)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_FLOAT)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_csrmux__SWIG_3(self, args);
@@ -15087,11 +15084,11 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CFLOAT)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_DOUBLE)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_csrmux__SWIG_4(self, args);
@@ -15123,11 +15120,11 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CDOUBLE)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CFLOAT)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_csrmux__SWIG_5(self, args);
@@ -15159,11 +15156,11 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CDOUBLE)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_csrmux__SWIG_6(self, args);
@@ -15176,7 +15173,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrmux'.\n  Possible C/C++ prototypes are:\n    csrmux<(float)>(int const,int const,int const [],int const [],float const [],float const [],std::vector<float > *)\n    csrmux<(double)>(int const,int const,int const [],int const [],double const [],double const [],std::vector<double > *)\n    csrmux<(long double)>(int const,int const,int const [],int const [],long double const [],long double const [],std::vector<long double > *)\n    csrmux<(npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],npy_cfloat const [],std::vector<npy_cfloat > *)\n    csrmux<(npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],npy_cdouble const [],std::vector<npy_cdouble > *)\n    csrmux<(npy_clongdouble)>(int const,int const,int const [],int const [],npy_clongdouble const [],npy_clongdouble const [],std::vector<npy_clongdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrmux'.\n  Possible C/C++ prototypes are:\n    csrmux<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],std::vector<int > *)\n    csrmux<(int,long)>(int const,int const,int const [],int const [],long const [],long const [],std::vector<long > *)\n    csrmux<(int,float)>(int const,int const,int const [],int const [],float const [],float const [],std::vector<float > *)\n    csrmux<(int,double)>(int const,int const,int const [],int const [],double const [],double const [],std::vector<double > *)\n    csrmux<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],npy_cfloat const [],std::vector<npy_cfloat > *)\n    csrmux<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],npy_cdouble const [],std::vector<npy_cdouble > *)\n");
   return NULL;
 }
 
@@ -15187,9 +15184,9 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  float *arg5 ;
-  float *arg6 ;
-  std::vector<float > *arg7 = (std::vector<float > *) 0 ;
+  int *arg5 ;
+  int *arg6 ;
+  std::vector<int > *arg7 = (std::vector<int > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -15202,7 +15199,7 @@
   int is_new_object5 ;
   PyArrayObject *array6 = NULL ;
   int is_new_object6 ;
-  std::vector<float > *tmp7 ;
+  std::vector<int > *tmp7 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -15211,7 +15208,7 @@
   PyObject * obj5 = 0 ;
   
   {
-    tmp7 = new std::vector<float>(); 
+    tmp7 = new std::vector<int>(); 
     arg7 = tmp7; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cscmux",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -15245,24 +15242,24 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (float*) array5->data;
+    arg5 = (int*) array5->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_FLOAT, &is_new_object6);
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_INT, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (float*) array6->data;
+    arg6 = (int*) array6->data;
   }
-  cscmux<float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,(float const (*))arg6,arg7);
+  cscmux<int,int >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(int const (*))arg5,(int const (*))arg6,arg7);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(float)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(int)*length);	 
     delete arg7; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -15302,9 +15299,9 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  double *arg5 ;
-  double *arg6 ;
-  std::vector<double > *arg7 = (std::vector<double > *) 0 ;
+  long *arg5 ;
+  long *arg6 ;
+  std::vector<long > *arg7 = (std::vector<long > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -15317,7 +15314,7 @@
   int is_new_object5 ;
   PyArrayObject *array6 = NULL ;
   int is_new_object6 ;
-  std::vector<double > *tmp7 ;
+  std::vector<long > *tmp7 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -15326,7 +15323,7 @@
   PyObject * obj5 = 0 ;
   
   {
-    tmp7 = new std::vector<double>(); 
+    tmp7 = new std::vector<long>(); 
     arg7 = tmp7; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cscmux",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -15360,24 +15357,24 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONG, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (double*) array5->data;
+    arg5 = (long*) array5->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_DOUBLE, &is_new_object6);
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_LONG, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (double*) array6->data;
+    arg6 = (long*) array6->data;
   }
-  cscmux<double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,(double const (*))arg6,arg7);
+  cscmux<int,long >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long const (*))arg5,(long const (*))arg6,arg7);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONG); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(long)*length);	 
     delete arg7; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -15417,9 +15414,9 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  long double *arg5 ;
-  long double *arg6 ;
-  std::vector<long double > *arg7 = (std::vector<long double > *) 0 ;
+  float *arg5 ;
+  float *arg6 ;
+  std::vector<float > *arg7 = (std::vector<float > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -15432,7 +15429,7 @@
   int is_new_object5 ;
   PyArrayObject *array6 = NULL ;
   int is_new_object6 ;
-  std::vector<long double > *tmp7 ;
+  std::vector<float > *tmp7 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -15441,7 +15438,7 @@
   PyObject * obj5 = 0 ;
   
   {
-    tmp7 = new std::vector<long double>(); 
+    tmp7 = new std::vector<float>(); 
     arg7 = tmp7; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cscmux",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -15475,24 +15472,24 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (long double*) array5->data;
+    arg5 = (float*) array5->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_LONGDOUBLE, &is_new_object6);
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_FLOAT, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (long double*) array6->data;
+    arg6 = (float*) array6->data;
   }
-  cscmux<long double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long double const (*))arg5,(long double const (*))arg6,arg7);
+  cscmux<int,float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,(float const (*))arg6,arg7);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(long double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(float)*length);	 
     delete arg7; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -15532,9 +15529,9 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
-  npy_cfloat *arg6 ;
-  std::vector<npy_cfloat > *arg7 = (std::vector<npy_cfloat > *) 0 ;
+  double *arg5 ;
+  double *arg6 ;
+  std::vector<double > *arg7 = (std::vector<double > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -15547,7 +15544,7 @@
   int is_new_object5 ;
   PyArrayObject *array6 = NULL ;
   int is_new_object6 ;
-  std::vector<npy_cfloat > *tmp7 ;
+  std::vector<double > *tmp7 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -15556,7 +15553,7 @@
   PyObject * obj5 = 0 ;
   
   {
-    tmp7 = new std::vector<npy_cfloat>(); 
+    tmp7 = new std::vector<double>(); 
     arg7 = tmp7; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cscmux",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -15590,24 +15587,24 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (double*) array5->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CFLOAT, &is_new_object6);
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_DOUBLE, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_cfloat*) array6->data;
+    arg6 = (double*) array6->data;
   }
-  cscmux<npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(npy_cfloat const (*))arg6,arg7);
+  cscmux<int,double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,(double const (*))arg6,arg7);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cfloat)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(double)*length);	 
     delete arg7; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -15647,9 +15644,9 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
-  npy_cdouble *arg6 ;
-  std::vector<npy_cdouble > *arg7 = (std::vector<npy_cdouble > *) 0 ;
+  npy_cfloat *arg5 ;
+  npy_cfloat *arg6 ;
+  std::vector<npy_cfloat > *arg7 = (std::vector<npy_cfloat > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -15662,7 +15659,7 @@
   int is_new_object5 ;
   PyArrayObject *array6 = NULL ;
   int is_new_object6 ;
-  std::vector<npy_cdouble > *tmp7 ;
+  std::vector<npy_cfloat > *tmp7 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -15671,7 +15668,7 @@
   PyObject * obj5 = 0 ;
   
   {
-    tmp7 = new std::vector<npy_cdouble>(); 
+    tmp7 = new std::vector<npy_cfloat>(); 
     arg7 = tmp7; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cscmux",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -15705,24 +15702,24 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cfloat*) array5->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CDOUBLE, &is_new_object6);
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CFLOAT, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_cdouble*) array6->data;
+    arg6 = (npy_cfloat*) array6->data;
   }
-  cscmux<npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(npy_cdouble const (*))arg6,arg7);
+  cscmux<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(npy_cfloat const (*))arg6,arg7);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cfloat)*length);	 
     delete arg7; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -15762,9 +15759,9 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_clongdouble *arg5 ;
-  npy_clongdouble *arg6 ;
-  std::vector<npy_clongdouble > *arg7 = (std::vector<npy_clongdouble > *) 0 ;
+  npy_cdouble *arg5 ;
+  npy_cdouble *arg6 ;
+  std::vector<npy_cdouble > *arg7 = (std::vector<npy_cdouble > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -15777,7 +15774,7 @@
   int is_new_object5 ;
   PyArrayObject *array6 = NULL ;
   int is_new_object6 ;
-  std::vector<npy_clongdouble > *tmp7 ;
+  std::vector<npy_cdouble > *tmp7 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -15786,7 +15783,7 @@
   PyObject * obj5 = 0 ;
   
   {
-    tmp7 = new std::vector<npy_clongdouble>(); 
+    tmp7 = new std::vector<npy_cdouble>(); 
     arg7 = tmp7; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cscmux",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -15820,24 +15817,24 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CLONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_clongdouble*) array5->data;
+    arg5 = (npy_cdouble*) array5->data;
   }
   {
     npy_intp size[1] = {
       -1
     };
-    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CLONGDOUBLE, &is_new_object6);
+    array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CDOUBLE, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_clongdouble*) array6->data;
+    arg6 = (npy_cdouble*) array6->data;
   }
-  cscmux<npy_clongdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_clongdouble const (*))arg5,(npy_clongdouble const (*))arg6,arg7);
+  cscmux<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(npy_cdouble const (*))arg6,arg7);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CLONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_clongdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cdouble)*length);	 
     delete arg7; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -15902,11 +15899,11 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_FLOAT)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_INT)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_cscmux__SWIG_1(self, args);
@@ -15938,11 +15935,11 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONG)) ? 1 : 0;
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_DOUBLE)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_LONG)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_cscmux__SWIG_2(self, args);
@@ -15974,11 +15971,11 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_LONGDOUBLE)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_FLOAT)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_cscmux__SWIG_3(self, args);
@@ -16010,11 +16007,11 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CFLOAT)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_DOUBLE)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_cscmux__SWIG_4(self, args);
@@ -16046,11 +16043,11 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CDOUBLE)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CFLOAT)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_cscmux__SWIG_5(self, args);
@@ -16082,11 +16079,11 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CDOUBLE)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_cscmux__SWIG_6(self, args);
@@ -16099,7 +16096,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cscmux'.\n  Possible C/C++ prototypes are:\n    cscmux<(float)>(int const,int const,int const [],int const [],float const [],float const [],std::vector<float > *)\n    cscmux<(double)>(int const,int const,int const [],int const [],double const [],double const [],std::vector<double > *)\n    cscmux<(long double)>(int const,int const,int const [],int const [],long double const [],long double const [],std::vector<long double > *)\n    cscmux<(npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],npy_cfloat const [],std::vector<npy_cfloat > *)\n    cscmux<(npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],npy_cdouble const [],std::vector<npy_cdouble > *)\n    cscmux<(npy_clongdouble)>(int const,int const,int const [],int const [],npy_clongdouble const [],npy_clongdouble const [],std::vector<npy_clongdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cscmux'.\n  Possible C/C++ prototypes are:\n    cscmux<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],std::vector<int > *)\n    cscmux<(int,long)>(int const,int const,int const [],int const [],long const [],long const [],std::vector<long > *)\n    cscmux<(int,float)>(int const,int const,int const [],int const [],float const [],float const [],std::vector<float > *)\n    cscmux<(int,double)>(int const,int const,int const [],int const [],double const [],double const [],std::vector<double > *)\n    cscmux<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],npy_cfloat const [],std::vector<npy_cfloat > *)\n    cscmux<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],npy_cdouble const [],std::vector<npy_cdouble > *)\n");
   return NULL;
 }
 
@@ -16110,13 +16107,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  float *arg5 ;
+  int *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  float *arg8 ;
+  int *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<float > *arg11 = (std::vector<float > *) 0 ;
+  std::vector<int > *arg11 = (std::vector<int > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -16135,7 +16132,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<float > *tmp11 ;
+  std::vector<int > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -16154,7 +16151,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<float>(); 
+    tmp11 = new std::vector<int>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrelmulcsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -16188,9 +16185,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (float*) array5->data;
+    arg5 = (int*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -16212,11 +16209,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_FLOAT, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_INT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (float*) array8->data;
+    arg8 = (int*) array8->data;
   }
-  csrelmulcsr<float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,(int const (*))arg6,(int const (*))arg7,(float const (*))arg8,arg9,arg10,arg11);
+  csrelmulcsr<int,int >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(int const (*))arg5,(int const (*))arg6,(int const (*))arg7,(int const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -16234,8 +16231,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(float)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(int)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -16287,13 +16284,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  double *arg5 ;
+  long *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  double *arg8 ;
+  long *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<double > *arg11 = (std::vector<double > *) 0 ;
+  std::vector<long > *arg11 = (std::vector<long > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -16312,7 +16309,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<double > *tmp11 ;
+  std::vector<long > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -16331,7 +16328,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<double>(); 
+    tmp11 = new std::vector<long>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrelmulcsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -16365,9 +16362,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONG, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (double*) array5->data;
+    arg5 = (long*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -16389,11 +16386,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_DOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_LONG, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (double*) array8->data;
+    arg8 = (long*) array8->data;
   }
-  csrelmulcsr<double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,(int const (*))arg6,(int const (*))arg7,(double const (*))arg8,arg9,arg10,arg11);
+  csrelmulcsr<int,long >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long const (*))arg5,(int const (*))arg6,(int const (*))arg7,(long const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -16411,8 +16408,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONG); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(long)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -16464,13 +16461,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  long double *arg5 ;
+  float *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  long double *arg8 ;
+  float *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<long double > *arg11 = (std::vector<long double > *) 0 ;
+  std::vector<float > *arg11 = (std::vector<float > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -16489,7 +16486,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<long double > *tmp11 ;
+  std::vector<float > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -16508,7 +16505,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<long double>(); 
+    tmp11 = new std::vector<float>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrelmulcsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -16542,9 +16539,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (long double*) array5->data;
+    arg5 = (float*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -16566,11 +16563,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_LONGDOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_FLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (long double*) array8->data;
+    arg8 = (float*) array8->data;
   }
-  csrelmulcsr<long double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long double const (*))arg5,(int const (*))arg6,(int const (*))arg7,(long double const (*))arg8,arg9,arg10,arg11);
+  csrelmulcsr<int,float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,(int const (*))arg6,(int const (*))arg7,(float const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -16588,8 +16585,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(long double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(float)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -16641,13 +16638,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  double *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cfloat *arg8 ;
+  double *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<double > *arg11 = (std::vector<double > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -16666,7 +16663,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cfloat > *tmp11 ;
+  std::vector<double > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -16685,7 +16682,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cfloat>(); 
+    tmp11 = new std::vector<double>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrelmulcsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -16719,9 +16716,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (double*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -16743,11 +16740,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_DOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cfloat*) array8->data;
+    arg8 = (double*) array8->data;
   }
-  csrelmulcsr<npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
+  csrelmulcsr<int,double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,(int const (*))arg6,(int const (*))arg7,(double const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -16765,8 +16762,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(double)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -16818,13 +16815,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cfloat *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cdouble *arg8 ;
+  npy_cfloat *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -16843,7 +16840,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cdouble > *tmp11 ;
+  std::vector<npy_cfloat > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -16862,7 +16859,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cdouble>(); 
+    tmp11 = new std::vector<npy_cfloat>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrelmulcsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -16896,9 +16893,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cfloat*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -16920,11 +16917,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cdouble*) array8->data;
+    arg8 = (npy_cfloat*) array8->data;
   }
-  csrelmulcsr<npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
+  csrelmulcsr<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -16942,8 +16939,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -16995,13 +16992,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_clongdouble *arg5 ;
+  npy_cdouble *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_clongdouble *arg8 ;
+  npy_cdouble *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_clongdouble > *arg11 = (std::vector<npy_clongdouble > *) 0 ;
+  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -17020,7 +17017,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_clongdouble > *tmp11 ;
+  std::vector<npy_cdouble > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -17039,7 +17036,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_clongdouble>(); 
+    tmp11 = new std::vector<npy_cdouble>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrelmulcsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -17073,9 +17070,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CLONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_clongdouble*) array5->data;
+    arg5 = (npy_cdouble*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -17097,11 +17094,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CLONGDOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_clongdouble*) array8->data;
+    arg8 = (npy_cdouble*) array8->data;
   }
-  csrelmulcsr<npy_clongdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_clongdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_clongdouble const (*))arg8,arg9,arg10,arg11);
+  csrelmulcsr<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -17119,8 +17116,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CLONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_clongdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -17197,7 +17194,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -17209,7 +17206,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_FLOAT)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_INT)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_csrelmulcsr__SWIG_1(self, args);
@@ -17243,7 +17240,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONG)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -17255,7 +17252,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_DOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_LONG)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_csrelmulcsr__SWIG_2(self, args);
@@ -17289,7 +17286,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -17301,7 +17298,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_LONGDOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_FLOAT)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_csrelmulcsr__SWIG_3(self, args);
@@ -17335,7 +17332,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -17347,7 +17344,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CFLOAT)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_DOUBLE)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_csrelmulcsr__SWIG_4(self, args);
@@ -17381,7 +17378,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -17393,7 +17390,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CDOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CFLOAT)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_csrelmulcsr__SWIG_5(self, args);
@@ -17427,7 +17424,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -17439,7 +17436,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CDOUBLE)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_csrelmulcsr__SWIG_6(self, args);
@@ -17454,7 +17451,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrelmulcsr'.\n  Possible C/C++ prototypes are:\n    csrelmulcsr<(float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csrelmulcsr<(double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csrelmulcsr<(long double)>(int const,int const,int const [],int const [],long double const [],int const [],int const [],long double const [],std::vector<int > *,std::vector<int > *,std::vector<long double > *)\n    csrelmulcsr<(npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csrelmulcsr<(npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n    csrelmulcsr<(npy_clongdouble)>(int const,int const,int const [],int const [],npy_clongdouble const [],int const [],int const [],npy_clongdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_clongdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrelmulcsr'.\n  Possible C/C++ prototypes are:\n    csrelmulcsr<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csrelmulcsr<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csrelmulcsr<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csrelmulcsr<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csrelmulcsr<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csrelmulcsr<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
   return NULL;
 }
 
@@ -17465,13 +17462,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  float *arg5 ;
+  int *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  float *arg8 ;
+  int *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<float > *arg11 = (std::vector<float > *) 0 ;
+  std::vector<int > *arg11 = (std::vector<int > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -17490,7 +17487,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<float > *tmp11 ;
+  std::vector<int > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -17509,7 +17506,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<float>(); 
+    tmp11 = new std::vector<int>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscelmulcsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -17543,9 +17540,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (float*) array5->data;
+    arg5 = (int*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -17567,11 +17564,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_FLOAT, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_INT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (float*) array8->data;
+    arg8 = (int*) array8->data;
   }
-  cscelmulcsc<float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,(int const (*))arg6,(int const (*))arg7,(float const (*))arg8,arg9,arg10,arg11);
+  cscelmulcsc<int,int >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(int const (*))arg5,(int const (*))arg6,(int const (*))arg7,(int const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -17589,8 +17586,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(float)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(int)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -17642,13 +17639,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  double *arg5 ;
+  long *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  double *arg8 ;
+  long *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<double > *arg11 = (std::vector<double > *) 0 ;
+  std::vector<long > *arg11 = (std::vector<long > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -17667,7 +17664,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<double > *tmp11 ;
+  std::vector<long > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -17686,7 +17683,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<double>(); 
+    tmp11 = new std::vector<long>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscelmulcsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -17720,9 +17717,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONG, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (double*) array5->data;
+    arg5 = (long*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -17744,11 +17741,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_DOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_LONG, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (double*) array8->data;
+    arg8 = (long*) array8->data;
   }
-  cscelmulcsc<double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,(int const (*))arg6,(int const (*))arg7,(double const (*))arg8,arg9,arg10,arg11);
+  cscelmulcsc<int,long >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long const (*))arg5,(int const (*))arg6,(int const (*))arg7,(long const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -17766,8 +17763,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONG); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(long)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -17819,13 +17816,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  long double *arg5 ;
+  float *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  long double *arg8 ;
+  float *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<long double > *arg11 = (std::vector<long double > *) 0 ;
+  std::vector<float > *arg11 = (std::vector<float > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -17844,7 +17841,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<long double > *tmp11 ;
+  std::vector<float > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -17863,7 +17860,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<long double>(); 
+    tmp11 = new std::vector<float>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscelmulcsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -17897,9 +17894,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (long double*) array5->data;
+    arg5 = (float*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -17921,11 +17918,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_LONGDOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_FLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (long double*) array8->data;
+    arg8 = (float*) array8->data;
   }
-  cscelmulcsc<long double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long double const (*))arg5,(int const (*))arg6,(int const (*))arg7,(long double const (*))arg8,arg9,arg10,arg11);
+  cscelmulcsc<int,float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,(int const (*))arg6,(int const (*))arg7,(float const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -17943,8 +17940,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(long double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(float)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -17996,13 +17993,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  double *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cfloat *arg8 ;
+  double *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<double > *arg11 = (std::vector<double > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -18021,7 +18018,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cfloat > *tmp11 ;
+  std::vector<double > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -18040,7 +18037,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cfloat>(); 
+    tmp11 = new std::vector<double>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscelmulcsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -18074,9 +18071,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (double*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -18098,11 +18095,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_DOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cfloat*) array8->data;
+    arg8 = (double*) array8->data;
   }
-  cscelmulcsc<npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
+  cscelmulcsc<int,double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,(int const (*))arg6,(int const (*))arg7,(double const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -18120,8 +18117,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(double)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -18173,13 +18170,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cfloat *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cdouble *arg8 ;
+  npy_cfloat *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -18198,7 +18195,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cdouble > *tmp11 ;
+  std::vector<npy_cfloat > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -18217,7 +18214,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cdouble>(); 
+    tmp11 = new std::vector<npy_cfloat>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscelmulcsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -18251,9 +18248,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cfloat*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -18275,11 +18272,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cdouble*) array8->data;
+    arg8 = (npy_cfloat*) array8->data;
   }
-  cscelmulcsc<npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
+  cscelmulcsc<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -18297,8 +18294,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -18350,13 +18347,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_clongdouble *arg5 ;
+  npy_cdouble *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_clongdouble *arg8 ;
+  npy_cdouble *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_clongdouble > *arg11 = (std::vector<npy_clongdouble > *) 0 ;
+  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -18375,7 +18372,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_clongdouble > *tmp11 ;
+  std::vector<npy_cdouble > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -18394,7 +18391,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_clongdouble>(); 
+    tmp11 = new std::vector<npy_cdouble>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscelmulcsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -18428,9 +18425,9 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CLONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_clongdouble*) array5->data;
+    arg5 = (npy_cdouble*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -18452,11 +18449,11 @@
     npy_intp size[1] = {
       -1
     };
-    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CLONGDOUBLE, &is_new_object8);
+    array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_clongdouble*) array8->data;
+    arg8 = (npy_cdouble*) array8->data;
   }
-  cscelmulcsc<npy_clongdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_clongdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_clongdouble const (*))arg8,arg9,arg10,arg11);
+  cscelmulcsc<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -18474,8 +18471,8 @@
   }
   {
     int length = (arg11)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CLONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_clongdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -18552,7 +18549,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -18564,7 +18561,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_FLOAT)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_INT)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_cscelmulcsc__SWIG_1(self, args);
@@ -18598,7 +18595,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONG)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -18610,7 +18607,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_DOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_LONG)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_cscelmulcsc__SWIG_2(self, args);
@@ -18644,7 +18641,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -18656,7 +18653,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_LONGDOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_FLOAT)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_cscelmulcsc__SWIG_3(self, args);
@@ -18690,7 +18687,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -18702,7 +18699,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CFLOAT)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_DOUBLE)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_cscelmulcsc__SWIG_4(self, args);
@@ -18736,7 +18733,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -18748,7 +18745,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CDOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CFLOAT)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_cscelmulcsc__SWIG_5(self, args);
@@ -18782,7 +18779,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
             }
             if (_v) {
               {
@@ -18794,7 +18791,7 @@
                 }
                 if (_v) {
                   {
-                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+                    _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CDOUBLE)) ? 1 : 0;
                   }
                   if (_v) {
                     return _wrap_cscelmulcsc__SWIG_6(self, args);
@@ -18809,7 +18806,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cscelmulcsc'.\n  Possible C/C++ prototypes are:\n    cscelmulcsc<(float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    cscelmulcsc<(double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    cscelmulcsc<(long double)>(int const,int const,int const [],int const [],long double const [],int const [],int const [],long double const [],std::vector<int > *,std::vector<int > *,std::vector<long double > *)\n    cscelmulcsc<(npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    cscelmulcsc<(npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n    cscelmulcsc<(npy_clongdouble)>(int const,int const,int const [],int const [],npy_clongdouble const [],int const [],int const [],npy_clongdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_clongdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cscelmulcsc'.\n  Possible C/C++ prototypes are:\n    cscelmulcsc<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    cscelmulcsc<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    cscelmulcsc<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    cscelmulcsc<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    cscelmulcsc<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    cscelmulcsc<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
   return NULL;
 }
 
@@ -18820,10 +18817,10 @@
   int arg2 ;
   int arg3 ;
   int *arg4 ;
-  float *arg5 ;
+  int *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<float > *arg8 = (std::vector<float > *) 0 ;
+  std::vector<int > *arg8 = (std::vector<int > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -18836,7 +18833,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<float > *tmp8 ;
+  std::vector<int > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -18852,7 +18849,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<float>(); 
+    tmp8 = new std::vector<int>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:spdiags",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -18883,11 +18880,11 @@
     npy_intp size[2] = {
       -1,-1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,2) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (float*) array5->data;
+    arg5 = (int*) array5->data;
   }
-  spdiags<float >(arg1,arg2,arg3,(int const (*))arg4,(float const (*))arg5,arg6,arg7,arg8);
+  spdiags<int,int >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -18905,8 +18902,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(float)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(int)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -18934,10 +18931,10 @@
   int arg2 ;
   int arg3 ;
   int *arg4 ;
-  double *arg5 ;
+  long *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<double > *arg8 = (std::vector<double > *) 0 ;
+  std::vector<long > *arg8 = (std::vector<long > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -18950,7 +18947,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<double > *tmp8 ;
+  std::vector<long > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -18966,7 +18963,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<double>(); 
+    tmp8 = new std::vector<long>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:spdiags",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -18997,11 +18994,11 @@
     npy_intp size[2] = {
       -1,-1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONG, &is_new_object5);
     if (!array5 || !require_dimensions(array5,2) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (double*) array5->data;
+    arg5 = (long*) array5->data;
   }
-  spdiags<double >(arg1,arg2,arg3,(int const (*))arg4,(double const (*))arg5,arg6,arg7,arg8);
+  spdiags<int,long >(arg1,arg2,arg3,(int const (*))arg4,(long const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -19019,8 +19016,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONG); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(long)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -19048,10 +19045,10 @@
   int arg2 ;
   int arg3 ;
   int *arg4 ;
-  long double *arg5 ;
+  float *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<long double > *arg8 = (std::vector<long double > *) 0 ;
+  std::vector<float > *arg8 = (std::vector<float > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -19064,7 +19061,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<long double > *tmp8 ;
+  std::vector<float > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -19080,7 +19077,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<long double>(); 
+    tmp8 = new std::vector<float>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:spdiags",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -19111,11 +19108,11 @@
     npy_intp size[2] = {
       -1,-1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,2) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (long double*) array5->data;
+    arg5 = (float*) array5->data;
   }
-  spdiags<long double >(arg1,arg2,arg3,(int const (*))arg4,(long double const (*))arg5,arg6,arg7,arg8);
+  spdiags<int,float >(arg1,arg2,arg3,(int const (*))arg4,(float const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -19133,8 +19130,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(long double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(float)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -19162,10 +19159,10 @@
   int arg2 ;
   int arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  double *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg8 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<double > *arg8 = (std::vector<double > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -19178,7 +19175,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cfloat > *tmp8 ;
+  std::vector<double > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -19194,7 +19191,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cfloat>(); 
+    tmp8 = new std::vector<double>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:spdiags",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -19225,11 +19222,11 @@
     npy_intp size[2] = {
       -1,-1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,2) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (double*) array5->data;
   }
-  spdiags<npy_cfloat >(arg1,arg2,arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,arg6,arg7,arg8);
+  spdiags<int,double >(arg1,arg2,arg3,(int const (*))arg4,(double const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -19247,8 +19244,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(double)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -19276,10 +19273,10 @@
   int arg2 ;
   int arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cfloat *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg8 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cfloat > *arg8 = (std::vector<npy_cfloat > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -19292,7 +19289,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cdouble > *tmp8 ;
+  std::vector<npy_cfloat > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -19308,7 +19305,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cdouble>(); 
+    tmp8 = new std::vector<npy_cfloat>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:spdiags",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -19339,11 +19336,11 @@
     npy_intp size[2] = {
       -1,-1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,2) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cfloat*) array5->data;
   }
-  spdiags<npy_cdouble >(arg1,arg2,arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,arg6,arg7,arg8);
+  spdiags<int,npy_cfloat >(arg1,arg2,arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -19361,8 +19358,8 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -19390,10 +19387,10 @@
   int arg2 ;
   int arg3 ;
   int *arg4 ;
-  npy_clongdouble *arg5 ;
+  npy_cdouble *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_clongdouble > *arg8 = (std::vector<npy_clongdouble > *) 0 ;
+  std::vector<npy_cdouble > *arg8 = (std::vector<npy_cdouble > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -19402,11 +19399,11 @@
   int ecode3 = 0 ;
   PyArrayObject *array4 = NULL ;
   int is_new_object4 ;
-  void *argp5 = 0 ;
-  int res5 = 0 ;
+  PyArrayObject *array5 = NULL ;
+  int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_clongdouble > *tmp8 ;
+  std::vector<npy_cdouble > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -19422,7 +19419,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_clongdouble>(); 
+    tmp8 = new std::vector<npy_cdouble>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:spdiags",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -19449,12 +19446,15 @@
     if (!array4 || !require_dimensions(array4,1) || !require_size(array4,size,1)) SWIG_fail;
     arg4 = (int*) array4->data;
   }
-  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_npy_clongdouble, 0 |  0 );
-  if (!SWIG_IsOK(res5)) {
-    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "spdiags" "', argument " "5"" of type '" "npy_clongdouble const []""'"); 
-  } 
-  arg5 = reinterpret_cast< npy_clongdouble * >(argp5);
-  spdiags<npy_clongdouble >(arg1,arg2,arg3,(int const (*))arg4,(npy_clongdouble const (*))arg5,arg6,arg7,arg8);
+  {
+    npy_intp size[2] = {
+      -1,-1
+    };
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
+    if (!array5 || !require_dimensions(array5,2) || !require_size(array5,size,1)) SWIG_fail;
+    arg5 = (npy_cdouble*) array5->data;
+  }
+  spdiags<int,npy_cdouble >(arg1,arg2,arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -19472,19 +19472,25 @@
   }
   {
     int length = (arg8)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CLONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_clongdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
   {
     if (is_new_object4 && array4) Py_DECREF(array4);
   }
+  {
+    if (is_new_object5 && array5) Py_DECREF(array5);
+  }
   return resultobj;
 fail:
   {
     if (is_new_object4 && array4) Py_DECREF(array4);
   }
+  {
+    if (is_new_object5 && array5) Py_DECREF(array5);
+  }
   return NULL;
 }
 
@@ -19521,7 +19527,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_spdiags__SWIG_1(self, args);
@@ -19553,7 +19559,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONG)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_spdiags__SWIG_2(self, args);
@@ -19585,7 +19591,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_spdiags__SWIG_3(self, args);
@@ -19617,7 +19623,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_spdiags__SWIG_4(self, args);
@@ -19649,7 +19655,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_spdiags__SWIG_5(self, args);
@@ -19681,7 +19687,7 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
             }
             if (_v) {
               return _wrap_spdiags__SWIG_6(self, args);
@@ -19693,7 +19699,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'spdiags'.\n  Possible C/C++ prototypes are:\n    spdiags<(float)>(int const,int const,int const,int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    spdiags<(double)>(int const,int const,int const,int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    spdiags<(long double)>(int const,int const,int const,int const [],long double const [],std::vector<int > *,std::vector<int > *,std::vector<long double > *)\n    spdiags<(npy_cfloat)>(int const,int const,int const,int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    spdiags<(npy_cdouble)>(int const,int const,int const,int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n    spdiags<(npy_clongdouble)>(int const,int const,int const,int const [],npy_clongdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_clongdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'spdiags'.\n  Possible C/C++ prototypes are:\n    spdiags<(int,int)>(int const,int const,int const,int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    spdiags<(int,long)>(int const,int const,int const,int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    spdiags<(int,float)>(int const,int const,int const,int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    spdiags<(int,double)>(int const,int const,int const,int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    spdiags<(int,npy_cfloat)>(int const,int const,int const,int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    spdiags<(int,npy_cdouble)>(int const,int const,int const,int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
   return NULL;
 }
 
@@ -19704,8 +19710,8 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  float *arg5 ;
-  float *arg6 ;
+  int *arg5 ;
+  int *arg6 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -19755,16 +19761,16 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_INT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (float*) array5->data;
+    arg5 = (int*) array5->data;
   }
   {
-    temp6 = obj_to_array_no_conversion(obj5,PyArray_FLOAT);
+    temp6 = obj_to_array_no_conversion(obj5,PyArray_INT);
     if (!temp6 || !require_contiguous(temp6)) SWIG_fail;
-    arg6 = (float*) temp6->data;
+    arg6 = (int*) temp6->data;
   }
-  csrtodense<float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,arg6);
+  csrtodense<int,int >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(int const (*))arg5,arg6);
   resultobj = SWIG_Py_Void();
   {
     if (is_new_object3 && array3) Py_DECREF(array3);
@@ -19796,8 +19802,8 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  double *arg5 ;
-  double *arg6 ;
+  long *arg5 ;
+  long *arg6 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -19847,16 +19853,16 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONG, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (double*) array5->data;
+    arg5 = (long*) array5->data;
   }
   {
-    temp6 = obj_to_array_no_conversion(obj5,PyArray_DOUBLE);
+    temp6 = obj_to_array_no_conversion(obj5,PyArray_LONG);
     if (!temp6 || !require_contiguous(temp6)) SWIG_fail;
-    arg6 = (double*) temp6->data;
+    arg6 = (long*) temp6->data;
   }
-  csrtodense<double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,arg6);
+  csrtodense<int,long >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long const (*))arg5,arg6);
   resultobj = SWIG_Py_Void();
   {
     if (is_new_object3 && array3) Py_DECREF(array3);
@@ -19888,8 +19894,8 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  long double *arg5 ;
-  long double *arg6 ;
+  float *arg5 ;
+  float *arg6 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -19939,16 +19945,16 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_LONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_FLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (long double*) array5->data;
+    arg5 = (float*) array5->data;
   }
   {
-    temp6 = obj_to_array_no_conversion(obj5,PyArray_LONGDOUBLE);
+    temp6 = obj_to_array_no_conversion(obj5,PyArray_FLOAT);
     if (!temp6 || !require_contiguous(temp6)) SWIG_fail;
-    arg6 = (long double*) temp6->data;
+    arg6 = (float*) temp6->data;
   }
-  csrtodense<long double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(long double const (*))arg5,arg6);
+  csrtodense<int,float >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(float const (*))arg5,arg6);
   resultobj = SWIG_Py_Void();
   {
     if (is_new_object3 && array3) Py_DECREF(array3);
@@ -19980,8 +19986,8 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
-  npy_cfloat *arg6 ;
+  double *arg5 ;
+  double *arg6 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -20031,16 +20037,16 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_DOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (double*) array5->data;
   }
   {
-    temp6 = obj_to_array_no_conversion(obj5,PyArray_CFLOAT);
+    temp6 = obj_to_array_no_conversion(obj5,PyArray_DOUBLE);
     if (!temp6 || !require_contiguous(temp6)) SWIG_fail;
-    arg6 = (npy_cfloat*) temp6->data;
+    arg6 = (double*) temp6->data;
   }
-  csrtodense<npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,arg6);
+  csrtodense<int,double >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(double const (*))arg5,arg6);
   resultobj = SWIG_Py_Void();
   {
     if (is_new_object3 && array3) Py_DECREF(array3);
@@ -20072,8 +20078,8 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
-  npy_cdouble *arg6 ;
+  npy_cfloat *arg5 ;
+  npy_cfloat *arg6 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -20123,16 +20129,16 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cfloat*) array5->data;
   }
   {
-    temp6 = obj_to_array_no_conversion(obj5,PyArray_CDOUBLE);
+    temp6 = obj_to_array_no_conversion(obj5,PyArray_CFLOAT);
     if (!temp6 || !require_contiguous(temp6)) SWIG_fail;
-    arg6 = (npy_cdouble*) temp6->data;
+    arg6 = (npy_cfloat*) temp6->data;
   }
-  csrtodense<npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,arg6);
+  csrtodense<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,arg6);
   resultobj = SWIG_Py_Void();
   {
     if (is_new_object3 && array3) Py_DECREF(array3);
@@ -20164,8 +20170,8 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_clongdouble *arg5 ;
-  npy_clongdouble *arg6 ;
+  npy_cdouble *arg5 ;
+  npy_cdouble *arg6 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -20176,8 +20182,7 @@
   int is_new_object4 ;
   PyArrayObject *array5 = NULL ;
   int is_new_object5 ;
-  void *argp6 = 0 ;
-  int res6 = 0 ;
+  PyArrayObject *temp6 = NULL ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -20216,16 +20221,16 @@
     npy_intp size[1] = {
       -1
     };
-    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CLONGDOUBLE, &is_new_object5);
+    array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_clongdouble*) array5->data;
+    arg5 = (npy_cdouble*) array5->data;
   }
-  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_npy_clongdouble, 0 |  0 );
-  if (!SWIG_IsOK(res6)) {
-    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "csrtodense" "', argument " "6"" of type '" "npy_clongdouble []""'"); 
-  } 
-  arg6 = reinterpret_cast< npy_clongdouble * >(argp6);
-  csrtodense<npy_clongdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_clongdouble const (*))arg5,arg6);
+  {
+    temp6 = obj_to_array_no_conversion(obj5,PyArray_CDOUBLE);
+    if (!temp6 || !require_contiguous(temp6)) SWIG_fail;
+    arg6 = (npy_cdouble*) temp6->data;
+  }
+  csrtodense<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,arg6);
   resultobj = SWIG_Py_Void();
   {
     if (is_new_object3 && array3) Py_DECREF(array3);
@@ -20282,11 +20287,11 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_INT)) ? 1 : 0;
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_FLOAT)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_INT)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_csrtodense__SWIG_1(self, args);
@@ -20318,11 +20323,11 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONG)) ? 1 : 0;
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_DOUBLE)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_LONG)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_csrtodense__SWIG_2(self, args);
@@ -20354,11 +20359,11 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_LONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_FLOAT)) ? 1 : 0;
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_LONGDOUBLE)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_FLOAT)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_csrtodense__SWIG_3(self, args);
@@ -20390,11 +20395,11 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_DOUBLE)) ? 1 : 0;
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CFLOAT)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_DOUBLE)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_csrtodense__SWIG_4(self, args);
@@ -20426,11 +20431,11 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CFLOAT)) ? 1 : 0;
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CDOUBLE)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CFLOAT)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_csrtodense__SWIG_5(self, args);
@@ -20462,11 +20467,11 @@
           }
           if (_v) {
             {
-              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+              _v = (is_array(argv[4]) && PyArray_CanCastSafely(PyArray_TYPE(argv[4]),PyArray_CDOUBLE)) ? 1 : 0;
             }
             if (_v) {
               {
-                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+                _v = (is_array(argv[5]) && PyArray_CanCastSafely(PyArray_TYPE(argv[5]),PyArray_CDOUBLE)) ? 1 : 0;
               }
               if (_v) {
                 return _wrap_csrtodense__SWIG_6(self, args);
@@ -20479,7 +20484,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrtodense'.\n  Possible C/C++ prototypes are:\n    csrtodense<(float)>(int const,int const,int const [],int const [],float const [],float [])\n    csrtodense<(double)>(int const,int const,int const [],int const [],double const [],double [])\n    csrtodense<(long double)>(int const,int const,int const [],int const [],long double const [],long double [])\n    csrtodense<(npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],npy_cfloat [])\n    csrtodense<(npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],npy_cdouble [])\n    csrtodense<(npy_clongdouble)>(int const,int const,int const [],int const [],npy_clongdouble const [],npy_clongdouble [])\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrtodense'.\n  Possible C/C++ prototypes are:\n    csrtodense<(int,int)>(int const,int const,int const [],int const [],int const [],int [])\n    csrtodense<(int,long)>(int const,int const,int const [],int const [],long const [],long [])\n    csrtodense<(int,float)>(int const,int const,int const [],int const [],float const [],float [])\n    csrtodense<(int,double)>(int const,int const,int const [],int const [],double const [],double [])\n    csrtodense<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],npy_cfloat [])\n    csrtodense<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],npy_cdouble [])\n");
   return NULL;
 }
 
@@ -20488,10 +20493,10 @@
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  float *arg3 ;
+  int *arg3 ;
   std::vector<int > *arg4 = (std::vector<int > *) 0 ;
   std::vector<int > *arg5 = (std::vector<int > *) 0 ;
-  std::vector<float > *arg6 = (std::vector<float > *) 0 ;
+  std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -20500,7 +20505,7 @@
   int is_new_object3 ;
   std::vector<int > *tmp4 ;
   std::vector<int > *tmp5 ;
-  std::vector<float > *tmp6 ;
+  std::vector<int > *tmp6 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -20514,7 +20519,7 @@
     arg5 = tmp5; 
   }
   {
-    tmp6 = new std::vector<float>(); 
+    tmp6 = new std::vector<int>(); 
     arg6 = tmp6; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOO:densetocsr",&obj0,&obj1,&obj2)) SWIG_fail;
@@ -20532,11 +20537,11 @@
     npy_intp size[2] = {
       -1,-1
     };
-    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_FLOAT, &is_new_object3);
+    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_INT, &is_new_object3);
     if (!array3 || !require_dimensions(array3,2) || !require_size(array3,size,1)) SWIG_fail;
-    arg3 = (float*) array3->data;
+    arg3 = (int*) array3->data;
   }
-  densetocsr<float >(arg1,arg2,(float const (*))arg3,arg4,arg5,arg6);
+  densetocsr<int,int >(arg1,arg2,(int const (*))arg3,arg4,arg5,arg6);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg4)->size(); 
@@ -20554,8 +20559,8 @@
   }
   {
     int length = (arg6)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(float)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(int)*length);	 
     delete arg6; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -20575,10 +20580,10 @@
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  double *arg3 ;
+  long *arg3 ;
   std::vector<int > *arg4 = (std::vector<int > *) 0 ;
   std::vector<int > *arg5 = (std::vector<int > *) 0 ;
-  std::vector<double > *arg6 = (std::vector<double > *) 0 ;
+  std::vector<long > *arg6 = (std::vector<long > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -20587,7 +20592,7 @@
   int is_new_object3 ;
   std::vector<int > *tmp4 ;
   std::vector<int > *tmp5 ;
-  std::vector<double > *tmp6 ;
+  std::vector<long > *tmp6 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -20601,7 +20606,7 @@
     arg5 = tmp5; 
   }
   {
-    tmp6 = new std::vector<double>(); 
+    tmp6 = new std::vector<long>(); 
     arg6 = tmp6; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOO:densetocsr",&obj0,&obj1,&obj2)) SWIG_fail;
@@ -20619,11 +20624,11 @@
     npy_intp size[2] = {
       -1,-1
     };
-    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_DOUBLE, &is_new_object3);
+    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_LONG, &is_new_object3);
     if (!array3 || !require_dimensions(array3,2) || !require_size(array3,size,1)) SWIG_fail;
-    arg3 = (double*) array3->data;
+    arg3 = (long*) array3->data;
   }
-  densetocsr<double >(arg1,arg2,(double const (*))arg3,arg4,arg5,arg6);
+  densetocsr<int,long >(arg1,arg2,(long const (*))arg3,arg4,arg5,arg6);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg4)->size(); 
@@ -20641,8 +20646,8 @@
   }
   {
     int length = (arg6)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONG); 
+    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(long)*length);	 
     delete arg6; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -20662,10 +20667,10 @@
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  long double *arg3 ;
+  float *arg3 ;
   std::vector<int > *arg4 = (std::vector<int > *) 0 ;
   std::vector<int > *arg5 = (std::vector<int > *) 0 ;
-  std::vector<long double > *arg6 = (std::vector<long double > *) 0 ;
+  std::vector<float > *arg6 = (std::vector<float > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -20674,7 +20679,7 @@
   int is_new_object3 ;
   std::vector<int > *tmp4 ;
   std::vector<int > *tmp5 ;
-  std::vector<long double > *tmp6 ;
+  std::vector<float > *tmp6 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -20688,7 +20693,7 @@
     arg5 = tmp5; 
   }
   {
-    tmp6 = new std::vector<long double>(); 
+    tmp6 = new std::vector<float>(); 
     arg6 = tmp6; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOO:densetocsr",&obj0,&obj1,&obj2)) SWIG_fail;
@@ -20706,11 +20711,11 @@
     npy_intp size[2] = {
       -1,-1
     };
-    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_LONGDOUBLE, &is_new_object3);
+    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_FLOAT, &is_new_object3);
     if (!array3 || !require_dimensions(array3,2) || !require_size(array3,size,1)) SWIG_fail;
-    arg3 = (long double*) array3->data;
+    arg3 = (float*) array3->data;
   }
-  densetocsr<long double >(arg1,arg2,(long double const (*))arg3,arg4,arg5,arg6);
+  densetocsr<int,float >(arg1,arg2,(float const (*))arg3,arg4,arg5,arg6);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg4)->size(); 
@@ -20728,8 +20733,8 @@
   }
   {
     int length = (arg6)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_LONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(long double)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_FLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(float)*length);	 
     delete arg6; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -20749,10 +20754,10 @@
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  npy_cfloat *arg3 ;
+  double *arg3 ;
   std::vector<int > *arg4 = (std::vector<int > *) 0 ;
   std::vector<int > *arg5 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg6 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<double > *arg6 = (std::vector<double > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -20761,7 +20766,7 @@
   int is_new_object3 ;
   std::vector<int > *tmp4 ;
   std::vector<int > *tmp5 ;
-  std::vector<npy_cfloat > *tmp6 ;
+  std::vector<double > *tmp6 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -20775,7 +20780,7 @@
     arg5 = tmp5; 
   }
   {
-    tmp6 = new std::vector<npy_cfloat>(); 
+    tmp6 = new std::vector<double>(); 
     arg6 = tmp6; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOO:densetocsr",&obj0,&obj1,&obj2)) SWIG_fail;
@@ -20793,11 +20798,11 @@
     npy_intp size[2] = {
       -1,-1
     };
-    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_CFLOAT, &is_new_object3);
+    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_DOUBLE, &is_new_object3);
     if (!array3 || !require_dimensions(array3,2) || !require_size(array3,size,1)) SWIG_fail;
-    arg3 = (npy_cfloat*) array3->data;
+    arg3 = (double*) array3->data;
   }
-  densetocsr<npy_cfloat >(arg1,arg2,(npy_cfloat const (*))arg3,arg4,arg5,arg6);
+  densetocsr<int,double >(arg1,arg2,(double const (*))arg3,arg4,arg5,arg6);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg4)->size(); 
@@ -20815,8 +20820,8 @@
   }
   {
     int length = (arg6)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(npy_cfloat)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_DOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(double)*length);	 
     delete arg6; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -20836,10 +20841,10 @@
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  npy_cdouble *arg3 ;
+  npy_cfloat *arg3 ;
   std::vector<int > *arg4 = (std::vector<int > *) 0 ;
   std::vector<int > *arg5 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg6 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cfloat > *arg6 = (std::vector<npy_cfloat > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -20848,7 +20853,7 @@
   int is_new_object3 ;
   std::vector<int > *tmp4 ;
   std::vector<int > *tmp5 ;
-  std::vector<npy_cdouble > *tmp6 ;
+  std::vector<npy_cfloat > *tmp6 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -20862,7 +20867,7 @@
     arg5 = tmp5; 
   }
   {
-    tmp6 = new std::vector<npy_cdouble>(); 
+    tmp6 = new std::vector<npy_cfloat>(); 
     arg6 = tmp6; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOO:densetocsr",&obj0,&obj1,&obj2)) SWIG_fail;
@@ -20880,11 +20885,11 @@
     npy_intp size[2] = {
       -1,-1
     };
-    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_CDOUBLE, &is_new_object3);
+    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_CFLOAT, &is_new_object3);
     if (!array3 || !require_dimensions(array3,2) || !require_size(array3,size,1)) SWIG_fail;
-    arg3 = (npy_cdouble*) array3->data;
+    arg3 = (npy_cfloat*) array3->data;
   }
-  densetocsr<npy_cdouble >(arg1,arg2,(npy_cdouble const (*))arg3,arg4,arg5,arg6);
+  densetocsr<int,npy_cfloat >(arg1,arg2,(npy_cfloat const (*))arg3,arg4,arg5,arg6);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg4)->size(); 
@@ -20902,8 +20907,8 @@
   }
   {
     int length = (arg6)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(npy_cdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(npy_cfloat)*length);	 
     delete arg6; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -20923,19 +20928,19 @@
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  npy_clongdouble *arg3 ;
+  npy_cdouble *arg3 ;
   std::vector<int > *arg4 = (std::vector<int > *) 0 ;
   std::vector<int > *arg5 = (std::vector<int > *) 0 ;
-  std::vector<npy_clongdouble > *arg6 = (std::vector<npy_clongdouble > *) 0 ;
+  std::vector<npy_cdouble > *arg6 = (std::vector<npy_cdouble > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
   int ecode2 = 0 ;
-  void *argp3 = 0 ;
-  int res3 = 0 ;
+  PyArrayObject *array3 = NULL ;
+  int is_new_object3 ;
   std::vector<int > *tmp4 ;
   std::vector<int > *tmp5 ;
-  std::vector<npy_clongdouble > *tmp6 ;
+  std::vector<npy_cdouble > *tmp6 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -20949,7 +20954,7 @@
     arg5 = tmp5; 
   }
   {
-    tmp6 = new std::vector<npy_clongdouble>(); 
+    tmp6 = new std::vector<npy_cdouble>(); 
     arg6 = tmp6; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOO:densetocsr",&obj0,&obj1,&obj2)) SWIG_fail;
@@ -20963,12 +20968,15 @@
     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "densetocsr" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
-  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_npy_clongdouble, 0 |  0 );
-  if (!SWIG_IsOK(res3)) {
-    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "densetocsr" "', argument " "3"" of type '" "npy_clongdouble const []""'"); 
-  } 
-  arg3 = reinterpret_cast< npy_clongdouble * >(argp3);
-  densetocsr<npy_clongdouble >(arg1,arg2,(npy_clongdouble const (*))arg3,arg4,arg5,arg6);
+  {
+    npy_intp size[2] = {
+      -1,-1
+    };
+    array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_CDOUBLE, &is_new_object3);
+    if (!array3 || !require_dimensions(array3,2) || !require_size(array3,size,1)) SWIG_fail;
+    arg3 = (npy_cdouble*) array3->data;
+  }
+  densetocsr<int,npy_cdouble >(arg1,arg2,(npy_cdouble const (*))arg3,arg4,arg5,arg6);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg4)->size(); 
@@ -20986,13 +20994,19 @@
   }
   {
     int length = (arg6)->size(); 
-    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CLONGDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(npy_clongdouble)*length);	 
+    PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(npy_cdouble)*length);	 
     delete arg6; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
+  {
+    if (is_new_object3 && array3) Py_DECREF(array3);
+  }
   return resultobj;
 fail:
+  {
+    if (is_new_object3 && array3) Py_DECREF(array3);
+  }
   return NULL;
 }
 
@@ -21020,7 +21034,7 @@
       }
       if (_v) {
         {
-          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_FLOAT)) ? 1 : 0;
+          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
         }
         if (_v) {
           return _wrap_densetocsr__SWIG_1(self, args);
@@ -21041,7 +21055,7 @@
       }
       if (_v) {
         {
-          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_DOUBLE)) ? 1 : 0;
+          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_LONG)) ? 1 : 0;
         }
         if (_v) {
           return _wrap_densetocsr__SWIG_2(self, args);
@@ -21062,7 +21076,7 @@
       }
       if (_v) {
         {
-          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_LONGDOUBLE)) ? 1 : 0;
+          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_FLOAT)) ? 1 : 0;
         }
         if (_v) {
           return _wrap_densetocsr__SWIG_3(self, args);
@@ -21083,7 +21097,7 @@
       }
       if (_v) {
         {
-          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_CFLOAT)) ? 1 : 0;
+          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_DOUBLE)) ? 1 : 0;
         }
         if (_v) {
           return _wrap_densetocsr__SWIG_4(self, args);
@@ -21104,7 +21118,7 @@
       }
       if (_v) {
         {
-          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_CDOUBLE)) ? 1 : 0;
+          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_CFLOAT)) ? 1 : 0;
         }
         if (_v) {
           return _wrap_densetocsr__SWIG_5(self, args);
@@ -21125,7 +21139,7 @@
       }
       if (_v) {
         {
-          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_CLONGDOUBLE)) ? 1 : 0;
+          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_CDOUBLE)) ? 1 : 0;
         }
         if (_v) {
           return _wrap_densetocsr__SWIG_6(self, args);
@@ -21135,7 +21149,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'densetocsr'.\n  Possible C/C++ prototypes are:\n    densetocsr<(float)>(int const,int const,float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    densetocsr<(double)>(int const,int const,double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    densetocsr<(long double)>(int const,int const,long double const [],std::vector<int > *,std::vector<int > *,std::vector<long double > *)\n    densetocsr<(npy_cfloat)>(int const,int const,npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    densetocsr<(npy_cdouble)>(int const,int const,npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n    densetocsr<(npy_clongdouble)>(int const,int const,npy_clongdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_clongdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'densetocsr'.\n  Possible C/C++ prototypes are:\n    densetocsr<(int,int)>(int const,int const,int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    densetocsr<(int,long)>(int const,int const,long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    densetocsr<(int,float)>(int const,int const,float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    densetocsr<(int,double)>(int const,int const,double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    densetocsr<(int,npy_cfloat)>(int const,int const,npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    densetocsr<(int,npy_cdouble)>(int const,int const,npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
   return NULL;
 }
 
@@ -21144,8 +21158,8 @@
 	 { (char *)"csrtocsc", _wrap_csrtocsc, METH_VARARGS, NULL},
 	 { (char *)"csctocsr", _wrap_csctocsr, METH_VARARGS, NULL},
 	 { (char *)"csrtocoo", _wrap_csrtocoo, METH_VARARGS, NULL},
+	 { (char *)"csctocoo", _wrap_csctocoo, METH_VARARGS, NULL},
 	 { (char *)"cootocsr", _wrap_cootocsr, METH_VARARGS, NULL},
-	 { (char *)"csctocoo", _wrap_csctocoo, METH_VARARGS, NULL},
 	 { (char *)"cootocsc", _wrap_cootocsc, METH_VARARGS, NULL},
 	 { (char *)"csrplcsr", _wrap_csrplcsr, METH_VARARGS, NULL},
 	 { (char *)"cscplcsc", _wrap_cscplcsc, METH_VARARGS, NULL},
@@ -21165,47 +21179,39 @@
 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
 
 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_npy_clongdouble = {"_p_npy_clongdouble", "npy_clongdouble *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__vectorTdouble_t = {"_p_std__vectorTdouble_t", "std::vector<double > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__vectorTfloat_t = {"_p_std__vectorTfloat_t", "std::vector<float > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__vectorTint_t = {"_p_std__vectorTint_t", "std::vector<int > *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_std__vectorTlong_double_t = {"_p_std__vectorTlong_double_t", "std::vector<long double > *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_std__vectorTlong_t = {"_p_std__vectorTlong_t", "std::vector<long > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__vectorTnpy_cdouble_t = {"_p_std__vectorTnpy_cdouble_t", "std::vector<npy_cdouble > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__vectorTnpy_cfloat_t = {"_p_std__vectorTnpy_cfloat_t", "std::vector<npy_cfloat > *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_std__vectorTnpy_clongdouble_t = {"_p_std__vectorTnpy_clongdouble_t", "std::vector<npy_clongdouble > *", 0, 0, (void*)0, 0};
 
 static swig_type_info *swig_type_initial[] = {
   &_swigt__p_char,
-  &_swigt__p_npy_clongdouble,
   &_swigt__p_std__vectorTdouble_t,
   &_swigt__p_std__vectorTfloat_t,
   &_swigt__p_std__vectorTint_t,
-  &_swigt__p_std__vectorTlong_double_t,
+  &_swigt__p_std__vectorTlong_t,
   &_swigt__p_std__vectorTnpy_cdouble_t,
   &_swigt__p_std__vectorTnpy_cfloat_t,
-  &_swigt__p_std__vectorTnpy_clongdouble_t,
 };
 
 static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_npy_clongdouble[] = {  {&_swigt__p_npy_clongdouble, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__vectorTdouble_t[] = {  {&_swigt__p_std__vectorTdouble_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__vectorTfloat_t[] = {  {&_swigt__p_std__vectorTfloat_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__vectorTint_t[] = {  {&_swigt__p_std__vectorTint_t, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_std__vectorTlong_double_t[] = {  {&_swigt__p_std__vectorTlong_double_t, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_std__vectorTlong_t[] = {  {&_swigt__p_std__vectorTlong_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__vectorTnpy_cdouble_t[] = {  {&_swigt__p_std__vectorTnpy_cdouble_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__vectorTnpy_cfloat_t[] = {  {&_swigt__p_std__vectorTnpy_cfloat_t, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_std__vectorTnpy_clongdouble_t[] = {  {&_swigt__p_std__vectorTnpy_clongdouble_t, 0, 0, 0},{0, 0, 0, 0}};
 
 static swig_cast_info *swig_cast_initial[] = {
   _swigc__p_char,
-  _swigc__p_npy_clongdouble,
   _swigc__p_std__vectorTdouble_t,
   _swigc__p_std__vectorTfloat_t,
   _swigc__p_std__vectorTint_t,
-  _swigc__p_std__vectorTlong_double_t,
+  _swigc__p_std__vectorTlong_t,
   _swigc__p_std__vectorTnpy_cdouble_t,
   _swigc__p_std__vectorTnpy_cfloat_t,
-  _swigc__p_std__vectorTnpy_clongdouble_t,
 };
 
 




More information about the Scipy-svn mailing list