[Scipy-svn] r5529 - in trunk/scipy/sparse: . sparsetools tests

scipy-svn@scip... scipy-svn@scip...
Fri Jan 30 22:41:53 CST 2009


Author: wnbell
Date: 2009-01-30 22:41:39 -0600 (Fri, 30 Jan 2009)
New Revision: 5529

Modified:
   trunk/scipy/sparse/compressed.py
   trunk/scipy/sparse/sparsetools/csc.py
   trunk/scipy/sparse/sparsetools/csr.h
   trunk/scipy/sparse/sparsetools/csr.py
   trunk/scipy/sparse/tests/test_base.py
Log:
reimplemented special path for CSR (binary_op) CSR in the
case where the column indices within each row are not 
in sorted order.  partially addresses ticket #858


Modified: trunk/scipy/sparse/compressed.py
===================================================================
--- trunk/scipy/sparse/compressed.py	2009-01-31 01:05:19 UTC (rev 5528)
+++ trunk/scipy/sparse/compressed.py	2009-01-31 04:41:39 UTC (rev 5529)
@@ -672,27 +672,19 @@
             return self.__class__((data,self.indices,self.indptr), \
                                    shape=self.shape,dtype=data.dtype)
 
-    def _binopt(self, other, op, in_shape=None, out_shape=None):
+    def _binopt(self, other, op):
         """apply the binary operation fn to two sparse matrices"""
         other = self.__class__(other)
 
-        if in_shape is None:
-            in_shape = self.shape
-        if out_shape is None:
-            out_shape = self.shape
-
-        self.sort_indices()
-        other.sort_indices()
-
-        # e.g. csr_plus_csr, csr_mat_mat, etc.
+        # e.g. csr_plus_csr, csr_minus_csr, etc.
         fn = getattr(sparsetools, self.format + op + self.format)
 
-        maxnnz = self.nnz + other.nnz
+        maxnnz  = self.nnz + other.nnz
         indptr  = np.empty_like(self.indptr)
         indices = np.empty(maxnnz, dtype=np.intc)
         data    = np.empty(maxnnz, dtype=upcast(self.dtype,other.dtype))
 
-        fn(in_shape[0], in_shape[1], \
+        fn(self.shape[0], self.shape[1], \
                 self.indptr,  self.indices,  self.data,
                 other.indptr, other.indices, other.data,
                 indptr, indices, data)
@@ -705,6 +697,6 @@
             indices = indices.copy()
             data    = data.copy()
 
-        A = self.__class__((data, indices, indptr), shape=out_shape)
-        A.has_sorted_indices = True
+        A = self.__class__((data, indices, indptr), shape=self.shape)
+
         return A

Modified: trunk/scipy/sparse/sparsetools/csc.py
===================================================================
--- trunk/scipy/sparse/sparsetools/csc.py	2009-01-31 01:05:19 UTC (rev 5528)
+++ trunk/scipy/sparse/sparsetools/csc.py	2009-01-31 04:41:39 UTC (rev 5529)
@@ -50,356 +50,357 @@
 
 
 def csc_matmat_pass1(*args):
+  """
+    csc_matmat_pass1(int n_row, int n_col, int Ap, int Ai, int Bp, int Bi, 
+        int Cp)
     """
-      csc_matmat_pass1(int n_row, int n_col, int Ap, int Ai, int Bp, int Bi,
-          int Cp)
-      """
-    return _csc.csc_matmat_pass1(*args)
+  return _csc.csc_matmat_pass1(*args)
 
 
 def csc_diagonal(*args):
+  """
+    csc_diagonal(int n_row, int n_col, int Ap, int Aj, signed char Ax, 
+        signed char Yx)
+    csc_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, 
+        unsigned char Yx)
+    csc_diagonal(int n_row, int n_col, int Ap, int Aj, short Ax, short Yx)
+    csc_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, 
+        unsigned short Yx)
+    csc_diagonal(int n_row, int n_col, int Ap, int Aj, int Ax, int Yx)
+    csc_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, 
+        unsigned int Yx)
+    csc_diagonal(int n_row, int n_col, int Ap, int Aj, long long Ax, 
+        long long Yx)
+    csc_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, 
+        unsigned long long Yx)
+    csc_diagonal(int n_row, int n_col, int Ap, int Aj, float Ax, float Yx)
+    csc_diagonal(int n_row, int n_col, int Ap, int Aj, double Ax, double Yx)
+    csc_diagonal(int n_row, int n_col, int Ap, int Aj, long double Ax, 
+        long double Yx)
+    csc_diagonal(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, 
+        npy_cfloat_wrapper Yx)
+    csc_diagonal(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, 
+        npy_cdouble_wrapper Yx)
+    csc_diagonal(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, 
+        npy_clongdouble_wrapper Yx)
     """
-      csc_diagonal(int n_row, int n_col, int Ap, int Aj, signed char Ax,
-          signed char Yx)
-      csc_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned char Ax,
-          unsigned char Yx)
-      csc_diagonal(int n_row, int n_col, int Ap, int Aj, short Ax, short Yx)
-      csc_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned short Ax,
-          unsigned short Yx)
-      csc_diagonal(int n_row, int n_col, int Ap, int Aj, int Ax, int Yx)
-      csc_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned int Ax,
-          unsigned int Yx)
-      csc_diagonal(int n_row, int n_col, int Ap, int Aj, long long Ax,
-          long long Yx)
-      csc_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax,
-          unsigned long long Yx)
-      csc_diagonal(int n_row, int n_col, int Ap, int Aj, float Ax, float Yx)
-      csc_diagonal(int n_row, int n_col, int Ap, int Aj, double Ax, double Yx)
-      csc_diagonal(int n_row, int n_col, int Ap, int Aj, long double Ax,
-          long double Yx)
-      csc_diagonal(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax,
-          npy_cfloat_wrapper Yx)
-      csc_diagonal(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax,
-          npy_cdouble_wrapper Yx)
-      csc_diagonal(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax,
-          npy_clongdouble_wrapper Yx)
-      """
-    return _csc.csc_diagonal(*args)
+  return _csc.csc_diagonal(*args)
 
 def csc_tocsr(*args):
+  """
+    csc_tocsr(int n_row, int n_col, int Ap, int Ai, signed char Ax, 
+        int Bp, int Bj, signed char Bx)
+    csc_tocsr(int n_row, int n_col, int Ap, int Ai, unsigned char Ax, 
+        int Bp, int Bj, unsigned char Bx)
+    csc_tocsr(int n_row, int n_col, int Ap, int Ai, short Ax, int Bp, 
+        int Bj, short Bx)
+    csc_tocsr(int n_row, int n_col, int Ap, int Ai, unsigned short Ax, 
+        int Bp, int Bj, unsigned short Bx)
+    csc_tocsr(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp, 
+        int Bj, int Bx)
+    csc_tocsr(int n_row, int n_col, int Ap, int Ai, unsigned int Ax, 
+        int Bp, int Bj, unsigned int Bx)
+    csc_tocsr(int n_row, int n_col, int Ap, int Ai, long long Ax, 
+        int Bp, int Bj, long long Bx)
+    csc_tocsr(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax, 
+        int Bp, int Bj, unsigned long long Bx)
+    csc_tocsr(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp, 
+        int Bj, float Bx)
+    csc_tocsr(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, 
+        int Bj, double Bx)
+    csc_tocsr(int n_row, int n_col, int Ap, int Ai, long double Ax, 
+        int Bp, int Bj, long double Bx)
+    csc_tocsr(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, 
+        int Bp, int Bj, npy_cfloat_wrapper Bx)
+    csc_tocsr(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, 
+        int Bp, int Bj, npy_cdouble_wrapper Bx)
+    csc_tocsr(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax, 
+        int Bp, int Bj, npy_clongdouble_wrapper Bx)
     """
-      csc_tocsr(int n_row, int n_col, int Ap, int Ai, signed char Ax,
-          int Bp, int Bj, signed char Bx)
-      csc_tocsr(int n_row, int n_col, int Ap, int Ai, unsigned char Ax,
-          int Bp, int Bj, unsigned char Bx)
-      csc_tocsr(int n_row, int n_col, int Ap, int Ai, short Ax, int Bp,
-          int Bj, short Bx)
-      csc_tocsr(int n_row, int n_col, int Ap, int Ai, unsigned short Ax,
-          int Bp, int Bj, unsigned short Bx)
-      csc_tocsr(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp,
-          int Bj, int Bx)
-      csc_tocsr(int n_row, int n_col, int Ap, int Ai, unsigned int Ax,
-          int Bp, int Bj, unsigned int Bx)
-      csc_tocsr(int n_row, int n_col, int Ap, int Ai, long long Ax,
-          int Bp, int Bj, long long Bx)
-      csc_tocsr(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax,
-          int Bp, int Bj, unsigned long long Bx)
-      csc_tocsr(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp,
-          int Bj, float Bx)
-      csc_tocsr(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp,
-          int Bj, double Bx)
-      csc_tocsr(int n_row, int n_col, int Ap, int Ai, long double Ax,
-          int Bp, int Bj, long double Bx)
-      csc_tocsr(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax,
-          int Bp, int Bj, npy_cfloat_wrapper Bx)
-      csc_tocsr(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax,
-          int Bp, int Bj, npy_cdouble_wrapper Bx)
-      csc_tocsr(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax,
-          int Bp, int Bj, npy_clongdouble_wrapper Bx)
-      """
-    return _csc.csc_tocsr(*args)
+  return _csc.csc_tocsr(*args)
 
 def csc_matmat_pass2(*args):
+  """
+    csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, signed char Ax, 
+        int Bp, int Bi, signed char Bx, int Cp, int Ci, 
+        signed char Cx)
+    csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, unsigned char Ax, 
+        int Bp, int Bi, unsigned char Bx, int Cp, 
+        int Ci, unsigned char Cx)
+    csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, short Ax, int Bp, 
+        int Bi, short Bx, int Cp, int Ci, short Cx)
+    csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, unsigned short Ax, 
+        int Bp, int Bi, unsigned short Bx, int Cp, 
+        int Ci, unsigned short Cx)
+    csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp, 
+        int Bi, int Bx, int Cp, int Ci, int Cx)
+    csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, unsigned int Ax, 
+        int Bp, int Bi, unsigned int Bx, int Cp, 
+        int Ci, unsigned int Cx)
+    csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, long long Ax, 
+        int Bp, int Bi, long long Bx, int Cp, int Ci, 
+        long long Cx)
+    csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax, 
+        int Bp, int Bi, unsigned long long Bx, 
+        int Cp, int Ci, unsigned long long Cx)
+    csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp, 
+        int Bi, float Bx, int Cp, int Ci, float Cx)
+    csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, 
+        int Bi, double Bx, int Cp, int Ci, double Cx)
+    csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, long double Ax, 
+        int Bp, int Bi, long double Bx, int Cp, int Ci, 
+        long double Cx)
+    csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, 
+        int Bp, int Bi, npy_cfloat_wrapper Bx, 
+        int Cp, int Ci, npy_cfloat_wrapper Cx)
+    csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, 
+        int Bp, int Bi, npy_cdouble_wrapper Bx, 
+        int Cp, int Ci, npy_cdouble_wrapper Cx)
+    csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax, 
+        int Bp, int Bi, npy_clongdouble_wrapper Bx, 
+        int Cp, int Ci, npy_clongdouble_wrapper Cx)
     """
-      csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, signed char Ax,
-          int Bp, int Bi, signed char Bx, int Cp, int Ci,
-          signed char Cx)
-      csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, unsigned char Ax,
-          int Bp, int Bi, unsigned char Bx, int Cp,
-          int Ci, unsigned char Cx)
-      csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, short Ax, int Bp,
-          int Bi, short Bx, int Cp, int Ci, short Cx)
-      csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, unsigned short Ax,
-          int Bp, int Bi, unsigned short Bx, int Cp,
-          int Ci, unsigned short Cx)
-      csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp,
-          int Bi, int Bx, int Cp, int Ci, int Cx)
-      csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, unsigned int Ax,
-          int Bp, int Bi, unsigned int Bx, int Cp,
-          int Ci, unsigned int Cx)
-      csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, long long Ax,
-          int Bp, int Bi, long long Bx, int Cp, int Ci,
-          long long Cx)
-      csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax,
-          int Bp, int Bi, unsigned long long Bx,
-          int Cp, int Ci, unsigned long long Cx)
-      csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp,
-          int Bi, float Bx, int Cp, int Ci, float Cx)
-      csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp,
-          int Bi, double Bx, int Cp, int Ci, double Cx)
-      csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, long double Ax,
-          int Bp, int Bi, long double Bx, int Cp, int Ci,
-          long double Cx)
-      csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax,
-          int Bp, int Bi, npy_cfloat_wrapper Bx,
-          int Cp, int Ci, npy_cfloat_wrapper Cx)
-      csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax,
-          int Bp, int Bi, npy_cdouble_wrapper Bx,
-          int Cp, int Ci, npy_cdouble_wrapper Cx)
-      csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax,
-          int Bp, int Bi, npy_clongdouble_wrapper Bx,
-          int Cp, int Ci, npy_clongdouble_wrapper Cx)
-      """
-    return _csc.csc_matmat_pass2(*args)
+  return _csc.csc_matmat_pass2(*args)
 
 def csc_matvec(*args):
