[Scipy-svn] r3163 - in trunk/Lib/sparse: . sparsetools tests

scipy-svn@scip... scipy-svn@scip...
Fri Jul 13 04:23:06 CDT 2007


Author: wnbell
Date: 2007-07-13 04:22:29 -0500 (Fri, 13 Jul 2007)
New Revision: 3163

Modified:
   trunk/Lib/sparse/sparse.py
   trunk/Lib/sparse/sparsetools/complex_ops.h
   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
   trunk/Lib/sparse/tests/test_sparse.py
Log:
added __div__ and __sub__ to sparse matrices



Modified: trunk/Lib/sparse/sparse.py
===================================================================
--- trunk/Lib/sparse/sparse.py	2007-07-12 08:15:53 UTC (rev 3162)
+++ trunk/Lib/sparse/sparse.py	2007-07-13 09:22:29 UTC (rev 3163)
@@ -11,9 +11,13 @@
                   less, where, greater, array, transpose, empty, ones, \
                   arange, shape, intc
 import numpy
-from scipy.sparse.sparsetools import densetocsr, csrtocsc, csrtodense, \
-     cscplcsc, cscelmulcsc, cscmux, csrmux, csrmucsr, csrtocoo, cootocsc, \
-     cootocsr, cscmucsc, csctocoo, csctocsr, csrplcsr, csrelmulcsr
+from scipy.sparse.sparsetools import cscmux, csrmux, \
+     cootocsr, csrtocoo, cootocsc, csctocoo, csctocsr, csrtocsc, \
+     densetocsr, csrtodense, \
+     csrmucsr, cscmucsc, \
+     csr_plus_csr, csc_plus_csc, csr_minus_csr, csc_minus_csc, \
+     csr_elmul_csr, csc_elmul_csc, csr_eldiv_csr, csc_eldiv_csc 
+
 import sparsetools
 import itertools, operator, copy
 from bisect import bisect_left
@@ -214,14 +218,12 @@
         if isscalarlike(other):
             return self * (1./other)
         else:
-            raise NotImplementedError, "sparse matrix division not yet supported"
+            csc = self.tocsc()
+            return csc.__truediv__(other)
 
     def __div__(self, other):
         # Always do true division
-        if isscalarlike(other):
-            return self * (1./other)
-        else:
-            raise NotImplementedError, "sparse matrix division not yet supported"
+        return self.__truediv__(other)
 
     def __pow__(self, other):
         csc = self.tocsc()
@@ -485,30 +487,43 @@
     def __abs__(self):
         return self.__class__((abs(self.data),self.indices.copy(),self.indptr.copy()), \
                                 dims=self.shape,dtype=self.dtype,check=False)
-               
-    def __add__(self, other, fn):
+    
+    def __binopt__(self, other, fn, in_shape=None, out_shape=None):
+        """apply the binary operation fn to two sparse matrices"""
+        other = self._tothis(other)
+
+        if in_shape is None:
+            in_shape = self.shape
+        if out_shape is None:
+            out_shape = self.shape
+            
+        indptr, ind, data = fn(in_shape[0], in_shape[1], \
+                               self.indptr, self.indices, self.data, 
+                               other.indptr, other.indices, other.data)
+        return self.__class__((data, ind, indptr), dims=out_shape, check=False)
+            
+    def __addsub__(self, other, fn):
         # First check if argument is a scalar
         if isscalarlike(other):
             # Now we would add this scalar to every element.
             raise NotImplementedError, 'adding a scalar to a CSC or CSR ' \
                   'matrix is not supported'
         elif isspmatrix(other):
-            other = other.tocsc()
             if (other.shape != self.shape):
                 raise ValueError, "inconsistent shapes"
-            other = self._tothis(other)
-            indptr, ind, data = fn(self.shape[0], self.shape[1], \
-                                         self.indptr, self.indices, \
-                                         self.data, other.indptr, \
-                                         other.indices, other.data)
-            return self.__class__((data, ind, indptr), self.shape, check=False)
+            return self.__binopt__(other,fn)
         elif isdense(other):
             # Convert this matrix to a dense matrix and add them
             return other + self.todense()
         else:
-            raise TypeError, "unsupported type for sparse matrix addition"
-
-
+            raise TypeError, "unsupported type for sparse matrix arithmetic"
+        
+    def __add__(self,other,fn):
+        return self.__addsub__(other,fn)
+   
+    def __sub__(self,other,fn):
+        return self.__addsub__(other,fn)
+    
     def __mul__(self, other): # self * other 
         """ Scalar, vector, or matrix multiplication
         """
@@ -536,6 +551,19 @@
         new.data *= -1
         return new
 