+  """
+    csc_matvec(int n_row, int n_col, int Ap, int Ai, signed char Ax, 
+        signed char Xx, signed char Yx)
+    csc_matvec(int n_row, int n_col, int Ap, int Ai, unsigned char Ax, 
+        unsigned char Xx, unsigned char Yx)
+    csc_matvec(int n_row, int n_col, int Ap, int Ai, short Ax, short Xx, 
+        short Yx)
+    csc_matvec(int n_row, int n_col, int Ap, int Ai, unsigned short Ax, 
+        unsigned short Xx, unsigned short Yx)
+    csc_matvec(int n_row, int n_col, int Ap, int Ai, int Ax, int Xx, 
+        int Yx)
+    csc_matvec(int n_row, int n_col, int Ap, int Ai, unsigned int Ax, 
+        unsigned int Xx, unsigned int Yx)
+    csc_matvec(int n_row, int n_col, int Ap, int Ai, long long Ax, 
+        long long Xx, long long Yx)
+    csc_matvec(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax, 
+        unsigned long long Xx, unsigned long long Yx)
+    csc_matvec(int n_row, int n_col, int Ap, int Ai, float Ax, float Xx, 
+        float Yx)
+    csc_matvec(int n_row, int n_col, int Ap, int Ai, double Ax, double Xx, 
+        double Yx)
+    csc_matvec(int n_row, int n_col, int Ap, int Ai, long double Ax, 
+        long double Xx, long double Yx)
+    csc_matvec(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, 
+        npy_cfloat_wrapper Xx, npy_cfloat_wrapper Yx)
+    csc_matvec(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, 
+        npy_cdouble_wrapper Xx, npy_cdouble_wrapper Yx)
+    csc_matvec(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax, 
+        npy_clongdouble_wrapper Xx, npy_clongdouble_wrapper Yx)
     """
-      csc_matvec(int n_row, int n_col, int Ap, int Ai, signed char Ax,
-          signed char Xx, signed char Yx)
-      csc_matvec(int n_row, int n_col, int Ap, int Ai, unsigned char Ax,
-          unsigned char Xx, unsigned char Yx)
-      csc_matvec(int n_row, int n_col, int Ap, int Ai, short Ax, short Xx,
-          short Yx)
-      csc_matvec(int n_row, int n_col, int Ap, int Ai, unsigned short Ax,
-          unsigned short Xx, unsigned short Yx)
-      csc_matvec(int n_row, int n_col, int Ap, int Ai, int Ax, int Xx,
-          int Yx)
-      csc_matvec(int n_row, int n_col, int Ap, int Ai, unsigned int Ax,
-          unsigned int Xx, unsigned int Yx)
-      csc_matvec(int n_row, int n_col, int Ap, int Ai, long long Ax,
-          long long Xx, long long Yx)
-      csc_matvec(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax,
-          unsigned long long Xx, unsigned long long Yx)
-      csc_matvec(int n_row, int n_col, int Ap, int Ai, float Ax, float Xx,
-          float Yx)
-      csc_matvec(int n_row, int n_col, int Ap, int Ai, double Ax, double Xx,
-          double Yx)
-      csc_matvec(int n_row, int n_col, int Ap, int Ai, long double Ax,
-          long double Xx, long double Yx)
-      csc_matvec(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax,
-          npy_cfloat_wrapper Xx, npy_cfloat_wrapper Yx)
-      csc_matvec(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax,
-          npy_cdouble_wrapper Xx, npy_cdouble_wrapper Yx)
-      csc_matvec(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax,
-          npy_clongdouble_wrapper Xx, npy_clongdouble_wrapper Yx)
-      """
-    return _csc.csc_matvec(*args)
+  return _csc.csc_matvec(*args)
 
 def csc_matvecs(*args):
+  """
+    csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, signed char Ax, 
+        signed char Xx, signed char Yx)
+    csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, unsigned char Ax, 
+        unsigned char Xx, unsigned char Yx)
+    csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, short Ax, 
+        short Xx, short Yx)
+    csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, unsigned short Ax, 
+        unsigned short Xx, unsigned short Yx)
+    csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, int Ax, 
+        int Xx, int Yx)
+    csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, unsigned int Ax, 
+        unsigned int Xx, unsigned int Yx)
+    csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, long long Ax, 
+        long long Xx, long long Yx)
+    csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, unsigned long long Ax, 
+        unsigned long long Xx, 
+        unsigned long long Yx)
+    csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, float Ax, 
+        float Xx, float Yx)
+    csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, double Ax, 
+        double Xx, double Yx)
+    csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, long double Ax, 
+        long double Xx, long double Yx)
+    csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, npy_cfloat_wrapper Ax, 
+        npy_cfloat_wrapper Xx, 
+        npy_cfloat_wrapper Yx)
+    csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, npy_cdouble_wrapper Ax, 
+        npy_cdouble_wrapper Xx, 
+        npy_cdouble_wrapper Yx)
+    csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, npy_clongdouble_wrapper Ax, 
+        npy_clongdouble_wrapper Xx, 
+        npy_clongdouble_wrapper Yx)
     """
-      csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, signed char Ax,
-          signed char Xx, signed char Yx)
-      csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, unsigned char Ax,
-          unsigned char Xx, unsigned char Yx)
-      csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, short Ax,
-          short Xx, short Yx)
-      csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, unsigned short Ax,
-          unsigned short Xx, unsigned short Yx)
-      csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, int Ax,
-          int Xx, int Yx)
-      csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, unsigned int Ax,
-          unsigned int Xx, unsigned int Yx)
-      csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, long long Ax,
-          long long Xx, long long Yx)
-      csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, unsigned long long Ax,
-          unsigned long long Xx,
-          unsigned long long Yx)
-      csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, float Ax,
-          float Xx, float Yx)
-      csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, double Ax,
-          double Xx, double Yx)
-      csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, long double Ax,
-          long double Xx, long double Yx)
-      csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, npy_cfloat_wrapper Ax,
-          npy_cfloat_wrapper Xx,
-          npy_cfloat_wrapper Yx)
-      csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, npy_cdouble_wrapper Ax,
-          npy_cdouble_wrapper Xx,
-          npy_cdouble_wrapper Yx)
-      csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, npy_clongdouble_wrapper Ax,
-          npy_clongdouble_wrapper Xx,
-          npy_clongdouble_wrapper Yx)
-      """
-    return _csc.csc_matvecs(*args)
+  return _csc.csc_matvecs(*args)
 
 def csc_elmul_csc(*args):
+  """
+    csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, signed char Ax, 
+        int Bp, int Bi, signed char Bx, int Cp, int Ci, 
+        signed char Cx)
+    csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, unsigned char Ax, 
+        int Bp, int Bi, unsigned char Bx, int Cp, 
+        int Ci, unsigned char Cx)
+    csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, short Ax, int Bp, 
+        int Bi, short Bx, int Cp, int Ci, short Cx)
+    csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, unsigned short Ax, 
+        int Bp, int Bi, unsigned short Bx, int Cp, 
+        int Ci, unsigned short Cx)
+    csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp, 
+        int Bi, int Bx, int Cp, int Ci, int Cx)
+    csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, unsigned int Ax, 
+        int Bp, int Bi, unsigned int Bx, int Cp, 
+        int Ci, unsigned int Cx)
+    csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, long long Ax, 
+        int Bp, int Bi, long long Bx, int Cp, int Ci, 
+        long long Cx)
+    csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax, 
+        int Bp, int Bi, unsigned long long Bx, 
+        int Cp, int Ci, unsigned long long Cx)
+    csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp, 
+        int Bi, float Bx, int Cp, int Ci, float Cx)
+    csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, 
+        int Bi, double Bx, int Cp, int Ci, double Cx)
+    csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, long double Ax, 
+        int Bp, int Bi, long double Bx, int Cp, int Ci, 
+        long double Cx)
+    csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, 
+        int Bp, int Bi, npy_cfloat_wrapper Bx, 
+        int Cp, int Ci, npy_cfloat_wrapper Cx)
+    csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, 
+        int Bp, int Bi, npy_cdouble_wrapper Bx, 
+        int Cp, int Ci, npy_cdouble_wrapper Cx)
+    csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax, 
+        int Bp, int Bi, npy_clongdouble_wrapper Bx, 
+        int Cp, int Ci, npy_clongdouble_wrapper Cx)
     """
-      csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, signed char Ax,
-          int Bp, int Bi, signed char Bx, int Cp, int Ci,
-          signed char Cx)
-      csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, unsigned char Ax,
-          int Bp, int Bi, unsigned char Bx, int Cp,
-          int Ci, unsigned char Cx)
-      csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, short Ax, int Bp,
-          int Bi, short Bx, int Cp, int Ci, short Cx)
-      csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, unsigned short Ax,
-          int Bp, int Bi, unsigned short Bx, int Cp,
-          int Ci, unsigned short Cx)
-      csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp,
-          int Bi, int Bx, int Cp, int Ci, int Cx)
-      csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, unsigned int Ax,
-          int Bp, int Bi, unsigned int Bx, int Cp,
-          int Ci, unsigned int Cx)
-      csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, long long Ax,
-          int Bp, int Bi, long long Bx, int Cp, int Ci,
-          long long Cx)
-      csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax,
-          int Bp, int Bi, unsigned long long Bx,
-          int Cp, int Ci, unsigned long long Cx)
-      csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp,
-          int Bi, float Bx, int Cp, int Ci, float Cx)
-      csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp,
-          int Bi, double Bx, int Cp, int Ci, double Cx)
-      csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, long double Ax,
-          int Bp, int Bi, long double Bx, int Cp, int Ci,
-          long double Cx)
-      csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax,
-          int Bp, int Bi, npy_cfloat_wrapper Bx,
-          int Cp, int Ci, npy_cfloat_wrapper Cx)
-      csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax,
-          int Bp, int Bi, npy_cdouble_wrapper Bx,
-          int Cp, int Ci, npy_cdouble_wrapper Cx)
-      csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax,
-          int Bp, int Bi, npy_clongdouble_wrapper Bx,
-          int Cp, int Ci, npy_clongdouble_wrapper Cx)
-      """
-    return _csc.csc_elmul_csc(*args)
+  return _csc.csc_elmul_csc(*args)
 
 def csc_eldiv_csc(*args):
+  """
+    csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, signed char Ax, 
+        int Bp, int Bi, signed char Bx, int Cp, int Ci, 
+        signed char Cx)
+    csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, unsigned char Ax, 
+        int Bp, int Bi, unsigned char Bx, int Cp, 
+        int Ci, unsigned char Cx)
+    csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, short Ax, int Bp, 
+        int Bi, short Bx, int Cp, int Ci, short Cx)
+    csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, unsigned short Ax, 
+        int Bp, int Bi, unsigned short Bx, int Cp, 
+        int Ci, unsigned short Cx)
+    csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp, 
+        int Bi, int Bx, int Cp, int Ci, int Cx)
+    csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, unsigned int Ax, 
+        int Bp, int Bi, unsigned int Bx, int Cp, 
+        int Ci, unsigned int Cx)
+    csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, long long Ax, 
+        int Bp, int Bi, long long Bx, int Cp, int Ci, 
+        long long Cx)
+    csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax, 
+        int Bp, int Bi, unsigned long long Bx, 
+        int Cp, int Ci, unsigned long long Cx)
+    csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp, 
+        int Bi, float Bx, int Cp, int Ci, float Cx)
+    csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, 
+        int Bi, double Bx, int Cp, int Ci, double Cx)
+    csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, long double Ax, 
+        int Bp, int Bi, long double Bx, int Cp, int Ci, 
+        long double Cx)
+    csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, 
+        int Bp, int Bi, npy_cfloat_wrapper Bx, 
+        int Cp, int Ci, npy_cfloat_wrapper Cx)
+    csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, 
+        int Bp, int Bi, npy_cdouble_wrapper Bx, 
+        int Cp, int Ci, npy_cdouble_wrapper Cx)
+    csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax, 
+        int Bp, int Bi, npy_clongdouble_wrapper Bx, 
+        int Cp, int Ci, npy_clongdouble_wrapper Cx)
     """
-      csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, signed char Ax,
-          int Bp, int Bi, signed char Bx, int Cp, int Ci,
-          signed char Cx)
-      csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, unsigned char Ax,
-          int Bp, int Bi, unsigned char Bx, int Cp,
-          int Ci, unsigned char Cx)
-      csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, short Ax, int Bp,
-          int Bi, short Bx, int Cp, int Ci, short Cx)
-      csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, unsigned short Ax,
-          int Bp, int Bi, unsigned short Bx, int Cp,
-          int Ci, unsigned short Cx)
-      csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp,
-          int Bi, int Bx, int Cp, int Ci, int Cx)
-      csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, unsigned int Ax,
-          int Bp, int Bi, unsigned int Bx, int Cp,
-          int Ci, unsigned int Cx)
-      csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, long long Ax,
-          int Bp, int Bi, long long Bx, int Cp, int Ci,
-          long long Cx)
-      csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax,
-          int Bp, int Bi, unsigned long long Bx,
-          int Cp, int Ci, unsigned long long Cx)
-      csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp,
-          int Bi, float Bx, int Cp, int Ci, float Cx)
-      csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp,
-          int Bi, double Bx, int Cp, int Ci, double Cx)
-      csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, long double Ax,
-          int Bp, int Bi, long double Bx, int Cp, int Ci,
-          long double Cx)
-      csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax,
-          int Bp, int Bi, npy_cfloat_wrapper Bx,
-          int Cp, int Ci, npy_cfloat_wrapper Cx)
-      csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax,
-          int Bp, int Bi, npy_cdouble_wrapper Bx,
-          int Cp, int Ci, npy_cdouble_wrapper Cx)
-      csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax,
-          int Bp, int Bi, npy_clongdouble_wrapper Bx,
-          int Cp, int Ci, npy_clongdouble_wrapper Cx)
-      """
-    return _csc.csc_eldiv_csc(*args)
+  return _csc.csc_eldiv_csc(*args)
 
 def csc_plus_csc(*args):
+  """
+    csc_plus_csc(int n_row, int n_col, int Ap, int Ai, signed char Ax, 
+        int Bp, int Bi, signed char Bx, int Cp, int Ci, 
+        signed char Cx)
+    csc_plus_csc(int n_row, int n_col, int Ap, int Ai, unsigned char Ax, 
+        int Bp, int Bi, unsigned char Bx, int Cp, 
+        int Ci, unsigned char Cx)
+    csc_plus_csc(int n_row, int n_col, int Ap, int Ai, short Ax, int Bp, 
+        int Bi, short Bx, int Cp, int Ci, short Cx)
+    csc_plus_csc(int n_row, int n_col, int Ap, int Ai, unsigned short Ax, 
+        int Bp, int Bi, unsigned short Bx, int Cp, 
+        int Ci, unsigned short Cx)
+    csc_plus_csc(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp, 
+        int Bi, int Bx, int Cp, int Ci, int Cx)
+    csc_plus_csc(int n_row, int n_col, int Ap, int Ai, unsigned int Ax, 
+        int Bp, int Bi, unsigned int Bx, int Cp, 
+        int Ci, unsigned int Cx)
+    csc_plus_csc(int n_row, int n_col, int Ap, int Ai, long long Ax, 
+        int Bp, int Bi, long long Bx, int Cp, int Ci, 
+        long long Cx)
+    csc_plus_csc(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax, 
+        int Bp, int Bi, unsigned long long Bx, 
+        int Cp, int Ci, unsigned long long Cx)
+    csc_plus_csc(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp, 
+        int Bi, float Bx, int Cp, int Ci, float Cx)
+    csc_plus_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, 
+        int Bi, double Bx, int Cp, int Ci, double Cx)
+    csc_plus_csc(int n_row, int n_col, int Ap, int Ai, long double Ax, 
+        int Bp, int Bi, long double Bx, int Cp, int Ci, 
+        long double Cx)
+    csc_plus_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, 
+        int Bp, int Bi, npy_cfloat_wrapper Bx, 
+        int Cp, int Ci, npy_cfloat_wrapper Cx)
+    csc_plus_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, 
+        int Bp, int Bi, npy_cdouble_wrapper Bx, 
+        int Cp, int Ci, npy_cdouble_wrapper Cx)
+    csc_plus_csc(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax, 
+        int Bp, int Bi, npy_clongdouble_wrapper Bx, 
+        int Cp, int Ci, npy_clongdouble_wrapper Cx)
     """
-      csc_plus_csc(int n_row, int n_col, int Ap, int Ai, signed char Ax,
-          int Bp, int Bi, signed char Bx, int Cp, int Ci,
-          signed char Cx)
-      csc_plus_csc(int n_row, int n_col, int Ap, int Ai, unsigned char Ax,
-          int Bp, int Bi, unsigned char Bx, int Cp,
-          int Ci, unsigned char Cx)
-      csc_plus_csc(int n_row, int n_col, int Ap, int Ai, short Ax, int Bp,
-          int Bi, short Bx, int Cp, int Ci, short Cx)
-      csc_plus_csc(int n_row, int n_col, int Ap, int Ai, unsigned short Ax,
-          int Bp, int Bi, unsigned short Bx, int Cp,
-          int Ci, unsigned short Cx)
-      csc_plus_csc(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp,
-          int Bi, int Bx, int Cp, int Ci, int Cx)
-      csc_plus_csc(int n_row, int n_col, int Ap, int Ai, unsigned int Ax,
-          int Bp, int Bi, unsigned int Bx, int Cp,
-          int Ci, unsigned int Cx)
-      csc_plus_csc(int n_row, int n_col, int Ap, int Ai, long long Ax,
-          int Bp, int Bi, long long Bx, int Cp, int Ci,
-          long long Cx)
-      csc_plus_csc(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax,
-          int Bp, int Bi, unsigned long long Bx,
-          int Cp, int Ci, unsigned long long Cx)
-      csc_plus_csc(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp,
-          int Bi, float Bx, int Cp, int Ci, float Cx)
-      csc_plus_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp,
-          int Bi, double Bx, int Cp, int Ci, double Cx)
-      csc_plus_csc(int n_row, int n_col, int Ap, int Ai, long double Ax,
-          int Bp, int Bi, long double Bx, int Cp, int Ci,
-          long double Cx)
-      csc_plus_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax,
-          int Bp, int Bi, npy_cfloat_wrapper Bx,
-          int Cp, int Ci, npy_cfloat_wrapper Cx)
-      csc_plus_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax,
-          int Bp, int Bi, npy_cdouble_wrapper Bx,
-          int Cp, int Ci, npy_cdouble_wrapper Cx)
-      csc_plus_csc(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax,
-          int Bp, int Bi, npy_clongdouble_wrapper Bx,
-          int Cp, int Ci, npy_clongdouble_wrapper Cx)
-      """
-    return _csc.csc_plus_csc(*args)
+  return _csc.csc_plus_csc(*args)
 
 def csc_minus_csc(*args):
+  """
+    csc_minus_csc(int n_row, int n_col, int Ap, int Ai, signed char Ax, 
+        int Bp, int Bi, signed char Bx, int Cp, int Ci, 
+        signed char Cx)
+    csc_minus_csc(int n_row, int n_col, int Ap, int Ai, unsigned char Ax, 
+        int Bp, int Bi, unsigned char Bx, int Cp, 
+        int Ci, unsigned char Cx)
+    csc_minus_csc(int n_row, int n_col, int Ap, int Ai, short Ax, int Bp, 
+        int Bi, short Bx, int Cp, int Ci, short Cx)
+    csc_minus_csc(int n_row, int n_col, int Ap, int Ai, unsigned short Ax, 
+        int Bp, int Bi, unsigned short Bx, int Cp, 
+        int Ci, unsigned short Cx)
+    csc_minus_csc(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp, 
+        int Bi, int Bx, int Cp, int Ci, int Cx)
+    csc_minus_csc(int n_row, int n_col, int Ap, int Ai, unsigned int Ax, 
+        int Bp, int Bi, unsigned int Bx, int Cp, 
+        int Ci, unsigned int Cx)
+    csc_minus_csc(int n_row, int n_col, int Ap, int Ai, long long Ax, 
+        int Bp, int Bi, long long Bx, int Cp, int Ci, 
+        long long Cx)
+    csc_minus_csc(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax, 
+        int Bp, int Bi, unsigned long long Bx, 
+        int Cp, int Ci, unsigned long long Cx)
+    csc_minus_csc(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp, 
+        int Bi, float Bx, int Cp, int Ci, float Cx)
+    csc_minus_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, 
+        int Bi, double Bx, int Cp, int Ci, double Cx)
+    csc_minus_csc(int n_row, int n_col, int Ap, int Ai, long double Ax, 
+        int Bp, int Bi, long double Bx, int Cp, int Ci, 
+        long double Cx)
+    csc_minus_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, 
+        int Bp, int Bi, npy_cfloat_wrapper Bx, 
+        int Cp, int Ci, npy_cfloat_wrapper Cx)
+    csc_minus_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, 
+        int Bp, int Bi, npy_cdouble_wrapper Bx, 
+        int Cp, int Ci, npy_cdouble_wrapper Cx)
+    csc_minus_csc(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax, 
+        int Bp, int Bi, npy_clongdouble_wrapper Bx, 
+        int Cp, int Ci, npy_clongdouble_wrapper Cx)
     """
-      csc_minus_csc(int n_row, int n_col, int Ap, int Ai, signed char Ax,
-          int Bp, int Bi, signed char Bx, int Cp, int Ci,
-          signed char Cx)
-      csc_minus_csc(int n_row, int n_col, int Ap, int Ai, unsigned char Ax,
-          int Bp, int Bi, unsigned char Bx, int Cp,
-          int Ci, unsigned char Cx)
-      csc_minus_csc(int n_row, int n_col, int Ap, int Ai, short Ax, int Bp,
-          int Bi, short Bx, int Cp, int Ci, short Cx)
-      csc_minus_csc(int n_row, int n_col, int Ap, int Ai, unsigned short Ax,
-          int Bp, int Bi, unsigned short Bx, int Cp,
-          int Ci, unsigned short Cx)
-      csc_minus_csc(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp,
-          int Bi, int Bx, int Cp, int Ci, int Cx)
-      csc_minus_csc(int n_row, int n_col, int Ap, int Ai, unsigned int Ax,
-          int Bp, int Bi, unsigned int Bx, int Cp,
-          int Ci, unsigned int Cx)
-      csc_minus_csc(int n_row, int n_col, int Ap, int Ai, long long Ax,
-          int Bp, int Bi, long long Bx, int Cp, int Ci,
-          long long Cx)
-      csc_minus_csc(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax,
-          int Bp, int Bi, unsigned long long Bx,
-          int Cp, int Ci, unsigned long long Cx)
-      csc_minus_csc(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp,
-          int Bi, float Bx, int Cp, int Ci, float Cx)
-      csc_minus_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp,
-          int Bi, double Bx, int Cp, int Ci, double Cx)
-      csc_minus_csc(int n_row, int n_col, int Ap, int Ai, long double Ax,
-          int Bp, int Bi, long double Bx, int Cp, int Ci,
-          long double Cx)
-      csc_minus_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax,
-          int Bp, int Bi, npy_cfloat_wrapper Bx,
-          int Cp, int Ci, npy_cfloat_wrapper Cx)
-      csc_minus_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax,
-          int Bp, int Bi, npy_cdouble_wrapper Bx,
-          int Cp, int Ci, npy_cdouble_wrapper Cx)
-      csc_minus_csc(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax,
-          int Bp, int Bi, npy_clongdouble_wrapper Bx,
-          int Cp, int Ci, npy_clongdouble_wrapper Cx)
-      """
-    return _csc.csc_minus_csc(*args)
+  return _csc.csc_minus_csc(*args)
+