+
+    def __truediv__(self,other,fn):
+        if isscalarlike(other):
+            return self * (1./other)
+        elif isspmatrix(other):
+            other = self._tothis(other)
+            if (other.shape != self.shape):
+                raise ValueError, "inconsistent shapes"
+            return self.__binopt__(other,fn)
+        else:
+            raise TypeError, "unsupported type for sparse matrix power"
+
+
     def __pow__(self, other, fn):
         """ Element-by-element power (unless other is a scalar, in which
         case return the matrix power.)
@@ -543,16 +571,8 @@
         if isscalarlike(other):
             return self.__class__((self.data ** other, self.indices.copy(), self.indptr.copy()), \
                                     dims=self.shape, check=False)
-        
         elif isspmatrix(other):
-            other = self._tothis(other)
-            if (other.shape != self.shape):
-                raise ValueError, "inconsistent shapes"
-            indptr, ind, data = fn(self.shape[0], self.shape[1], \
-                                               self.indptr, self.indices, \
-                                               self.data, other.indptr, \
-                                               other.indices, other.data)
-            return self.__class__((data, ind, indptr), self.shape, check=False)
+            return self.__binopt__(other,fn)
         else:
             raise TypeError, "unsupported type for sparse matrix power"
 
@@ -564,10 +584,7 @@
             if (K1 != K2):
                 raise ValueError, "shape mismatch error"
             other = self._tothis(other)
-            indptr, ind, data = fn(M, N, self.indptr, self.indices, \
-                                   self.data, other.indptr, \
-                                   other.indices, other.data)
-            return self.__class__((data, ind, indptr), (M, N), check=False)      
+            return self.__binopt__(other,fn,in_shape=(M,N),out_shape=(M,N))
         elif isdense(other):
             # This is SLOW!  We need a more efficient implementation
             # of sparse * dense matrix multiplication!
@@ -871,35 +888,24 @@
             return _cs_matrix.__getattr__(self, attr)
 
     
-    def __radd__(self, other):
-        """ Function supporting the operation: self + other.
-        """
-        if isscalarlike(other):
-            raise NotImplementedError, 'adding a scalar to a CSC matrix is ' \
-                    'not supported'
-        elif isspmatrix(other):
-            ocs = other.tocsc()
-            if (ocs.shape != self.shape):
-                raise ValueError, "inconsistent shapes"
-            indptr, rowind, data = cscplcsc(self.shape[0], self.shape[1], \
-                                            self.indptr, self.indices, \
-                                            self.data, ocs.indptr, \
-                                            ocs.indices, ocs.data)
-            return csc_matrix((data, rowind, indptr), self.shape, check=False)
-        elif isdense(other):
-            # Convert this matrix to a dense matrix and add them.
-            return self.todense() + other
-        else:
-            raise TypeError, "unsupported type for sparse matrix addition"
-
     def __add__(self, other):
-        return _cs_matrix.__add__(self, other, cscplcsc)
+        return _cs_matrix.__add__(self, other, csc_plus_csc)
+   
+    def __radd__(self,other):
+        return self.__add__(other)
+    
+    def __sub__(self, other):
+        return _cs_matrix.__sub__(self, other, csc_minus_csc)
 
+    def __rsub__(self,other):
+        return self.__sub__(other)
+
+    def __truediv__(self,other):
+        return _cs_matrix.__truediv__(self,other, csc_eldiv_csc)
+    
     def __pow__(self, other):
-        return _cs_matrix.__pow__(self, other, cscelmulcsc)
-    
+        return _cs_matrix.__pow__(self, other, csc_elmul_csc)
 
-
     def transpose(self, copy=False):
         return _cs_matrix._transpose(self, csr_matrix, copy)
 
@@ -1231,10 +1237,22 @@
             return _cs_matrix.__getattr__(self, attr)
     
     def __add__(self, other):
-        return _cs_matrix.__add__(self, other, csrplcsr)
+        return _cs_matrix.__add__(self, other, csr_plus_csr)
+   
+    def __radd__(self,other):
+        return self.__add__(other)
+    
+    def __sub__(self, other):
+        return _cs_matrix.__sub__(self, other, csr_minus_csr)
+    
+    def __rsub__(self,other):
+        return self.__sub__(other)
 
+    def __truediv__(self,other):
+        return _cs_matrix.__truediv__(self,other, csr_eldiv_csr)
+
     def __pow__(self, other):
-        return _cs_matrix.__pow__(self, other, csrelmulcsr)
+        return _cs_matrix.__pow__(self, other, csr_elmul_csr)
 
     def transpose(self, copy=False):
         return _cs_matrix._transpose(self, csc_matrix, copy)

Modified: trunk/Lib/sparse/sparsetools/complex_ops.h
===================================================================
--- trunk/Lib/sparse/sparsetools/complex_ops.h	2007-07-12 08:15:53 UTC (rev 3162)
+++ trunk/Lib/sparse/sparsetools/complex_ops.h	2007-07-13 09:22:29 UTC (rev 3163)
@@ -46,7 +46,48 @@
   return A;
 }
 
+
+
 /*
+ * Subtraction
+ */
+inline npy_cfloat operator-(const npy_cfloat& A, const npy_cfloat& B){
+  npy_cfloat result;
+  result.real = A.real - B.real;
+  result.imag = A.imag - B.imag;
+  return result;
+}
+inline npy_cdouble operator-(const npy_cdouble& A, const npy_cdouble& B){
+  npy_cdouble result;
+  result.real = A.real - B.real;
+  result.imag = A.imag - B.imag;
+  return result;
+}
+inline npy_clongdouble operator-(const npy_clongdouble& A, const npy_clongdouble& B){
+  npy_clongdouble result;
+  result.real = A.real - B.real;
+  result.imag = A.imag - B.imag;
+  return result;
+}
+
+inline npy_cfloat& operator-=(npy_cfloat& A, const npy_cfloat& B){
+  A.real -= B.real;
+  A.imag -= B.imag;
+  return A;
+}
+inline npy_cdouble& operator-=(npy_cdouble& A, const npy_cdouble& B){
+  A.real -= B.real;
+  A.imag -= B.imag;
+  return A;
+}
+inline npy_clongdouble& operator-=(npy_clongdouble& A, const npy_clongdouble& B){
+  A.real -= B.real;
+  A.imag -= B.imag;
+  return A;
+}
+
+
+/*
  * Multiplication
  */
 inline npy_cfloat operator*(const npy_cfloat& A, const npy_cfloat& B){
@@ -87,7 +128,46 @@
   return A;
 }
 
+
 /*
+ * Division
+ */
+inline npy_cfloat operator/(const npy_cfloat& A, const npy_cfloat& B){
+  npy_cfloat result;
+  npy_float denom = 1.0 / (B.real * B.real + B.imag * B.imag);
+  result.real = (A.real * B.real + A.imag * B.imag) * denom;
+  result.imag = (A.real * B.imag - A.imag * B.real) * denom;
+  return result;
+}
+inline npy_cdouble operator/(const npy_cdouble& A, const npy_cdouble& B){
+  npy_cdouble result;
+  npy_double denom = 1.0 / (B.real * B.real + B.imag * B.imag);
+  result.real = (A.real * B.real + A.imag * B.imag) * denom;
+  result.imag = (A.real * B.imag - A.imag * B.real) * denom;
+  return result;
+}
+inline npy_clongdouble operator/(const npy_clongdouble& A, const npy_clongdouble& B){
+  npy_clongdouble result;
+  npy_longdouble denom = 1.0 / (B.real * B.real + B.imag * B.imag);
+  result.real = (A.real * B.real + A.imag * B.imag) * denom;
+  result.imag = (A.real * B.imag - A.imag * B.real) * denom;
+  return result;
+}
+
+inline npy_cfloat& operator/=(npy_cfloat& A, const npy_cfloat& B){
+  A = A*B;
+  return A;
+}
+inline npy_cdouble& operator/=(npy_cdouble& A, const npy_cdouble& B){
+  A = A*B;
+  return A;
+}
+inline npy_clongdouble& operator/=(npy_clongdouble& A, const npy_clongdouble& B){
+  A = A*B;
+  return A;
+}
+
+/*
  * Equality (complex==complex)
  */
 inline bool operator==(const npy_cfloat& A, const npy_cfloat& B){

Modified: trunk/Lib/sparse/sparsetools/sparsetools.h
===================================================================
--- trunk/Lib/sparse/sparsetools/sparsetools.h	2007-07-12 08:15:53 UTC (rev 3162)
+++ trunk/Lib/sparse/sparsetools/sparsetools.h	2007-07-13 09:22:29 UTC (rev 3163)
@@ -39,6 +39,9 @@
 
 
 
+
+
+
 /*
  * Compute B = A for CSR matrix A, CSC matrix B
  *
@@ -81,9 +84,9 @@
 {  
   I NNZ = Ap[n_row];
   
-  *Bp = std::vector<I>(n_col+1);
-  *Bi = std::vector<I>(NNZ);
-  *Bx = std::vector<T>(NNZ);
+  Bp->resize(n_col+1);
+  Bi->resize(NNZ);
+  Bx->resize(NNZ);
  
   std::vector<I> nnz_per_col(n_col,0); //temp array
  
@@ -223,7 +226,7 @@
       	      std::vector<I>* Cj,
       	      std::vector<T>* Cx)
 {
-  *Cp = std::vector<I>(n_row+1,0);
+  Cp->resize(n_row+1,0);
   
   const T zero = ZERO<T>();
 
@@ -270,104 +273,11 @@
 
 
 /*
- * Compute C = A+B for CSR matrices A,B
+ * Compute C = A (bin_op) B for CSR matrices A,B
  *
+ *   (bin_op) - binary operator to apply elementwise
  *
- * Input Arguments:
- *   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<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
- *
- * Note: 
- *   Input:  A and B column indices *are not* assumed to be in sorted order 
- *   Output: C column indices *are not* assumed to be in sorted order
- *           Cx will not contain any zero entries
- *
- */
-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<I>(n_row+1,0);
-  
-  const T zero = ZERO<T>();
-
-  std::vector<I> index(n_col,-1);
-  std::vector<T>  sums(n_col,zero);
-
-  for(I i = 0; i < n_row; i++){
-    I istart = -2;
-    I length =  0;
-    
-    //add a row of A to sums
-    for(I jj = Ap[i]; jj < Ap[i+1]; jj++){
-      I j = Aj[jj];
-      sums[j] += Ax[jj];
-              
-      if(index[j] == -1){
-	    index[j] = istart;                        
-	    istart = j;
-	    length++;
-      }
-    }
-    
-    //add a row of B to sums
-    for(I jj = Bp[i]; jj < Bp[i+1]; jj++){
-      I j = Bj[jj];
-      sums[j] += Bx[jj];
-
-      if(index[j] == -1){
-	    index[j] = istart;                        
-	    istart = j;
-	    length++;
-      }
-    }
-
-
-    for(I jj = 0; jj < length; jj++){
-      if(sums[istart] != zero){
-	    Cj->push_back(istart);
-	    Cx->push_back(sums[istart]);
-      }
-      
-      I temp = istart;                
-      istart = index[istart];
-      
-      index[temp] = -1;
-      sums[temp]  = zero;                              
-    }
-    
-    (*Cp)[i+1] = Cx->size();
-  }
-}
-
-/*
- * Compute C = A (elmul) B for CSR matrices A,B
- *
- *   (elmul) - elementwise multiplication
- *
  * Input Arguments:
  *   I    n_row       - number of rows in A (and B)
  *   I    n_col       - number of columns in A (and B)
@@ -391,10 +301,10 @@
  *           Cx will not contain any zero entries
  *
  */
-template <class I, class T>
-void csrelmulcsr(const I n_row,
+template <class I, class T, class bin_op>
+void csr_binop_csr(const I n_row,
                  const I n_col, 
-                 const I Ap [], 
+                 const I Ap[], 
                  const I Aj[], 
                  const T Ax[],
                  const I Bp[],
@@ -402,9 +312,10 @@
                  const T Bx[],
                  std::vector<I>* Cp,
                  std::vector<I>* Cj,
-                 std::vector<T>* Cx)
+                 std::vector<T>* Cx,
+                 const bin_op& op)
 {
-  *Cp = std::vector<I>(n_row+1,0);
+  Cp->resize(n_row+1,0);
   
   const T zero = ZERO<T>();
 
@@ -444,11 +355,11 @@
 
 
     for(I jj = 0; jj < length; jj++){
-      T prod = A_row[istart] * B_row[istart];
+      T result = op(A_row[istart],B_row[istart]);
       
-      if(prod != zero){
+      if(result != zero){
 	    Cj->push_back(istart);
-	    Cx->push_back(prod);
+	    Cx->push_back(result);
       }
       
       I temp = istart;                
@@ -463,7 +374,47 @@
   }
 }
 
+/* element-wise binary operations*/
+template <class I, class T>
+void csr_elmul_csr(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)
+{
+    csr_binop_csr(n_row,n_col,Ap,Aj,Ax,Bp,Bj,Bx,Cp,Cj,Cx,std::multiplies<T>());
+}
 
+template <class I, class T>
+void csr_eldiv_csr(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)
+{
+    csr_binop_csr(n_row,n_col,Ap,Aj,Ax,Bp,Bj,Bx,Cp,Cj,Cx,std::divides<T>());
+}
+
+
+template <class I, class T>
+void csr_plus_csr(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)
+{
+    csr_binop_csr(n_row,n_col,Ap,Aj,Ax,Bp,Bj,Bx,Cp,Cj,Cx,std::plus<T>());
+}
+
+template <class I, class T>
+void csr_minus_csr(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)
+{
+    csr_binop_csr(n_row,n_col,Ap,Aj,Ax,Bp,Bj,Bx,Cp,Cj,Cx,std::minus<T>());
+}
+
+
+
+
 /*
  * Compute B = A for COO matrix A, CSR matrix B
  *
@@ -536,10 +487,10 @@
   //use (tempB + 0) to sum duplicates
   std::vector<I> Xp(n_row+1,0); //row pointer for an empty matrix
 
-  csrplcsr<I,T>(n_row,n_col,
-                &tempBp[0],&tempBj[0],&tempBx[0],
-                &Xp[0],NULL,NULL,
-                Bp,Bj,Bx);    	   
+  csr_plus_csr<I,T>(n_row,n_col,
+                    &tempBp[0],&tempBj[0],&tempBx[0],
+                    &Xp[0],NULL,NULL,
+                    Bp,Bj,Bx);    	   
 }
 	    
 
@@ -578,7 +529,7 @@
 {
   const T zero = ZERO<T>();
 
-  *Yx = std::vector<T>(n_row,zero);
+  Yx->resize(n_row,zero);
 
   for(I i = 0; i < n_row; i++){
     I row_start = Ap[i];
@@ -626,7 +577,7 @@
 {
   const T zero = ZERO<T>();
 
-  *Yx = std::vector<T>(n_row,zero);
+  Yx->resize(n_row,zero);
   
   for(I j = 0; j < n_col; j++){
     I col_start = Ap[j];
@@ -865,34 +816,6 @@
               std::vector<T>* Cx)
 { csrmucsr<I,T>(n_col,n_row,Bp,Bi,Bx,Ap,Ai,Ax,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 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 I, class T>
 void cootocsc(const I n_row,
       	      const I n_col,
@@ -905,6 +828,49 @@
       	      std::vector<T>* Bx)
 { cootocsr<I,T>(n_col,n_row,NNZ,Aj,Ai,Ax,Bp,Bi,Bx); }
 
+
+
+template <class I, class T>
+void csc_elmul_csc(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)
+{
+    csr_elmul_csr(n_col,n_row,Ap,Ai,Ax,Bp,Bi,Bx,Cp,Ci,Cx);
+}
+
+template <class I, class T>
+void csc_eldiv_csc(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)
+{
+    csr_eldiv_csr(n_col,n_row,Ap,Ai,Ax,Bp,Bi,Bx,Cp,Ci,Cx);
+}
+
+
+template <class I, class T>
+void csc_plus_csc(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)
+{
+    csr_plus_csr(n_col,n_row,Ap,Ai,Ax,Bp,Bi,Bx,Cp,Ci,Cx);
+}
+
+template <class I, class T>
+void csc_minus_csc(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)
+{
+    csr_minus_csr(n_col,n_row,Ap,Ai,Ax,Bp,Bi,Bx,Cp,Ci,Cx);
+}
+
+
+
+
+
 template<class I, class T>
 void sort_csc_indices(const I n_row,
                       const I n_col,

Modified: trunk/Lib/sparse/sparsetools/sparsetools.i
===================================================================
--- trunk/Lib/sparse/sparsetools/sparsetools.i	2007-07-12 08:15:53 UTC (rev 3162)
+++ trunk/Lib/sparse/sparsetools/sparsetools.i	2007-07-13 09:22:29 UTC (rev 3163)
@@ -192,11 +192,6 @@
 INSTANTIATE_ALL(cootocsr)
 INSTANTIATE_ALL(cootocsc)
 
-/*
- * CSR+CSR and CSC+CSC
- */
-INSTANTIATE_ALL(csrplcsr)
-INSTANTIATE_ALL(cscplcsc)
 
 /*
  * CSR*CSR and CSC*CSC
@@ -211,12 +206,20 @@
 INSTANTIATE_ALL(cscmux)
 
 /*
- * CSR(elmul)CSR and CSC(elmul)CSC
+ * CSR (binary op) CSR and CSC (binary op) CSC
  */
-INSTANTIATE_ALL(csrelmulcsr)
-INSTANTIATE_ALL(cscelmulcsc)
+INSTANTIATE_ALL(csr_elmul_csr)
+INSTANTIATE_ALL(csr_eldiv_csr)
+INSTANTIATE_ALL(csr_plus_csr)
+INSTANTIATE_ALL(csr_minus_csr)
 
+INSTANTIATE_ALL(csc_elmul_csc)
+INSTANTIATE_ALL(csc_eldiv_csc)
+INSTANTIATE_ALL(csc_plus_csc)
+INSTANTIATE_ALL(csc_minus_csc)
 
+
+
 /*
  * spdiags->CSC
  */

Modified: trunk/Lib/sparse/sparsetools/sparsetools.py
===================================================================
--- trunk/Lib/sparse/sparsetools/sparsetools.py	2007-07-12 08:15:53 UTC (rev 3162)
+++ trunk/Lib/sparse/sparsetools/sparsetools.py	2007-07-13 09:22:29 UTC (rev 3163)
@@ -172,52 +172,6 @@
     """
   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, 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)