Modified: trunk/scipy/sparse/sparsetools/csr.h
===================================================================
--- trunk/scipy/sparse/sparsetools/csr.h	2009-01-31 01:05:19 UTC (rev 5528)
+++ trunk/scipy/sparse/sparsetools/csr.h	2009-01-31 04:41:39 UTC (rev 5529)
@@ -620,57 +620,133 @@
 }
 
 
-
-
-
 /*
- * Compute C = A (bin_op) B for CSR matrices A,B
+ * Compute C = A (binary_op) B for CSR matrices A,B where the column 
+ * indices with the rows of A and B are not known to be sorted.
  *
- *   bin_op(x,y) - binary operator to apply elementwise
- *
+ * Refer to csr_binop_csr() for additional information
  *   
- * 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:
- *   I    Cp[n_row+1] - row pointer
- *   I    Cj[nnz(C)]  - column indices
- *   T    Cx[nnz(C)]  - nonzeros
- *   
  * Note:
  *   Output arrays Cp, Cj, and Cx must be preallocated
  *   If nnz(C) is not known a priori, a conservative bound is:
  *          nnz(C) <= nnz(A) + nnz(B)
  *
  * Note: 
+ *   Input:  A and B column indices are not assumed to be in sorted order 
+ *   Output: C column indices are not generally in sorted order
+ *           Cx will not contain any zero entries
+ *
+ */
+template <class I, class T, class binary_op>
+void csr_binop_csr_unsorted(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[],
+                                  I Cp[],
+                                  I Cj[],
+                                  T Cx[],
+                            const binary_op& op)
+{
+    //Method that works for unsorted indices
+
+    std::vector<I>  next(n_col,-1);
+    std::vector<T> A_row(n_col, 0);
+    std::vector<T> B_row(n_col, 0);
+
+    I nnz = 0;
+    
+    for(I i = 0; i < n_row; i++){
+        Cp[i] = nnz;
+
+        I head   = -2;
+        I length =  0;
+    
+        //add a row of A to A_row
+        I i_start = Ap[i];
+        I i_end   = Ap[i+1];
+        for(I jj = i_start; jj < i_end; jj++){
+            I j = Aj[jj];
+    
+            A_row[j] += Ax[jj];
+    
+            if(next[j] == -1){
+                next[j] = head;                       
+                head = j;
+                length++;
+            }
+        }
+    
+        //add a row of B to B_row
+        i_start = Bp[i];
+        i_end   = Bp[i+1];
+        for(I jj = i_start; jj < i_end; jj++){
+            I j = Bj[jj];
+    
+            B_row[j] += Bx[jj];
+    
+            if(next[j] == -1){
+                next[j] = head;                       
+                head = j;
+                length++;
+            }
+        }
+    
+   
+        // scan through columns where A or B has 
+        // contributed a non-zero entry
+        for(I jj = 0; jj < length; jj++){
+            T result = op(A_row[head], B_row[head]);
+    
+            if(result != 0){
+                Cj[nnz] = head;
+                Cx[nnz] = result;
+                nnz++;
+            }
+    
+            I temp = head;               
+            head = next[head];
+    
+            next[temp]  = -1;
+            A_row[temp] =  0;                             
+            B_row[temp] =  0;
+        }
+    }
+
+    Cp[n_row] = nnz;
+}
+
+
+/*
+ * Compute C = A (binary_op) B for CSR matrices A,B where the column 
+ * indices with the rows of A and B are known to be sorted.
+ *
+ * Refer to csr_binop_csr() for additional information
+ *
+ * Note: 
  *   Input:  A and B column indices are assumed to be in sorted order 
- *   Output: C column indices are assumed to be in sorted order
+ *   Output: C column indices will be in sorted order
  *           Cx will not contain any zero entries
  *
  */
-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 Aj[], 
-                   const T Ax[],
-                   const I Bp[],
-                   const I Bj[],
-                   const T Bx[],
-                         I Cp[],
-                         I Cj[],
-                         T Cx[],
-                   const bin_op& op)
+template <class I, class T, class binary_op>
+void csr_binop_csr_sorted(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[],
+                                I Cp[],
+                                I Cj[],
+                                T Cx[],
+                          const binary_op& op)
 {
     //Method that works for sorted indices
-    // assert( csr_has_sorted_indices(n_row,Ap,Aj) );
-    // assert( csr_has_sorted_indices(n_row,Bp,Bj) );
 
     Cp[0] = 0;
     I nnz = 0;
@@ -738,6 +814,60 @@
     }
 }
 
+
+/*
+ * Compute C = A (binary_op) B for CSR matrices A,B where the column 
+ * indices with the rows of A and B are known to be sorted.
+ *
+ *   binary_op(x,y) - 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[n_row+1] - row pointer
+ *   I    Bj[nnz(B)]  - column indices
+ *   T    Bx[nnz(B)]  - nonzeros
+ * Output Arguments:
+ *   I    Cp[n_row+1] - row pointer
+ *   I    Cj[nnz(C)]  - column indices
+ *   T    Cx[nnz(C)]  - nonzeros
+ *   
+ * Note:
+ *   Output arrays Cp, Cj, and Cx must be preallocated
+ *   If nnz(C) is not known a priori, a conservative bound is:
+ *          nnz(C) <= nnz(A) + nnz(B)
+ *
+ * Note: 
+ *   Input:  A and B column indices are not assumed to be in sorted order.
+ *   Output: C column indices will be in sorted if both A and B have sorted indices.
+ *           Cx will not contain any zero entries
+ *
+ */
+template <class I, class T, class binary_op>
+void csr_binop_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[],
+                         I Cp[],
+                         I Cj[],
+                         T Cx[],
+                   const binary_op& op)
+{
+    if (csr_has_sorted_indices(n_row,Ap,Aj) && csr_has_sorted_indices(n_row,Bp,Bj))
+        csr_binop_csr_sorted(n_row, n_col, Ap, Aj, Ax, Bp, Bj, Bx, Cp, Cj, Cx, op);
+    else
+        csr_binop_csr_unsorted(n_row, n_col, Ap, Aj, Ax, Bp, Bj, Bx, Cp, Cj, Cx, op);
+}
+
+
+
 /* element-wise binary operations*/
 template <class I, class T>
 void csr_elmul_csr(const I n_row, const I n_col, 

Modified: trunk/scipy/sparse/sparsetools/csr.py
===================================================================
--- trunk/scipy/sparse/sparsetools/csr.py	2009-01-31 01:05:19 UTC (rev 5528)
+++ trunk/scipy/sparse/sparsetools/csr.py	2009-01-31 04:41:39 UTC (rev 5529)
@@ -50,568 +50,569 @@
 
 
 def expandptr(*args):
-    """expandptr(int n_row, int Ap, int Bi)"""
-    return _csr.expandptr(*args)
+  """expandptr(int n_row, int Ap, int Bi)"""
+  return _csr.expandptr(*args)
 
 def csr_matmat_pass1(*args):
+  """
+    csr_matmat_pass1(int n_row, int n_col, int Ap, int Aj, int Bp, int Bj, 
+        int Cp)
     """
-      csr_matmat_pass1(int n_row, int n_col, int Ap, int Aj, int Bp, int Bj,
-          int Cp)
-      """
-    return _csr.csr_matmat_pass1(*args)
+  return _csr.csr_matmat_pass1(*args)
 
 def csr_count_blocks(*args):
-    """csr_count_blocks(int n_row, int n_col, int R, int C, int Ap, int Aj) -> int"""
-    return _csr.csr_count_blocks(*args)
+  """csr_count_blocks(int n_row, int n_col, int R, int C, int Ap, int Aj) -> int"""
+  return _csr.csr_count_blocks(*args)
 
 def csr_has_sorted_indices(*args):
-    """csr_has_sorted_indices(int n_row, int Ap, int Aj) -> bool"""
-    return _csr.csr_has_sorted_indices(*args)
+  """csr_has_sorted_indices(int n_row, int Ap, int Aj) -> bool"""
+  return _csr.csr_has_sorted_indices(*args)
 
 
 def csr_diagonal(*args):
+  """
+    csr_diagonal(int n_row, int n_col, int Ap, int Aj, signed char Ax, 
+        signed char Yx)
+    csr_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, 
+        unsigned char Yx)
+    csr_diagonal(int n_row, int n_col, int Ap, int Aj, short Ax, short Yx)
+    csr_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, 
+        unsigned short Yx)
+    csr_diagonal(int n_row, int n_col, int Ap, int Aj, int Ax, int Yx)
+    csr_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, 
+        unsigned int Yx)
+    csr_diagonal(int n_row, int n_col, int Ap, int Aj, long long Ax, 
+        long long Yx)
+    csr_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, 
+        unsigned long long Yx)
+    csr_diagonal(int n_row, int n_col, int Ap, int Aj, float Ax, float Yx)
+    csr_diagonal(int n_row, int n_col, int Ap, int Aj, double Ax, double Yx)
+    csr_diagonal(int n_row, int n_col, int Ap, int Aj, long double Ax, 
+        long double Yx)
+    csr_diagonal(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, 
+        npy_cfloat_wrapper Yx)
+    csr_diagonal(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, 
+        npy_cdouble_wrapper Yx)
+    csr_diagonal(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, 
+        npy_clongdouble_wrapper Yx)
     """
-      csr_diagonal(int n_row, int n_col, int Ap, int Aj, signed char Ax,
-          signed char Yx)
-      csr_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned char Ax,
-          unsigned char Yx)
-      csr_diagonal(int n_row, int n_col, int Ap, int Aj, short Ax, short Yx)
-      csr_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned short Ax,
-          unsigned short Yx)
-      csr_diagonal(int n_row, int n_col, int Ap, int Aj, int Ax, int Yx)
-      csr_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned int Ax,
-          unsigned int Yx)
-      csr_diagonal(int n_row, int n_col, int Ap, int Aj, long long Ax,
-          long long Yx)
-      csr_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax,
-          unsigned long long Yx)
-      csr_diagonal(int n_row, int n_col, int Ap, int Aj, float Ax, float Yx)
-      csr_diagonal(int n_row, int n_col, int Ap, int Aj, double Ax, double Yx)
-      csr_diagonal(int n_row, int n_col, int Ap, int Aj, long double Ax,
-          long double Yx)
-      csr_diagonal(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax,
-          npy_cfloat_wrapper Yx)
-      csr_diagonal(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax,
-          npy_cdouble_wrapper Yx)
-      csr_diagonal(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax,
-          npy_clongdouble_wrapper Yx)
-      """
-    return _csr.csr_diagonal(*args)
+  return _csr.csr_diagonal(*args)
 
 def csr_scale_rows(*args):
+  """
+    csr_scale_rows(int n_row, int n_col, int Ap, int Aj, signed char Ax, 
+        signed char Xx)
+    csr_scale_rows(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, 
+        unsigned char Xx)
+    csr_scale_rows(int n_row, int n_col, int Ap, int Aj, short Ax, short Xx)
+    csr_scale_rows(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, 
+        unsigned short Xx)
+    csr_scale_rows(int n_row, int n_col, int Ap, int Aj, int Ax, int Xx)
+    csr_scale_rows(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, 
+        unsigned int Xx)
+    csr_scale_rows(int n_row, int n_col, int Ap, int Aj, long long Ax, 
+        long long Xx)
+    csr_scale_rows(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, 
+        unsigned long long Xx)
+    csr_scale_rows(int n_row, int n_col, int Ap, int Aj, float Ax, float Xx)
+    csr_scale_rows(int n_row, int n_col, int Ap, int Aj, double Ax, double Xx)
+    csr_scale_rows(int n_row, int n_col, int Ap, int Aj, long double Ax, 
+        long double Xx)
+    csr_scale_rows(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, 
+        npy_cfloat_wrapper Xx)
+    csr_scale_rows(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, 
+        npy_cdouble_wrapper Xx)
+    csr_scale_rows(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, 
+        npy_clongdouble_wrapper Xx)
     """