-    """
-  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, 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)
-    """
-  return _sparsetools.cscplcsc(*args)
-
 def csrmucsr(*args):
   """
     csrmucsr(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp, 
@@ -298,52 +252,190 @@
     """
   return _sparsetools.cscmux(*args)
 
-def csrelmulcsr(*args):
+def csr_elmul_csr(*args):
   """
-    csrelmulcsr(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp, 
+    csr_elmul_csr(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, 
+    csr_elmul_csr(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, 
+    csr_elmul_csr(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, 
+    csr_elmul_csr(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, npy_cfloat Ax, 
+    csr_elmul_csr(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, 
+    csr_elmul_csr(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)
     """
-  return _sparsetools.csrelmulcsr(*args)
+  return _sparsetools.csr_elmul_csr(*args)
 
-def cscelmulcsc(*args):
+def csr_eldiv_csr(*args):
   """
-    cscelmulcsc(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp, 
+    csr_eldiv_csr(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)
+    csr_eldiv_csr(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)
+    csr_eldiv_csr(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)
+    csr_eldiv_csr(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)
+    csr_eldiv_csr(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)
+    csr_eldiv_csr(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)
+    """
+  return _sparsetools.csr_eldiv_csr(*args)
+
+def csr_plus_csr(*args):
+  """
+    csr_plus_csr(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)
+    csr_plus_csr(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)
+    csr_plus_csr(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)
+    csr_plus_csr(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)
+    csr_plus_csr(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)
+    csr_plus_csr(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)
+    """
+  return _sparsetools.csr_plus_csr(*args)
+
+def csr_minus_csr(*args):
+  """
+    csr_minus_csr(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)
+    csr_minus_csr(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)
+    csr_minus_csr(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)
+    csr_minus_csr(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)
+    csr_minus_csr(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)
+    csr_minus_csr(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)
+    """
+  return _sparsetools.csr_minus_csr(*args)
+
+def csc_elmul_csc(*args):
+  """
+    csc_elmul_csc(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, 
+    csc_elmul_csc(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, 
+    csc_elmul_csc(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, 
+    csc_elmul_csc(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, npy_cfloat Ax, 
+    csc_elmul_csc(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, 
+    csc_elmul_csc(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)
     """