-      csr_scale_rows(int n_row, int n_col, int Ap, int Aj, signed char Ax,
-          signed char Xx)
-      csr_scale_rows(int n_row, int n_col, int Ap, int Aj, unsigned char Ax,
-          unsigned char Xx)
-      csr_scale_rows(int n_row, int n_col, int Ap, int Aj, short Ax, short Xx)
-      csr_scale_rows(int n_row, int n_col, int Ap, int Aj, unsigned short Ax,
-          unsigned short Xx)
-      csr_scale_rows(int n_row, int n_col, int Ap, int Aj, int Ax, int Xx)
-      csr_scale_rows(int n_row, int n_col, int Ap, int Aj, unsigned int Ax,
-          unsigned int Xx)
-      csr_scale_rows(int n_row, int n_col, int Ap, int Aj, long long Ax,
-          long long Xx)
-      csr_scale_rows(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax,
-          unsigned long long Xx)
-      csr_scale_rows(int n_row, int n_col, int Ap, int Aj, float Ax, float Xx)
-      csr_scale_rows(int n_row, int n_col, int Ap, int Aj, double Ax, double Xx)
-      csr_scale_rows(int n_row, int n_col, int Ap, int Aj, long double Ax,
-          long double Xx)
-      csr_scale_rows(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax,
-          npy_cfloat_wrapper Xx)
-      csr_scale_rows(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax,
-          npy_cdouble_wrapper Xx)
-      csr_scale_rows(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax,
-          npy_clongdouble_wrapper Xx)
-      """
-    return _csr.csr_scale_rows(*args)
+  return _csr.csr_scale_rows(*args)
 
 def csr_scale_columns(*args):
+  """
+    csr_scale_columns(int n_row, int n_col, int Ap, int Aj, signed char Ax, 
+        signed char Xx)
+    csr_scale_columns(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, 
+        unsigned char Xx)
+    csr_scale_columns(int n_row, int n_col, int Ap, int Aj, short Ax, short Xx)
+    csr_scale_columns(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, 
+        unsigned short Xx)
+    csr_scale_columns(int n_row, int n_col, int Ap, int Aj, int Ax, int Xx)
+    csr_scale_columns(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, 
+        unsigned int Xx)
+    csr_scale_columns(int n_row, int n_col, int Ap, int Aj, long long Ax, 
+        long long Xx)
+    csr_scale_columns(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, 
+        unsigned long long Xx)
+    csr_scale_columns(int n_row, int n_col, int Ap, int Aj, float Ax, float Xx)
+    csr_scale_columns(int n_row, int n_col, int Ap, int Aj, double Ax, double Xx)
+    csr_scale_columns(int n_row, int n_col, int Ap, int Aj, long double Ax, 
+        long double Xx)
+    csr_scale_columns(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, 
+        npy_cfloat_wrapper Xx)
+    csr_scale_columns(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, 
+        npy_cdouble_wrapper Xx)
+    csr_scale_columns(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, 
+        npy_clongdouble_wrapper Xx)
     """
-      csr_scale_columns(int n_row, int n_col, int Ap, int Aj, signed char Ax,
-          signed char Xx)
-      csr_scale_columns(int n_row, int n_col, int Ap, int Aj, unsigned char Ax,
-          unsigned char Xx)
-      csr_scale_columns(int n_row, int n_col, int Ap, int Aj, short Ax, short Xx)
-      csr_scale_columns(int n_row, int n_col, int Ap, int Aj, unsigned short Ax,
-          unsigned short Xx)
-      csr_scale_columns(int n_row, int n_col, int Ap, int Aj, int Ax, int Xx)
-      csr_scale_columns(int n_row, int n_col, int Ap, int Aj, unsigned int Ax,
-          unsigned int Xx)
-      csr_scale_columns(int n_row, int n_col, int Ap, int Aj, long long Ax,
-          long long Xx)
-      csr_scale_columns(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax,
-          unsigned long long Xx)
-      csr_scale_columns(int n_row, int n_col, int Ap, int Aj, float Ax, float Xx)
-      csr_scale_columns(int n_row, int n_col, int Ap, int Aj, double Ax, double Xx)
-      csr_scale_columns(int n_row, int n_col, int Ap, int Aj, long double Ax,
-          long double Xx)
-      csr_scale_columns(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax,
-          npy_cfloat_wrapper Xx)
-      csr_scale_columns(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax,
-          npy_cdouble_wrapper Xx)
-      csr_scale_columns(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax,
-          npy_clongdouble_wrapper Xx)
-      """
-    return _csr.csr_scale_columns(*args)
+  return _csr.csr_scale_columns(*args)
 
 def csr_tocsc(*args):
+  """
+    csr_tocsc(int n_row, int n_col, int Ap, int Aj, signed char Ax, 
+        int Bp, int Bi, signed char Bx)
+    csr_tocsc(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, 
+        int Bp, int Bi, unsigned char Bx)
+    csr_tocsc(int n_row, int n_col, int Ap, int Aj, short Ax, int Bp, 
+        int Bi, short Bx)
+    csr_tocsc(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, 
+        int Bp, int Bi, unsigned short Bx)
+    csr_tocsc(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp, 
+        int Bi, int Bx)
+    csr_tocsc(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, 
+        int Bp, int Bi, unsigned int Bx)
+    csr_tocsc(int n_row, int n_col, int Ap, int Aj, long long Ax, 
+        int Bp, int Bi, long long Bx)
+    csr_tocsc(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, 
+        int Bp, int Bi, unsigned long long Bx)
+    csr_tocsc(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp, 
+        int Bi, float Bx)
+    csr_tocsc(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, 
+        int Bi, double Bx)
+    csr_tocsc(int n_row, int n_col, int Ap, int Aj, long double Ax, 
+        int Bp, int Bi, long double Bx)
+    csr_tocsc(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, 
+        int Bp, int Bi, npy_cfloat_wrapper Bx)
+    csr_tocsc(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, 
+        int Bp, int Bi, npy_cdouble_wrapper Bx)
+    csr_tocsc(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, 
+        int Bp, int Bi, npy_clongdouble_wrapper Bx)
     """
-      csr_tocsc(int n_row, int n_col, int Ap, int Aj, signed char Ax,
-          int Bp, int Bi, signed char Bx)
-      csr_tocsc(int n_row, int n_col, int Ap, int Aj, unsigned char Ax,
-          int Bp, int Bi, unsigned char Bx)
-      csr_tocsc(int n_row, int n_col, int Ap, int Aj, short Ax, int Bp,
-          int Bi, short Bx)
-      csr_tocsc(int n_row, int n_col, int Ap, int Aj, unsigned short Ax,
-          int Bp, int Bi, unsigned short Bx)
-      csr_tocsc(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp,
-          int Bi, int Bx)
-      csr_tocsc(int n_row, int n_col, int Ap, int Aj, unsigned int Ax,
-          int Bp, int Bi, unsigned int Bx)
-      csr_tocsc(int n_row, int n_col, int Ap, int Aj, long long Ax,
-          int Bp, int Bi, long long Bx)
-      csr_tocsc(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax,
-          int Bp, int Bi, unsigned long long Bx)
-      csr_tocsc(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp,
-          int Bi, float Bx)
-      csr_tocsc(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp,
-          int Bi, double Bx)
-      csr_tocsc(int n_row, int n_col, int Ap, int Aj, long double Ax,
-          int Bp, int Bi, long double Bx)
-      csr_tocsc(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax,
-          int Bp, int Bi, npy_cfloat_wrapper Bx)
-      csr_tocsc(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax,
-          int Bp, int Bi, npy_cdouble_wrapper Bx)
-      csr_tocsc(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax,
-          int Bp, int Bi, npy_clongdouble_wrapper Bx)
-      """
-    return _csr.csr_tocsc(*args)
+  return _csr.csr_tocsc(*args)
 
 def csr_tobsr(*args):
+  """
+    csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, 
+        signed char Ax, int Bp, int Bj, signed char Bx)
+    csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, 
+        unsigned char Ax, int Bp, int Bj, unsigned char Bx)
+    csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, 
+        short Ax, int Bp, int Bj, short Bx)
+    csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, 
+        unsigned short Ax, int Bp, int Bj, unsigned short Bx)
+    csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, 
+        int Ax, int Bp, int Bj, int Bx)
+    csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, 
+        unsigned int Ax, int Bp, int Bj, unsigned int Bx)
+    csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, 
+        long long Ax, int Bp, int Bj, long long Bx)
+    csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, 
+        unsigned long long Ax, int Bp, int Bj, unsigned long long Bx)
+    csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, 
+        float Ax, int Bp, int Bj, float Bx)
+    csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, 
+        double Ax, int Bp, int Bj, double Bx)
+    csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, 
+        long double Ax, int Bp, int Bj, long double Bx)
+    csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, 
+        npy_cfloat_wrapper Ax, int Bp, int Bj, npy_cfloat_wrapper Bx)
+    csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, 
+        npy_cdouble_wrapper Ax, int Bp, int Bj, npy_cdouble_wrapper Bx)
+    csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, 
+        npy_clongdouble_wrapper Ax, int Bp, int Bj, 
+        npy_clongdouble_wrapper Bx)
     """
-      csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-          signed char Ax, int Bp, int Bj, signed char Bx)
-      csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-          unsigned char Ax, int Bp, int Bj, unsigned char Bx)
-      csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-          short Ax, int Bp, int Bj, short Bx)
-      csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-          unsigned short Ax, int Bp, int Bj, unsigned short Bx)
-      csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-          int Ax, int Bp, int Bj, int Bx)
-      csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-          unsigned int Ax, int Bp, int Bj, unsigned int Bx)
-      csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-          long long Ax, int Bp, int Bj, long long Bx)
-      csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-          unsigned long long Ax, int Bp, int Bj, unsigned long long Bx)
-      csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-          float Ax, int Bp, int Bj, float Bx)
-      csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-          double Ax, int Bp, int Bj, double Bx)
-      csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-          long double Ax, int Bp, int Bj, long double Bx)
-      csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-          npy_cfloat_wrapper Ax, int Bp, int Bj, npy_cfloat_wrapper Bx)
-      csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-          npy_cdouble_wrapper Ax, int Bp, int Bj, npy_cdouble_wrapper Bx)
-      csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-          npy_clongdouble_wrapper Ax, int Bp, int Bj,
-          npy_clongdouble_wrapper Bx)
-      """
-    return _csr.csr_tobsr(*args)
+  return _csr.csr_tobsr(*args)
 
 def csr_matmat_pass2(*args):
+  """
+    csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, signed char Ax, 
+        int Bp, int Bj, signed char Bx, int Cp, int Cj, 
+        signed char Cx)
+    csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, 
+        int Bp, int Bj, unsigned char Bx, int Cp, 
+        int Cj, unsigned char Cx)
+    csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, short Ax, int Bp, 
+        int Bj, short Bx, int Cp, int Cj, short Cx)
+    csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, 
+        int Bp, int Bj, unsigned short Bx, int Cp, 
+        int Cj, unsigned short Cx)
+    csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp, 
+        int Bj, int Bx, int Cp, int Cj, int Cx)
+    csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, 
+        int Bp, int Bj, unsigned int Bx, int Cp, 
+        int Cj, unsigned int Cx)
+    csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, long long Ax, 
+        int Bp, int Bj, long long Bx, int Cp, int Cj, 
+        long long Cx)
+    csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, 
+        int Bp, int Bj, unsigned long long Bx, 
+        int Cp, int Cj, unsigned long long Cx)
+    csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp, 
+        int Bj, float Bx, int Cp, int Cj, float Cx)
+    csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, 
+        int Bj, double Bx, int Cp, int Cj, double Cx)
+    csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, long double Ax, 
+        int Bp, int Bj, long double Bx, int Cp, int Cj, 
+        long double Cx)
+    csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, 
+        int Bp, int Bj, npy_cfloat_wrapper Bx, 
+        int Cp, int Cj, npy_cfloat_wrapper Cx)
+    csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, 
+        int Bp, int Bj, npy_cdouble_wrapper Bx, 
+        int Cp, int Cj, npy_cdouble_wrapper Cx)
+    csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, 
+        int Bp, int Bj, npy_clongdouble_wrapper Bx, 
+        int Cp, int Cj, npy_clongdouble_wrapper Cx)
     """
-      csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, signed char Ax,
-          int Bp, int Bj, signed char Bx, int Cp, int Cj,
-          signed char Cx)
-      csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, unsigned char Ax,
-          int Bp, int Bj, unsigned char Bx, int Cp,
-          int Cj, unsigned char Cx)
-      csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, short Ax, int Bp,
-          int Bj, short Bx, int Cp, int Cj, short Cx)
-      csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, unsigned short Ax,
-          int Bp, int Bj, unsigned short Bx, int Cp,
-          int Cj, unsigned short Cx)
-      csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp,
-          int Bj, int Bx, int Cp, int Cj, int Cx)
-      csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, unsigned int Ax,
-          int Bp, int Bj, unsigned int Bx, int Cp,
-          int Cj, unsigned int Cx)
-      csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, long long Ax,
-          int Bp, int Bj, long long Bx, int Cp, int Cj,
-          long long Cx)
-      csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax,
-          int Bp, int Bj, unsigned long long Bx,
-          int Cp, int Cj, unsigned long long Cx)
-      csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp,
-          int Bj, float Bx, int Cp, int Cj, float Cx)
-      csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp,
-          int Bj, double Bx, int Cp, int Cj, double Cx)
-      csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, long double Ax,
-          int Bp, int Bj, long double Bx, int Cp, int Cj,
-          long double Cx)
-      csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax,
-          int Bp, int Bj, npy_cfloat_wrapper Bx,
-          int Cp, int Cj, npy_cfloat_wrapper Cx)
-      csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax,
-          int Bp, int Bj, npy_cdouble_wrapper Bx,
-          int Cp, int Cj, npy_cdouble_wrapper Cx)
-      csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax,
-          int Bp, int Bj, npy_clongdouble_wrapper Bx,
-          int Cp, int Cj, npy_clongdouble_wrapper Cx)
-      """
-    return _csr.csr_matmat_pass2(*args)
+  return _csr.csr_matmat_pass2(*args)
 
 def csr_matvec(*args):
+  """
+    csr_matvec(int n_row, int n_col, int Ap, int Aj, signed char Ax, 
+        signed char Xx, signed char Yx)
+    csr_matvec(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, 
+        unsigned char Xx, unsigned char Yx)
+    csr_matvec(int n_row, int n_col, int Ap, int Aj, short Ax, short Xx, 
+        short Yx)
+    csr_matvec(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, 
+        unsigned short Xx, unsigned short Yx)
+    csr_matvec(int n_row, int n_col, int Ap, int Aj, int Ax, int Xx, 
+        int Yx)
+    csr_matvec(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, 
+        unsigned int Xx, unsigned int Yx)
+    csr_matvec(int n_row, int n_col, int Ap, int Aj, long long Ax, 
+        long long Xx, long long Yx)
+    csr_matvec(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, 
+        unsigned long long Xx, unsigned long long Yx)
+    csr_matvec(int n_row, int n_col, int Ap, int Aj, float Ax, float Xx, 
+        float Yx)
+    csr_matvec(int n_row, int n_col, int Ap, int Aj, double Ax, double Xx, 
+        double Yx)
+    csr_matvec(int n_row, int n_col, int Ap, int Aj, long double Ax, 
+        long double Xx, long double Yx)
+    csr_matvec(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, 
+        npy_cfloat_wrapper Xx, npy_cfloat_wrapper Yx)
+    csr_matvec(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, 
+        npy_cdouble_wrapper Xx, npy_cdouble_wrapper Yx)
+    csr_matvec(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, 
+        npy_clongdouble_wrapper Xx, npy_clongdouble_wrapper Yx)
     """
-      csr_matvec(int n_row, int n_col, int Ap, int Aj, signed char Ax,
-          signed char Xx, signed char Yx)
-      csr_matvec(int n_row, int n_col, int Ap, int Aj, unsigned char Ax,
-          unsigned char Xx, unsigned char Yx)
-      csr_matvec(int n_row, int n_col, int Ap, int Aj, short Ax, short Xx,
-          short Yx)
-      csr_matvec(int n_row, int n_col, int Ap, int Aj, unsigned short Ax,
-          unsigned short Xx, unsigned short Yx)
-      csr_matvec(int n_row, int n_col, int Ap, int Aj, int Ax, int Xx,
-          int Yx)
-      csr_matvec(int n_row, int n_col, int Ap, int Aj, unsigned int Ax,
-          unsigned int Xx, unsigned int Yx)
-      csr_matvec(int n_row, int n_col, int Ap, int Aj, long long Ax,
-          long long Xx, long long Yx)
-      csr_matvec(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax,
-          unsigned long long Xx, unsigned long long Yx)
-      csr_matvec(int n_row, int n_col, int Ap, int Aj, float Ax, float Xx,
-          float Yx)
-      csr_matvec(int n_row, int n_col, int Ap, int Aj, double Ax, double Xx,
-          double Yx)
-      csr_matvec(int n_row, int n_col, int Ap, int Aj, long double Ax,
-          long double Xx, long double Yx)
-      csr_matvec(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax,
-          npy_cfloat_wrapper Xx, npy_cfloat_wrapper Yx)
-      csr_matvec(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax,
-          npy_cdouble_wrapper Xx, npy_cdouble_wrapper Yx)
-      csr_matvec(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax,
-          npy_clongdouble_wrapper Xx, npy_clongdouble_wrapper Yx)
-      """
-    return _csr.csr_matvec(*args)
+  return _csr.csr_matvec(*args)
 
 def csr_matvecs(*args):
+  """
+    csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, signed char Ax, 
+        signed char Xx, signed char Yx)
+    csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, unsigned char Ax, 
+        unsigned char Xx, unsigned char Yx)
+    csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, short Ax, 
+        short Xx, short Yx)
+    csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, unsigned short Ax, 
+        unsigned short Xx, unsigned short Yx)
+    csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, int Ax, 
+        int Xx, int Yx)
+    csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, unsigned int Ax, 
+        unsigned int Xx, unsigned int Yx)
+    csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, long long Ax, 
+        long long Xx, long long Yx)
+    csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, unsigned long long Ax, 
+        unsigned long long Xx, 
+        unsigned long long Yx)
+    csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, float Ax, 
+        float Xx, float Yx)
+    csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, double Ax, 
+        double Xx, double Yx)
+    csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, long double Ax, 
+        long double Xx, long double Yx)
+    csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, npy_cfloat_wrapper Ax, 
+        npy_cfloat_wrapper Xx, 
+        npy_cfloat_wrapper Yx)
+    csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, npy_cdouble_wrapper Ax, 
+        npy_cdouble_wrapper Xx, 
+        npy_cdouble_wrapper Yx)
+    csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, npy_clongdouble_wrapper Ax, 
+        npy_clongdouble_wrapper Xx, 
+        npy_clongdouble_wrapper Yx)
     """
-      csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, signed char Ax,
-          signed char Xx, signed char Yx)
-      csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, unsigned char Ax,
-          unsigned char Xx, unsigned char Yx)
-      csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, short Ax,
-          short Xx, short Yx)
-      csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, unsigned short Ax,
-          unsigned short Xx, unsigned short Yx)
-      csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, int Ax,
-          int Xx, int Yx)
-      csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, unsigned int Ax,
-          unsigned int Xx, unsigned int Yx)
-      csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, long long Ax,
-          long long Xx, long long Yx)
-      csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, unsigned long long Ax,
-          unsigned long long Xx,
-          unsigned long long Yx)
-      csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, float Ax,
-          float Xx, float Yx)
-      csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, double Ax,
-          double Xx, double Yx)
-      csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, long double Ax,
-          long double Xx, long double Yx)
-      csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, npy_cfloat_wrapper Ax,
-          npy_cfloat_wrapper Xx,
-          npy_cfloat_wrapper Yx)
-      csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, npy_cdouble_wrapper Ax,
-          npy_cdouble_wrapper Xx,
-          npy_cdouble_wrapper Yx)
-      csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, npy_clongdouble_wrapper Ax,
-          npy_clongdouble_wrapper Xx,
-          npy_clongdouble_wrapper Yx)
-      """
-    return _csr.csr_matvecs(*args)
+  return _csr.csr_matvecs(*args)
 
 def csr_elmul_csr(*args):
+  """
+    csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, signed char Ax, 
+        int Bp, int Bj, signed char Bx, int Cp, int Cj, 
+        signed char Cx)
+    csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, 
+        int Bp, int Bj, unsigned char Bx, int Cp, 
+        int Cj, unsigned char Cx)
+    csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, short Ax, int Bp, 
+        int Bj, short Bx, int Cp, int Cj, short Cx)
+    csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, 
+        int Bp, int Bj, unsigned short Bx, int Cp, 
+        int Cj, unsigned short Cx)
+    csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp, 
+        int Bj, int Bx, int Cp, int Cj, int Cx)
+    csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, 
+        int Bp, int Bj, unsigned int Bx, int Cp, 
+        int Cj, unsigned int Cx)
+    csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, long long Ax, 
+        int Bp, int Bj, long long Bx, int Cp, int Cj, 
+        long long Cx)
+    csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, 
+        int Bp, int Bj, unsigned long long Bx, 
+        int Cp, int Cj, unsigned long long Cx)
+    csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp, 
+        int Bj, float Bx, int Cp, int Cj, float Cx)
+    csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, 
+        int Bj, double Bx, int Cp, int Cj, double Cx)
+    csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, long double Ax, 
+        int Bp, int Bj, long double Bx, int Cp, int Cj, 
+        long double Cx)
+    csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, 
+        int Bp, int Bj, npy_cfloat_wrapper Bx, 
+        int Cp, int Cj, npy_cfloat_wrapper Cx)
+    csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, 
+        int Bp, int Bj, npy_cdouble_wrapper Bx, 
+        int Cp, int Cj, npy_cdouble_wrapper Cx)
+    csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, 
+        int Bp, int Bj, npy_clongdouble_wrapper Bx, 
+        int Cp, int Cj, npy_clongdouble_wrapper Cx)
     """
-      csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, signed char Ax,
-          int Bp, int Bj, signed char Bx, int Cp, int Cj,
-          signed char Cx)
-      csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, unsigned char Ax,
-          int Bp, int Bj, unsigned char Bx, int Cp,
-          int Cj, unsigned char Cx)
-      csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, short Ax, int Bp,
-          int Bj, short Bx, int Cp, int Cj, short Cx)
-      csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, unsigned short Ax,
-          int Bp, int Bj, unsigned short Bx, int Cp,
-          int Cj, unsigned short Cx)
-      csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp,
-          int Bj, int Bx, int Cp, int Cj, int Cx)
-      csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, unsigned int Ax,
-          int Bp, int Bj, unsigned int Bx, int Cp,
-          int Cj, unsigned int Cx)
-      csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, long long Ax,
-          int Bp, int Bj, long long Bx, int Cp, int Cj,
-          long long Cx)
-      csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax,
-          int Bp, int Bj, unsigned long long Bx,
-          int Cp, int Cj, unsigned long long Cx)
-      csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp,
-          int Bj, float Bx, int Cp, int Cj, float Cx)
-      csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp,
-          int Bj, double Bx, int Cp, int Cj, double Cx)
-      csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, long double Ax,
-          int Bp, int Bj, long double Bx, int Cp, int Cj,
-          long double Cx)
-      csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax,
-          int Bp, int Bj, npy_cfloat_wrapper Bx,
-          int Cp, int Cj, npy_cfloat_wrapper Cx)
-      csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax,
-          int Bp, int Bj, npy_cdouble_wrapper Bx,
-          int Cp, int Cj, npy_cdouble_wrapper Cx)
-      csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax,
-          int Bp, int Bj, npy_clongdouble_wrapper Bx,
-          int Cp, int Cj, npy_clongdouble_wrapper Cx)
-      """
-    return _csr.csr_elmul_csr(*args)
+  return _csr.csr_elmul_csr(*args)
 
 def csr_eldiv_csr(*args):
+  """
+    csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, signed char Ax, 
+        int Bp, int Bj, signed char Bx, int Cp, int Cj, 
+        signed char Cx)
+    csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, 
+        int Bp, int Bj, unsigned char Bx, int Cp, 
+        int Cj, unsigned char Cx)
+    csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, short Ax, int Bp, 
+        int Bj, short Bx, int Cp, int Cj, short Cx)
+    csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, 
+        int Bp, int Bj, unsigned short Bx, int Cp, 
+        int Cj, unsigned short Cx)
+    csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp, 
+        int Bj, int Bx, int Cp, int Cj, int Cx)
+    csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, 
+        int Bp, int Bj, unsigned int Bx, int Cp, 
+        int Cj, unsigned int Cx)
+    csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, long long Ax, 
+        int Bp, int Bj, long long Bx, int Cp, int Cj, 
+        long long Cx)
+    csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, 
+        int Bp, int Bj, unsigned long long Bx, 
+        int Cp, int Cj, unsigned long long Cx)
+    csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp, 
+        int Bj, float Bx, int Cp, int Cj, float Cx)
+    csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, 
+        int Bj, double Bx, int Cp, int Cj, double Cx)
+    csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, long double Ax, 
+        int Bp, int Bj, long double Bx, int Cp, int Cj, 
+        long double Cx)
+    csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, 
+        int Bp, int Bj, npy_cfloat_wrapper Bx, 
+        int Cp, int Cj, npy_cfloat_wrapper Cx)
+    csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, 
+        int Bp, int Bj, npy_cdouble_wrapper Bx, 
+        int Cp, int Cj, npy_cdouble_wrapper Cx)
+    csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, 
+        int Bp, int Bj, npy_clongdouble_wrapper Bx, 
+        int Cp, int Cj, npy_clongdouble_wrapper Cx)
     """
-      csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, signed char Ax,
-          int Bp, int Bj, signed char Bx, int Cp, int Cj,
-          signed char Cx)
-      csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, unsigned char Ax,
-          int Bp, int Bj, unsigned char Bx, int Cp,
-          int Cj, unsigned char Cx)
-      csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, short Ax, int Bp,
-          int Bj, short Bx, int Cp, int Cj, short Cx)
-      csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, unsigned short Ax,
-          int Bp, int Bj, unsigned short Bx, int Cp,
-          int Cj, unsigned short Cx)
-      csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp,
-          int Bj, int Bx, int Cp, int Cj, int Cx)
-      csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, unsigned int Ax,
-          int Bp, int Bj, unsigned int Bx, int Cp,
-          int Cj, unsigned int Cx)
-      csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, long long Ax,
-          int Bp, int Bj, long long Bx, int Cp, int Cj,
-          long long Cx)
-      csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax,
-          int Bp, int Bj, unsigned long long Bx,
-          int Cp, int Cj, unsigned long long Cx)
-      csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp,
-          int Bj, float Bx, int Cp, int Cj, float Cx)
-      csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp,
-          int Bj, double Bx, int Cp, int Cj, double Cx)
-      csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, long double Ax,
-          int Bp, int Bj, long double Bx, int Cp, int Cj,
-          long double Cx)
-      csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax,
-          int Bp, int Bj, npy_cfloat_wrapper Bx,
-          int Cp, int Cj, npy_cfloat_wrapper Cx)
-      csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax,
-          int Bp, int Bj, npy_cdouble_wrapper Bx,
-          int Cp, int Cj, npy_cdouble_wrapper Cx)
-      csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax,
-          int Bp, int Bj, npy_clongdouble_wrapper Bx,
-          int Cp, int Cj, npy_clongdouble_wrapper Cx)
-      """
-    return _csr.csr_eldiv_csr(*args)
+  return _csr.csr_eldiv_csr(*args)
 
 def csr_plus_csr(*args):
+  """
+    csr_plus_csr(int n_row, int n_col, int Ap, int Aj, signed char Ax, 
+        int Bp, int Bj, signed char Bx, int Cp, int Cj, 
+        signed char Cx)
+    csr_plus_csr(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, 
+        int Bp, int Bj, unsigned char Bx, int Cp, 
+        int Cj, unsigned char Cx)
+    csr_plus_csr(int n_row, int n_col, int Ap, int Aj, short Ax, int Bp, 
+        int Bj, short Bx, int Cp, int Cj, short Cx)
+    csr_plus_csr(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, 
+        int Bp, int Bj, unsigned short Bx, int Cp, 
+        int Cj, unsigned short Cx)
+    csr_plus_csr(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp, 
+        int Bj, int Bx, int Cp, int Cj, int Cx)
+    csr_plus_csr(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, 
+        int Bp, int Bj, unsigned int Bx, int Cp, 
+        int Cj, unsigned int Cx)
+    csr_plus_csr(int n_row, int n_col, int Ap, int Aj, long long Ax, 
+        int Bp, int Bj, long long Bx, int Cp, int Cj, 
+        long long Cx)
+    csr_plus_csr(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, 
+        int Bp, int Bj, unsigned long long Bx, 
+        int Cp, int Cj, unsigned long long Cx)
+    csr_plus_csr(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp, 
+        int Bj, float Bx, int Cp, int Cj, float Cx)
+    csr_plus_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, 
+        int Bj, double Bx, int Cp, int Cj, double Cx)
+    csr_plus_csr(int n_row, int n_col, int Ap, int Aj, long double Ax, 
+        int Bp, int Bj, long double Bx, int Cp, int Cj, 
+        long double Cx)
+    csr_plus_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, 
+        int Bp, int Bj, npy_cfloat_wrapper Bx, 
+        int Cp, int Cj, npy_cfloat_wrapper Cx)
+    csr_plus_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, 
+        int Bp, int Bj, npy_cdouble_wrapper Bx, 
+        int Cp, int Cj, npy_cdouble_wrapper Cx)
+    csr_plus_csr(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, 
+        int Bp, int Bj, npy_clongdouble_wrapper Bx, 
+        int Cp, int Cj, npy_clongdouble_wrapper Cx)
     """
-      csr_plus_csr(int n_row, int n_col, int Ap, int Aj, signed char Ax,
-          int Bp, int Bj, signed char Bx, int Cp, int Cj,
-          signed char Cx)
-      csr_plus_csr(int n_row, int n_col, int Ap, int Aj, unsigned char Ax,
-          int Bp, int Bj, unsigned char Bx, int Cp,
-          int Cj, unsigned char Cx)
-      csr_plus_csr(int n_row, int n_col, int Ap, int Aj, short Ax, int Bp,
-          int Bj, short Bx, int Cp, int Cj, short Cx)
-      csr_plus_csr(int n_row, int n_col, int Ap, int Aj, unsigned short Ax,
-          int Bp, int Bj, unsigned short Bx, int Cp,
-          int Cj, unsigned short Cx)
-      csr_plus_csr(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp,
-          int Bj, int Bx, int Cp, int Cj, int Cx)
-      csr_plus_csr(int n_row, int n_col, int Ap, int Aj, unsigned int Ax,
-          int Bp, int Bj, unsigned int Bx, int Cp,
-          int Cj, unsigned int Cx)
-      csr_plus_csr(int n_row, int n_col, int Ap, int Aj, long long Ax,
-          int Bp, int Bj, long long Bx, int Cp, int Cj,
-          long long Cx)
-      csr_plus_csr(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax,
-          int Bp, int Bj, unsigned long long Bx,
-          int Cp, int Cj, unsigned long long Cx)
-      csr_plus_csr(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp,
-          int Bj, float Bx, int Cp, int Cj, float Cx)
-      csr_plus_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp,
-          int Bj, double Bx, int Cp, int Cj, double Cx)
-      csr_plus_csr(int n_row, int n_col, int Ap, int Aj, long double Ax,
-          int Bp, int Bj, long double Bx, int Cp, int Cj,
-          long double Cx)
-      csr_plus_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax,
-          int Bp, int Bj, npy_cfloat_wrapper Bx,
-          int Cp, int Cj, npy_cfloat_wrapper Cx)
-      csr_plus_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax,
-          int Bp, int Bj, npy_cdouble_wrapper Bx,
-          int Cp, int Cj, npy_cdouble_wrapper Cx)
-      csr_plus_csr(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax,
-          int Bp, int Bj, npy_clongdouble_wrapper Bx,
-          int Cp, int Cj, npy_clongdouble_wrapper Cx)
-      """
-    return _csr.csr_plus_csr(*args)
+  return _csr.csr_plus_csr(*args)
 
 def csr_minus_csr(*args):
+  """
+    csr_minus_csr(int n_row, int n_col, int Ap, int Aj, signed char Ax, 
+        int Bp, int Bj, signed char Bx, int Cp, int Cj, 
+        signed char Cx)
+    csr_minus_csr(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, 
+        int Bp, int Bj, unsigned char Bx, int Cp, 
+        int Cj, unsigned char Cx)
+    csr_minus_csr(int n_row, int n_col, int Ap, int Aj, short Ax, int Bp, 
+        int Bj, short Bx, int Cp, int Cj, short Cx)
+    csr_minus_csr(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, 
+        int Bp, int Bj, unsigned short Bx, int Cp, 
+        int Cj, unsigned short Cx)
+    csr_minus_csr(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp, 
+        int Bj, int Bx, int Cp, int Cj, int Cx)
+    csr_minus_csr(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, 
+        int Bp, int Bj, unsigned int Bx, int Cp, 
+        int Cj, unsigned int Cx)
+    csr_minus_csr(int n_row, int n_col, int Ap, int Aj, long long Ax, 
+        int Bp, int Bj, long long Bx, int Cp, int Cj, 
+        long long Cx)
+    csr_minus_csr(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, 
+        int Bp, int Bj, unsigned long long Bx, 
+        int Cp, int Cj, unsigned long long Cx)
+    csr_minus_csr(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp, 
+        int Bj, float Bx, int Cp, int Cj, float Cx)
+    csr_minus_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, 
+        int Bj, double Bx, int Cp, int Cj, double Cx)
+    csr_minus_csr(int n_row, int n_col, int Ap, int Aj, long double Ax, 
+        int Bp, int Bj, long double Bx, int Cp, int Cj, 
+        long double Cx)
+    csr_minus_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, 
+        int Bp, int Bj, npy_cfloat_wrapper Bx, 
+        int Cp, int Cj, npy_cfloat_wrapper Cx)
+    csr_minus_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, 
+        int Bp, int Bj, npy_cdouble_wrapper Bx, 
+        int Cp, int Cj, npy_cdouble_wrapper Cx)
+    csr_minus_csr(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, 
+        int Bp, int Bj, npy_clongdouble_wrapper Bx, 
+        int Cp, int Cj, npy_clongdouble_wrapper Cx)
     """
-      csr_minus_csr(int n_row, int n_col, int Ap, int Aj, signed char Ax,
-          int Bp, int Bj, signed char Bx, int Cp, int Cj,
-          signed char Cx)
-      csr_minus_csr(int n_row, int n_col, int Ap, int Aj, unsigned char Ax,
-          int Bp, int Bj, unsigned char Bx, int Cp,
-          int Cj, unsigned char Cx)
-      csr_minus_csr(int n_row, int n_col, int Ap, int Aj, short Ax, int Bp,
-          int Bj, short Bx, int Cp, int Cj, short Cx)
-      csr_minus_csr(int n_row, int n_col, int Ap, int Aj, unsigned short Ax,
-          int Bp, int Bj, unsigned short Bx, int Cp,
-          int Cj, unsigned short Cx)
-      csr_minus_csr(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp,
-          int Bj, int Bx, int Cp, int Cj, int Cx)
-      csr_minus_csr(int n_row, int n_col, int Ap, int Aj, unsigned int Ax,
-          int Bp, int Bj, unsigned int Bx, int Cp,
-          int Cj, unsigned int Cx)
-      csr_minus_csr(int n_row, int n_col, int Ap, int Aj, long long Ax,
-          int Bp, int Bj, long long Bx, int Cp, int Cj,
-          long long Cx)
-      csr_minus_csr(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax,
-          int Bp, int Bj, unsigned long long Bx,
-          int Cp, int Cj, unsigned long long Cx)
-      csr_minus_csr(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp,
-          int Bj, float Bx, int Cp, int Cj, float Cx)
-      csr_minus_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp,
-          int Bj, double Bx, int Cp, int Cj, double Cx)
-      csr_minus_csr(int n_row, int n_col, int Ap, int Aj, long double Ax,
-          int Bp, int Bj, long double Bx, int Cp, int Cj,
-          long double Cx)
-      csr_minus_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax,
-          int Bp, int Bj, npy_cfloat_wrapper Bx,
-          int Cp, int Cj, npy_cfloat_wrapper Cx)
-      csr_minus_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax,
-          int Bp, int Bj, npy_cdouble_wrapper Bx,
-          int Cp, int Cj, npy_cdouble_wrapper Cx)
-      csr_minus_csr(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax,
-          int Bp, int Bj, npy_clongdouble_wrapper Bx,
-          int Cp, int Cj, npy_clongdouble_wrapper Cx)
-      """
-    return _csr.csr_minus_csr(*args)
+  return _csr.csr_minus_csr(*args)
 
 def csr_sort_indices(*args):
+  """
+    csr_sort_indices(int n_row, int Ap, int Aj, signed char Ax)
+    csr_sort_indices(int n_row, int Ap, int Aj, unsigned char Ax)
+    csr_sort_indices(int n_row, int Ap, int Aj, short Ax)
+    csr_sort_indices(int n_row, int Ap, int Aj, unsigned short Ax)
+    csr_sort_indices(int n_row, int Ap, int Aj, int Ax)
+    csr_sort_indices(int n_row, int Ap, int Aj, unsigned int Ax)
+    csr_sort_indices(int n_row, int Ap, int Aj, long long Ax)
+    csr_sort_indices(int n_row, int Ap, int Aj, unsigned long long Ax)
+    csr_sort_indices(int n_row, int Ap, int Aj, float Ax)
+    csr_sort_indices(int n_row, int Ap, int Aj, double Ax)
+    csr_sort_indices(int n_row, int Ap, int Aj, long double Ax)
+    csr_sort_indices(int n_row, int Ap, int Aj, npy_cfloat_wrapper Ax)
+    csr_sort_indices(int n_row, int Ap, int Aj, npy_cdouble_wrapper Ax)
+    csr_sort_indices(int n_row, int Ap, int Aj, npy_clongdouble_wrapper Ax)
     """
-      csr_sort_indices(int n_row, int Ap, int Aj, signed char Ax)
-      csr_sort_indices(int n_row, int Ap, int Aj, unsigned char Ax)
-      csr_sort_indices(int n_row, int Ap, int Aj, short Ax)
-      csr_sort_indices(int n_row, int Ap, int Aj, unsigned short Ax)
-      csr_sort_indices(int n_row, int Ap, int Aj, int Ax)
-      csr_sort_indices(int n_row, int Ap, int Aj, unsigned int Ax)
-      csr_sort_indices(int n_row, int Ap, int Aj, long long Ax)
-      csr_sort_indices(int n_row, int Ap, int Aj, unsigned long long Ax)
-      csr_sort_indices(int n_row, int Ap, int Aj, float Ax)
-      csr_sort_indices(int n_row, int Ap, int Aj, double Ax)
-      csr_sort_indices(int n_row, int Ap, int Aj, long double Ax)
-      csr_sort_indices(int n_row, int Ap, int Aj, npy_cfloat_wrapper Ax)
-      csr_sort_indices(int n_row, int Ap, int Aj, npy_cdouble_wrapper Ax)
-      csr_sort_indices(int n_row, int Ap, int Aj, npy_clongdouble_wrapper Ax)
-      """
-    return _csr.csr_sort_indices(*args)
+  return _csr.csr_sort_indices(*args)
 
 def csr_eliminate_zeros(*args):
+  """
+    csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, signed char Ax)
+    csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, unsigned char Ax)
+    csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, short Ax)
+    csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, unsigned short Ax)
+    csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, int Ax)
+    csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, unsigned int Ax)
+    csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, long long Ax)
+    csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax)
+    csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, float Ax)
+    csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, double Ax)
+    csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, long double Ax)
+    csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax)
+    csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax)
+    csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax)
     """
-      csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, signed char Ax)
-      csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, unsigned char Ax)
-      csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, short Ax)
-      csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, unsigned short Ax)
-      csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, int Ax)
-      csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, unsigned int Ax)
-      csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, long long Ax)
-      csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax)
-      csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, float Ax)
-      csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, double Ax)
-      csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, long double Ax)
-      csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax)
-      csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax)
-      csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax)
-      """
-    return _csr.csr_eliminate_zeros(*args)
+  return _csr.csr_eliminate_zeros(*args)
 
 def csr_sum_duplicates(*args):
+  """
+    csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, signed char Ax)
+    csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, unsigned char Ax)
+    csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, short Ax)
+    csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, unsigned short Ax)
+    csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, int Ax)
+    csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, unsigned int Ax)
+    csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, long long Ax)
+    csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax)
+    csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, float Ax)
+    csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, double Ax)
+    csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, long double Ax)
+    csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax)
+    csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax)
+    csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax)
     """
-      csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, signed char Ax)
-      csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, unsigned char Ax)
-      csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, short Ax)
-      csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, unsigned short Ax)
-      csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, int Ax)
-      csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, unsigned int Ax)
-      csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, long long Ax)
-      csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax)
-      csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, float Ax)
-      csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, double Ax)
-      csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, long double Ax)
-      csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax)
-      csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax)
-      csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax)
-      """
-    return _csr.csr_sum_duplicates(*args)
+  return _csr.csr_sum_duplicates(*args)
 
 def get_csr_submatrix(*args):
+  """
+    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, signed char Ax, 
+        int ir0, int ir1, int ic0, int ic1, std::vector<(int)> Bp, 
+        std::vector<(int)> Bj, std::vector<(signed char)> Bx)
+    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, 
+        int ir0, int ir1, int ic0, int ic1, std::vector<(int)> Bp, 
+        std::vector<(int)> Bj, std::vector<(unsigned char)> Bx)
+    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, short Ax, int ir0, 
+        int ir1, int ic0, int ic1, std::vector<(int)> Bp, 
+        std::vector<(int)> Bj, std::vector<(short)> Bx)
+    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, 
+        int ir0, int ir1, int ic0, int ic1, std::vector<(int)> Bp, 
+        std::vector<(int)> Bj, std::vector<(unsigned short)> Bx)
+    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, int Ax, int ir0, 
+        int ir1, int ic0, int ic1, std::vector<(int)> Bp, 
+        std::vector<(int)> Bj, std::vector<(int)> Bx)
+    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, 
+        int ir0, int ir1, int ic0, int ic1, std::vector<(int)> Bp, 
+        std::vector<(int)> Bj, std::vector<(unsigned int)> Bx)
+    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, long long Ax, 
+        int ir0, int ir1, int ic0, int ic1, std::vector<(int)> Bp, 
+        std::vector<(int)> Bj, std::vector<(long long)> Bx)
+    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, 
+        int ir0, int ir1, int ic0, int ic1, 
+        std::vector<(int)> Bp, std::vector<(int)> Bj, 
+        std::vector<(unsigned long long)> Bx)
+    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, float Ax, int ir0, 
+        int ir1, int ic0, int ic1, std::vector<(int)> Bp, 
+        std::vector<(int)> Bj, std::vector<(float)> Bx)
+    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, double Ax, int ir0, 
+        int ir1, int ic0, int ic1, std::vector<(int)> Bp, 
+        std::vector<(int)> Bj, std::vector<(double)> Bx)
+    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, long double Ax, 
+        int ir0, int ir1, int ic0, int ic1, std::vector<(int)> Bp, 
+        std::vector<(int)> Bj, std::vector<(long double)> Bx)
+    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, 
+        int ir0, int ir1, int ic0, int ic1, 
+        std::vector<(int)> Bp, std::vector<(int)> Bj, 
+        std::vector<(npy_cfloat_wrapper)> Bx)
+    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, 
+        int ir0, int ir1, int ic0, int ic1, 
+        std::vector<(int)> Bp, std::vector<(int)> Bj, 
+        std::vector<(npy_cdouble_wrapper)> Bx)
+    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, 
+        int ir0, int ir1, int ic0, int ic1, 
+        std::vector<(int)> Bp, std::vector<(int)> Bj, 
+        std::vector<(npy_clongdouble_wrapper)> Bx)
     """
-      get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, signed char Ax,
-          int ir0, int ir1, int ic0, int ic1, std::vector<(int)> Bp,
-          std::vector<(int)> Bj, std::vector<(signed char)> Bx)
-      get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, unsigned char Ax,
-          int ir0, int ir1, int ic0, int ic1, std::vector<(int)> Bp,
-          std::vector<(int)> Bj, std::vector<(unsigned char)> Bx)
-      get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, short Ax, int ir0,
-          int ir1, int ic0, int ic1, std::vector<(int)> Bp,
-          std::vector<(int)> Bj, std::vector<(short)> Bx)
-      get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, unsigned short Ax,
-          int ir0, int ir1, int ic0, int ic1, std::vector<(int)> Bp,
-          std::vector<(int)> Bj, std::vector<(unsigned short)> Bx)
-      get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, int Ax, int ir0,
-          int ir1, int ic0, int ic1, std::vector<(int)> Bp,
-          std::vector<(int)> Bj, std::vector<(int)> Bx)
-      get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, unsigned int Ax,
-          int ir0, int ir1, int ic0, int ic1, std::vector<(int)> Bp,
-          std::vector<(int)> Bj, std::vector<(unsigned int)> Bx)
-      get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, long long Ax,
-          int ir0, int ir1, int ic0, int ic1, std::vector<(int)> Bp,
-          std::vector<(int)> Bj, std::vector<(long long)> Bx)
-      get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax,
-          int ir0, int ir1, int ic0, int ic1,
-          std::vector<(int)> Bp, std::vector<(int)> Bj,
-          std::vector<(unsigned long long)> Bx)
-      get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, float Ax, int ir0,
-          int ir1, int ic0, int ic1, std::vector<(int)> Bp,
-          std::vector<(int)> Bj, std::vector<(float)> Bx)
-      get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, double Ax, int ir0,
-          int ir1, int ic0, int ic1, std::vector<(int)> Bp,
-          std::vector<(int)> Bj, std::vector<(double)> Bx)
-      get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, long double Ax,
-          int ir0, int ir1, int ic0, int ic1, std::vector<(int)> Bp,
-          std::vector<(int)> Bj, std::vector<(long double)> Bx)
-      get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax,
-          int ir0, int ir1, int ic0, int ic1,
-          std::vector<(int)> Bp, std::vector<(int)> Bj,
-          std::vector<(npy_cfloat_wrapper)> Bx)
-      get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax,
-          int ir0, int ir1, int ic0, int ic1,
-          std::vector<(int)> Bp, std::vector<(int)> Bj,
-          std::vector<(npy_cdouble_wrapper)> Bx)
-      get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax,
-          int ir0, int ir1, int ic0, int ic1,
-          std::vector<(int)> Bp, std::vector<(int)> Bj,
-          std::vector<(npy_clongdouble_wrapper)> Bx)
-      """
-    return _csr.get_csr_submatrix(*args)
+  return _csr.get_csr_submatrix(*args)
+

Modified: trunk/scipy/sparse/tests/test_base.py
===================================================================
--- trunk/scipy/sparse/tests/test_base.py	2009-01-31 01:05:19 UTC (rev 5528)
+++ trunk/scipy/sparse/tests/test_base.py	2009-01-31 04:41:39 UTC (rev 5529)
@@ -984,7 +984,6 @@
         csr = csr_matrix((data, indices, indptr))
         assert_array_equal(csr.shape,(3,6))
 
-
     def test_sort_indices(self):
         data    = arange( 5 )
         indices = array( [7, 2, 1, 5, 4] )
@@ -1006,8 +1005,20 @@
         assert_array_equal(asp.data,[1, 2, 3])
         assert_array_equal(asp.todense(),bsp.todense())
 
+    def test_unsorted_arithmetic(self):
+        data    = arange( 5 )
+        indices = array( [7, 2, 1, 5, 4] )
+        indptr  = array( [0, 3, 5] )
+        asp = csr_matrix( (data, indices, indptr), shape=(2,10) )
+        data    = arange( 6 )
+        indices = array( [8, 1, 5, 7, 2, 4] )
+        indptr  = array( [0, 2, 6] )
+        bsp = csr_matrix( (data, indices, indptr), shape=(2,10) )
+        assert_equal((asp + bsp).todense(), asp.todense() + bsp.todense())
 
 
+
+
 class TestCSC(_TestCommon, _TestGetSet, _TestSolve,
         _TestInplaceArithmetic, _TestArithmetic,
         _TestHorizSlicing, _TestVertSlicing, _TestBothSlicing,
@@ -1079,6 +1090,16 @@
         assert_array_equal(asp.indices,[1, 2, 7, 4, 5])
         assert_array_equal(asp.todense(),bsp.todense())
 
+    def test_unsorted_arithmetic(self):
+        data    = arange( 5 )
+        indices = array( [7, 2, 1, 5, 4] )
+        indptr  = array( [0, 3, 5] )
+        asp = csc_matrix( (data, indices, indptr), shape=(10,2) )
+        data    = arange( 6 )
+        indices = array( [8, 1, 5, 7, 2, 4] )
+        indptr  = array( [0, 2, 6] )
+        bsp = csc_matrix( (data, indices, indptr), shape=(10,2) )
+        assert_equal((asp + bsp).todense(), asp.todense() + bsp.todense())
 
 class TestDOK(_TestCommon, _TestGetSet, _TestSolve, TestCase):
     spmatrix = dok_matrix



More information about the Scipy-svn mailing list