-  return _sparsetools.cscelmulcsc(*args)
+  return _sparsetools.csc_elmul_csc(*args)
 
+def csc_eldiv_csc(*args):
+  """
+    csc_eldiv_csc(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)
+    csc_eldiv_csc(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)
+    csc_eldiv_csc(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)
+    csc_eldiv_csc(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)
+    csc_eldiv_csc(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)
+    csc_eldiv_csc(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)
+    """
+  return _sparsetools.csc_eldiv_csc(*args)
+
+def csc_plus_csc(*args):
+  """
+    csc_plus_csc(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)
+    csc_plus_csc(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)
+    csc_plus_csc(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)
+    csc_plus_csc(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)
+    csc_plus_csc(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)
+    csc_plus_csc(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)
+    """
+  return _sparsetools.csc_plus_csc(*args)
+
+def csc_minus_csc(*args):
+  """
+    csc_minus_csc(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)
+    csc_minus_csc(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)
+    csc_minus_csc(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)
+    csc_minus_csc(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)
+    csc_minus_csc(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)
+    csc_minus_csc(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)
+    """
+  return _sparsetools.csc_minus_csc(*args)
+
 def spdiags(*args):
   """
     spdiags(int n_row, int n_col, int n_diag, int offsets, int diags, 

Modified: trunk/Lib/sparse/sparsetools/sparsetools_wrap.cxx
===================================================================
--- trunk/Lib/sparse/sparsetools/sparsetools_wrap.cxx	2007-07-12 08:15:53 UTC (rev 3162)
+++ trunk/Lib/sparse/sparsetools/sparsetools_wrap.cxx	2007-07-13 09:22:29 UTC (rev 3163)
@@ -8844,7 +8844,7 @@
 }
 
 
-SWIGINTERN PyObject *_wrap_csrplcsr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_csrmucsr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
@@ -8897,15 +8897,15 @@
     tmp11 = new std::vector<int>(); 
     arg11 = tmp11; 
   }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrplcsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrmucsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csrplcsr" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csrmucsr" "', 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 '" "csrplcsr" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "csrmucsr" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
   {
@@ -8956,7 +8956,7 @@
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
     arg8 = (int*) array8->data;
   }
-  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);
+  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(); 
@@ -9021,7 +9021,7 @@
 }
 
 
-SWIGINTERN PyObject *_wrap_csrplcsr__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_csrmucsr__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
@@ -9074,15 +9074,15 @@
     tmp11 = new std::vector<long>(); 
     arg11 = tmp11; 
   }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrplcsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrmucsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csrplcsr" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csrmucsr" "', 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 '" "csrplcsr" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "csrmucsr" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
   {
@@ -9133,7 +9133,7 @@
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
     arg8 = (long*) array8->data;
   }
-  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);
+  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(); 
@@ -9198,7 +9198,7 @@
 }
 
 
-SWIGINTERN PyObject *_wrap_csrplcsr__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_csrmucsr__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
@@ -9251,15 +9251,15 @@
     tmp11 = new std::vector<float>(); 
     arg11 = tmp11; 
   }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrplcsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrmucsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csrplcsr" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csrmucsr" "', 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 '" "csrplcsr" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "csrmucsr" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
   {
@@ -9310,7 +9310,7 @@
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
     arg8 = (float*) array8->data;
   }
-  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);
+  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(); 
@@ -9375,7 +9375,7 @@
 }
 
 
-SWIGINTERN PyObject *_wrap_csrplcsr__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_csrmucsr__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
@@ -9428,15 +9428,15 @@
     tmp11 = new std::vector<double>(); 
     arg11 = tmp11; 
   }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrplcsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrmucsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csrplcsr" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csrmucsr" "', 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 '" "csrplcsr" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "csrmucsr" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
   {
@@ -9487,7 +9487,7 @@
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
     arg8 = (double*) array8->data;
   }
-  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);
+  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(); 
@@ -9552,7 +9552,7 @@
 }
 
 
-SWIGINTERN PyObject *_wrap_csrplcsr__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_csrmucsr__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
@@ -9605,15 +9605,15 @@
     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;
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrmucsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csrplcsr" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csrmucsr" "', 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 '" "csrplcsr" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "csrmucsr" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
   {
@@ -9664,7 +9664,7 @@
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
     arg8 = (npy_cfloat*) array8->data;
   }
-  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);
+  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(); 
@@ -9729,7 +9729,7 @@
 }
 
 
-SWIGINTERN PyObject *_wrap_csrplcsr__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_csrmucsr__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
@@ -9782,15 +9782,15 @@
     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;
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrmucsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csrplcsr" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "csrmucsr" "', 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 '" "csrplcsr" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "csrmucsr" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
   {
@@ -9841,7 +9841,7 @@
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
     arg8 = (npy_cdouble*) array8->data;
   }
-  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);
+  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(); 
@@ -9906,7 +9906,7 @@
 }
 
 
-SWIGINTERN PyObject *_wrap_csrplcsr(PyObject *self, PyObject *args) {
+SWIGINTERN PyObject *_wrap_csrmucsr(PyObject *self, PyObject *args) {
   int argc;
   PyObject *argv[9];
   int ii;
@@ -9952,7 +9952,7 @@
                     _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_INT)) ? 1 : 0;
                   }
                   if (_v) {
-                    return _wrap_csrplcsr__SWIG_1(self, args);
+                    return _wrap_csrmucsr__SWIG_1(self, args);
                   }
                 }
               }
@@ -9998,7 +9998,7 @@
                     _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_LONG)) ? 1 : 0;
                   }
                   if (_v) {
-                    return _wrap_csrplcsr__SWIG_2(self, args);
+                    return _wrap_csrmucsr__SWIG_2(self, args);
                   }
                 }
               }
@@ -10044,7 +10044,7 @@
                     _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_FLOAT)) ? 1 : 0;
                   }
                   if (_v) {
-                    return _wrap_csrplcsr__SWIG_3(self, args);
+                    return _wrap_csrmucsr__SWIG_3(self, args);
                   }
                 }
               }
@@ -10090,7 +10090,7 @@
                     _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_DOUBLE)) ? 1 : 0;
                   }
                   if (_v) {
-                    return _wrap_csrplcsr__SWIG_4(self, args);
+                    return _wrap_csrmucsr__SWIG_4(self, args);
                   }
                 }
               }
@@ -10136,7 +10136,7 @@
                     _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CFLOAT)) ? 1 : 0;
                   }
                   if (_v) {
-                    return _wrap_csrplcsr__SWIG_5(self, args);
+                    return _wrap_csrmucsr__SWIG_5(self, args);
                   }
                 }
               }
@@ -10182,7 +10182,7 @@
                     _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CDOUBLE)) ? 1 : 0;
                   }
                   if (_v) {
-                    return _wrap_csrplcsr__SWIG_6(self, args);
+                    return _wrap_csrmucsr__SWIG_6(self, args);
                   }
                 }
               }
@@ -10194,12 +10194,12 @@
   }
   
 fail:
-  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");
+  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;
 }
 
 
-SWIGINTERN PyObject *_wrap_cscplcsc__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_cscmucsc__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
@@ -10252,15 +10252,15 @@
     tmp11 = new std::vector<int>(); 
     arg11 = tmp11; 
   }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscplcsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscmucsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cscplcsc" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cscmucsc" "', 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 '" "cscplcsc" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cscmucsc" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
   {
@@ -10311,7 +10311,7 @@
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
     arg8 = (int*) array8->data;
   }
-  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);
+  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(); 
@@ -10376,7 +10376,7 @@
 }
 
 
-SWIGINTERN PyObject *_wrap_cscplcsc__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_cscmucsc__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
@@ -10429,15 +10429,15 @@
     tmp11 = new std::vector<long>(); 
     arg11 = tmp11; 
   }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscplcsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscmucsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cscplcsc" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cscmucsc" "', 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 '" "cscplcsc" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cscmucsc" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
   {
@@ -10488,7 +10488,7 @@
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
     arg8 = (long*) array8->data;
   }
-  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);
+  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(); 
@@ -10553,7 +10553,7 @@
 }
 
 
-SWIGINTERN PyObject *_wrap_cscplcsc__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_cscmucsc__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
@@ -10606,15 +10606,15 @@
     tmp11 = new std::vector<float>(); 
     arg11 = tmp11; 
   }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscplcsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscmucsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cscplcsc" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cscmucsc" "', 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 '" "cscplcsc" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cscmucsc" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
   {
@@ -10665,7 +10665,7 @@
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
     arg8 = (float*) array8->data;
   }
-  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);
+  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(); 
@@ -10730,7 +10730,7 @@
 }
 
 
-SWIGINTERN PyObject *_wrap_cscplcsc__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_cscmucsc__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
@@ -10783,15 +10783,15 @@
     tmp11 = new std::vector<double>(); 
     arg11 = tmp11; 
   }
-  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscplcsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscmucsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cscplcsc" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cscmucsc" "', 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 '" "cscplcsc" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cscmucsc" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
   {
@@ -10842,7 +10842,7 @@
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
     arg8 = (double*) array8->data;
   }
-  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);
+  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(); 
@@ -10907,7 +10907,7 @@
 }
 
 
-SWIGINTERN PyObject *_wrap_cscplcsc__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_cscmucsc__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
@@ -10960,15 +10960,15 @@
     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;
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscmucsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cscplcsc" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cscmucsc" "', 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 '" "cscplcsc" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cscmucsc" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
   {
@@ -11019,7 +11019,7 @@
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
     arg8 = (npy_cfloat*) array8->data;
   }
-  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);
+  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(); 
@@ -11084,7 +11084,7 @@
 }
 
 
-SWIGINTERN PyObject *_wrap_cscplcsc__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_cscmucsc__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
@@ -11137,15 +11137,15 @@
     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;
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscmucsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   ecode1 = SWIG_AsVal_int(obj0, &val1);
   if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cscplcsc" "', argument " "1"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cscmucsc" "', 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 '" "cscplcsc" "', argument " "2"" of type '" "int""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cscmucsc" "', argument " "2"" of type '" "int""'");
   } 
   arg2 = static_cast< int >(val2);
   {
@@ -11196,7 +11196,7 @@
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
     arg8 = (npy_cdouble*) array8->data;
   }
-  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);
+  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(); 
@@ -11261,7 +11261,7 @@
 }
 
 
-SWIGINTERN PyObject *_wrap_cscplcsc(PyObject *self, PyObject *args) {
+SWIGINTERN PyObject *_wrap_cscmucsc(PyObject *self, PyObject *args) {
   int argc;
   PyObject *argv[9];
   int ii;
@@ -11307,7 +11307,7 @@
                     _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_INT)) ? 1 : 0;
                   }
                   if (_v) {
-                    return _wrap_cscplcsc__SWIG_1(self, args);
+                    return _wrap_cscmucsc__SWIG_1(self, args);
                   }
                 }
               }
@@ -11353,7 +11353,7 @@
                     _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_LONG)) ? 1 : 0;
                   }
                   if (_v) {
-                    return _wrap_cscplcsc__SWIG_2(self, args);
+                    return _wrap_cscmucsc__SWIG_2(self, args);
                   }
                 }
               }
@@ -11399,7 +11399,7 @@
                     _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_FLOAT)) ? 1 : 0;
                   }
                   if (_v) {
-                    return _wrap_cscplcsc__SWIG_3(self, args);
+                    return _wrap_cscmucsc__SWIG_3(self, args);
                   }
                 }
               }
@@ -11445,7 +11445,7 @@
                     _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_DOUBLE)) ? 1 : 0;
                   }
                   if (_v) {
-                    return _wrap_cscplcsc__SWIG_4(self, args);
+                    return _wrap_cscmucsc__SWIG_4(self, args);
                   }
                 }
               }
@@ -11491,7 +11491,7 @@
                     _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CFLOAT)) ? 1 : 0;
                   }
                   if (_v) {
-                    return _wrap_cscplcsc__SWIG_5(self, args);
+                    return _wrap_cscmucsc__SWIG_5(self, args);
                   }
                 }
               }
@@ -11537,7 +11537,7 @@
                     _v = (is_array(argv[7]) && PyArray_CanCastSafely(PyArray_TYPE(argv[7]),PyArray_CDOUBLE)) ? 1 : 0;
                   }
                   if (_v) {
-                    return _wrap_cscplcsc__SWIG_6(self, args);
+                    return _wrap_cscmucsc__SWIG_6(self, args);
                   }
                 }
               }
@@ -11549,12 +11549,12 @@
   }
   
 fail:
-  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");
+  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;
 }
 
 
-SWIGINTERN PyObject *_wrap_csrmucsr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_csrmux__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
@@ -11562,6 +11562,1852 @@
   int *arg4 ;
   int *arg5 ;
   int *arg6 ;
+  std::vector<int > *arg7 = (std::vector<int > *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 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 > *tmp7 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  {
+    tmp7 = new std::vector<int>(); 
+    arg7 = tmp7; 
+  }
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:csrmux",&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 '" "csrmux" "', 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 '" "csrmux" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = static_cast< int >(val2);
+  {
+    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;
+  }
+  {
+    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;
+  }
+  {
+    npy_intp size[1] = {
+      -1
+    };
+    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;
+  }
+  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_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(int)*length);	 
+    delete arg7; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+  }
+  {
+    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 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_csrmux__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int *arg3 ;
+  int *arg4 ;
+  long *arg5 ;
+  long *arg6 ;
+  std::vector<long > *arg7 = (std::vector<long > *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 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<long > *tmp7 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  {
+    tmp7 = new std::vector<long>(); 
+    arg7 = tmp7; 
+  }
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:csrmux",&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 '" "csrmux" "', 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 '" "csrmux" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = static_cast< int >(val2);
+  {
+    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;
+  }
+  {
+    npy_intp size[1] = {
+      -1
+    };
+    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;
+  }
+  {
+    npy_intp size[1] = {
+      -1
+    };
+    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;
+  }
+  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_LONG); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(long)*length);	 
+    delete arg7; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+  }
+  {
+    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 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_csrmux__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int *arg3 ;
+  int *arg4 ;
+  float *arg5 ;
+  float *arg6 ;
+  std::vector<float > *arg7 = (std::vector<float > *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 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<float > *tmp7 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  {
+    tmp7 = new std::vector<float>(); 
+    arg7 = tmp7; 
+  }
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:csrmux",&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 '" "csrmux" "', 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 '" "csrmux" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = static_cast< int >(val2);
+  {
+    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;
+  }
+  {
+    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;
+  }
+  {
+    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;
+  }
+  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_FLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(float)*length);	 
+    delete arg7; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+  }
+  {
+    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 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_csrmux__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int *arg3 ;
+  int *arg4 ;
+  double *arg5 ;
+  double *arg6 ;
+  std::vector<double > *arg7 = (std::vector<double > *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 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<double > *tmp7 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  {
+    tmp7 = new std::vector<double>(); 
+    arg7 = tmp7; 
+  }
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:csrmux",&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 '" "csrmux" "', 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 '" "csrmux" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = static_cast< int >(val2);
+  {
+    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;
+  }
+  {
+    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;
+  }
+  {
+    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;
+  }
+  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_DOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(double)*length);	 
+    delete arg7; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+  }
+  {
+    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 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_csrmux__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int *arg3 ;
+  int *arg4 ;
+  npy_cfloat *arg5 ;
+  npy_cfloat *arg6 ;
+  std::vector<npy_cfloat > *arg7 = (std::vector<npy_cfloat > *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 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<npy_cfloat > *tmp7 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  {
+    tmp7 = new std::vector<npy_cfloat>(); 
+    arg7 = tmp7; 
+  }
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:csrmux",&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 '" "csrmux" "', 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 '" "csrmux" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = static_cast< int >(val2);
+  {
+    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;
+  }
+  {
+    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;
+  }
+  {
+    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;
+  }
+  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_CFLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cfloat)*length);	 
+    delete arg7; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+  }
+  {
+    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 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_csrmux__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int *arg3 ;
+  int *arg4 ;
+  npy_cdouble *arg5 ;
+  npy_cdouble *arg6 ;
+  std::vector<npy_cdouble > *arg7 = (std::vector<npy_cdouble > *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 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<npy_cdouble > *tmp7 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  {
+    tmp7 = new std::vector<npy_cdouble>(); 
+    arg7 = tmp7; 
+  }
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:csrmux",&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 '" "csrmux" "', 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 '" "csrmux" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = static_cast< int >(val2);
+  {
+    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;
+  }
+  {
+    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;
+  }
+  {
+    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;
+  }
+  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_CDOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cdouble)*length);	 
+    delete arg7; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+  }
+  {
+    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 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_csrmux(PyObject *self, PyObject *args) {
+  int argc;
+  PyObject *argv[7];
+  int ii;
+  
+  if (!PyTuple_Check(args)) SWIG_fail;
+  argc = PyObject_Length(args);
+  for (ii = 0; (ii < argc) && (ii < 6); ii++) {
+    argv[ii] = PyTuple_GET_ITEM(args,ii);
+  }
+  if (argc == 6) {
+    int _v;
+    {
+      int res = SWIG_AsVal_int(argv[0], NULL);
+      _v = SWIG_CheckState(res);
+    }
+    if (_v) {
+      {
+        int res = SWIG_AsVal_int(argv[1], NULL);
+        _v = SWIG_CheckState(res);
+      }
+      if (_v) {
+        {
+          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
+        }
+        if (_v) {
+          {
+            _v = (is_array(argv[3]) && PyArray_CanCastSafely(PyArray_TYPE(argv[3]),PyArray_INT)) ? 1 : 0;
+          }
+          if (_v) {
+            {
+              _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_INT)) ? 1 : 0;
+              }
+              if (_v) {
+                return _wrap_csrmux__SWIG_1(self, args);
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+  if (argc == 6) {
+    int _v;
+    {
+      int res = SWIG_AsVal_int(argv[0], NULL);
+      _v = SWIG_CheckState(res);
+    }
+    if (_v) {
+      {
+        int res = SWIG_AsVal_int(argv[1], NULL);
+        _v = SWIG_CheckState(res);
+      }
+      if (_v) {
+        {
+          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
+        }
+        if (_v) {
+          {
+            _v = (is_array(argv[3]) && PyArray_CanCastSafely(PyArray_TYPE(argv[3]),PyArray_INT)) ? 1 : 0;
+          }
+          if (_v) {
+            {
+              _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_LONG)) ? 1 : 0;
+              }
+              if (_v) {
+                return _wrap_csrmux__SWIG_2(self, args);
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+  if (argc == 6) {
+    int _v;
+    {
+      int res = SWIG_AsVal_int(argv[0], NULL);
+      _v = SWIG_CheckState(res);
+    }
+    if (_v) {
+      {
+        int res = SWIG_AsVal_int(argv[1], NULL);
+        _v = SWIG_CheckState(res);
+      }
+      if (_v) {
+        {
+          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
+        }
+        if (_v) {
+          {
+            _v = (is_array(argv[3]) && PyArray_CanCastSafely(PyArray_TYPE(argv[3]),PyArray_INT)) ? 1 : 0;
+          }
+          if (_v) {
+            {
+              _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_FLOAT)) ? 1 : 0;
+              }
+              if (_v) {
+                return _wrap_csrmux__SWIG_3(self, args);
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+  if (argc == 6) {
+    int _v;
+    {
+      int res = SWIG_AsVal_int(argv[0], NULL);
+      _v = SWIG_CheckState(res);
+    }
+    if (_v) {
+      {
+        int res = SWIG_AsVal_int(argv[1], NULL);
+        _v = SWIG_CheckState(res);
+      }
+      if (_v) {
+        {
+          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
+        }
+        if (_v) {
+          {
+            _v = (is_array(argv[3]) && PyArray_CanCastSafely(PyArray_TYPE(argv[3]),PyArray_INT)) ? 1 : 0;
+          }
+          if (_v) {
+            {
+              _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_DOUBLE)) ? 1 : 0;
+              }
+              if (_v) {
+                return _wrap_csrmux__SWIG_4(self, args);
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+  if (argc == 6) {
+    int _v;
+    {
+      int res = SWIG_AsVal_int(argv[0], NULL);
+      _v = SWIG_CheckState(res);
+    }
+    if (_v) {
+      {
+        int res = SWIG_AsVal_int(argv[1], NULL);
+        _v = SWIG_CheckState(res);
+      }
+      if (_v) {
+        {
+          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
+        }
+        if (_v) {
+          {
+            _v = (is_array(argv[3]) && PyArray_CanCastSafely(PyArray_TYPE(argv[3]),PyArray_INT)) ? 1 : 0;
+          }
+          if (_v) {
+            {
+              _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_CFLOAT)) ? 1 : 0;
+              }
+              if (_v) {
+                return _wrap_csrmux__SWIG_5(self, args);
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+  if (argc == 6) {
+    int _v;
+    {
+      int res = SWIG_AsVal_int(argv[0], NULL);
+      _v = SWIG_CheckState(res);
+    }
+    if (_v) {
+      {
+        int res = SWIG_AsVal_int(argv[1], NULL);
+        _v = SWIG_CheckState(res);
+      }
+      if (_v) {
+        {
+          _v = (is_array(argv[2]) && PyArray_CanCastSafely(PyArray_TYPE(argv[2]),PyArray_INT)) ? 1 : 0;
+        }
+        if (_v) {
+          {
+            _v = (is_array(argv[3]) && PyArray_CanCastSafely(PyArray_TYPE(argv[3]),PyArray_INT)) ? 1 : 0;
+          }
+          if (_v) {
+            {
+              _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_CDOUBLE)) ? 1 : 0;
+              }
+              if (_v) {
+                return _wrap_csrmux__SWIG_6(self, args);
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+  
+fail:
+  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;
+}
+
+
+SWIGINTERN PyObject *_wrap_cscmux__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int *arg3 ;
+  int *arg4 ;
+  int *arg5 ;
+  int *arg6 ;
+  std::vector<int > *arg7 = (std::vector<int > *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 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 > *tmp7 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  {
+    tmp7 = new std::vector<int>(); 
+    arg7 = tmp7; 
+  }
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cscmux",&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 '" "cscmux" "', 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 '" "cscmux" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = static_cast< int >(val2);
+  {
+    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;
+  }
+  {
+    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;
+  }
+  {
+    npy_intp size[1] = {
+      -1
+    };
+    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;
+  }
+  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_INT); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(int)*length);	 
+    delete arg7; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+  }
+  {
+    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 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_cscmux__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int *arg3 ;
+  int *arg4 ;
+  long *arg5 ;
+  long *arg6 ;
+  std::vector<long > *arg7 = (std::vector<long > *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 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<long > *tmp7 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  {
+    tmp7 = new std::vector<long>(); 
+    arg7 = tmp7; 
+  }
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cscmux",&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 '" "cscmux" "', 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 '" "cscmux" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = static_cast< int >(val2);
+  {
+    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;
+  }
+  {
+    npy_intp size[1] = {
+      -1
+    };
+    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;
+  }
+  {
+    npy_intp size[1] = {
+      -1
+    };
+    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;
+  }
+  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_LONG); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(long)*length);	 
+    delete arg7; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+  }
+  {
+    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 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_cscmux__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int *arg3 ;
+  int *arg4 ;
+  float *arg5 ;
+  float *arg6 ;
+  std::vector<float > *arg7 = (std::vector<float > *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 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<float > *tmp7 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  {
+    tmp7 = new std::vector<float>(); 
+    arg7 = tmp7; 
+  }
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cscmux",&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 '" "cscmux" "', 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 '" "cscmux" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = static_cast< int >(val2);
+  {
+    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;
+  }
+  {
+    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;
+  }
+  {
+    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;
+  }
+  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_FLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(float)*length);	 
+    delete arg7; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+  }
+  {
+    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 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_cscmux__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int *arg3 ;
+  int *arg4 ;
+  double *arg5 ;
+  double *arg6 ;
+  std::vector<double > *arg7 = (std::vector<double > *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 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<double > *tmp7 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  {
+    tmp7 = new std::vector<double>(); 
+    arg7 = tmp7; 
+  }
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cscmux",&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 '" "cscmux" "', 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 '" "cscmux" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = static_cast< int >(val2);
+  {
+    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;
+  }
+  {
+    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;
+  }
+  {
+    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;
+  }
+  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_DOUBLE); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(double)*length);	 
+    delete arg7; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+  }
+  {
+    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 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_cscmux__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int *arg3 ;
+  int *arg4 ;
+  npy_cfloat *arg5 ;
+  npy_cfloat *arg6 ;
+  std::vector<npy_cfloat > *arg7 = (std::vector<npy_cfloat > *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 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<npy_cfloat > *tmp7 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  {
+    tmp7 = new std::vector<npy_cfloat>(); 
+    arg7 = tmp7; 
+  }
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cscmux",&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 '" "cscmux" "', 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 '" "cscmux" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = static_cast< int >(val2);
+  {
+    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;
+  }
+  {
+    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;
+  }
+  {
+    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;
+  }
+  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_CFLOAT); 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cfloat)*length);	 
+    delete arg7; 
+    resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
+  }
+  {
+    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 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_cscmux__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int *arg3 ;
+  int *arg4 ;
+  npy_cdouble *arg5 ;
+  npy_cdouble *arg6 ;
+  std::vector<npy_cdouble > *arg7 = (std::vector<npy_cdouble > *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 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<npy_cdouble > *tmp7 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  {
+    tmp7 = new std::vector<npy_cdouble>(); 
+    arg7 = tmp7; 
+  }
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cscmux",&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 '" "cscmux" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = static_cast< int >(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &v