diff --git a/scipy/sparse/sparsetools/bsr.py b/scipy/sparse/sparsetools/bsr.py
index 8b5789a..c1ced9d 100644
--- a/scipy/sparse/sparsetools/bsr.py
+++ b/scipy/sparse/sparsetools/bsr.py
@@ -1,9 +1,10 @@
 # This file was automatically generated by SWIG (http://www.swig.org).
-# Version 2.0.1+capsulehack
+# Version 2.0.7
 #
 # Do not make changes to this file unless you know what you are doing--modify
 # the SWIG interface file instead.
-# This file is compatible with both classic and new-style classes.
+
+
 
 from sys import version_info
 if version_info >= (2,6,0):
@@ -39,7 +40,7 @@ def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
             return
     method = class_type.__swig_setmethods__.get(name,None)
     if method: return method(self,value)
-    if (not static) or hasattr(self,name):
+    if (not static):
         self.__dict__[name] = value
     else:
         raise AttributeError("You cannot add attributes to %s" % self)
@@ -66,484 +67,488 @@ except AttributeError:
     _newclass = 0
 
 
+
 def bsr_diagonal(*args):
+  """
+    bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        signed char const [] Ax, signed char [] Yx)
+    bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned char const [] Ax, unsigned char [] Yx)
+    bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        short const [] Ax, short [] Yx)
+    bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned short const [] Ax, unsigned short [] Yx)
+    bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        int const [] Ax, int [] Yx)
+    bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned int const [] Ax, unsigned int [] Yx)
+    bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long long const [] Ax, long long [] Yx)
+    bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned long long const [] Ax, unsigned long long [] Yx)
+    bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        float const [] Ax, float [] Yx)
+    bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        double const [] Ax, double [] Yx)
+    bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long double const [] Ax, long double [] Yx)
+    bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cfloat_wrapper const [] Ax, npy_cfloat_wrapper [] Yx)
+    bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cdouble_wrapper const [] Ax, npy_cdouble_wrapper [] Yx)
+    bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_clongdouble_wrapper const [] Ax, npy_clongdouble_wrapper [] Yx)
     """
-    bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        signed char Ax, signed char Yx)
-    bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned char Ax, unsigned char Yx)
-    bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        short Ax, short Yx)
-    bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned short Ax, unsigned short Yx)
-    bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        int Ax, int Yx)
-    bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned int Ax, unsigned int Yx)
-    bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        long long Ax, long long Yx)
-    bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned long long Ax, unsigned long long Yx)
-    bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        float Ax, float Yx)
-    bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        double Ax, double Yx)
-    bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        long double Ax, long double Yx)
-    bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        npy_cfloat_wrapper Ax, npy_cfloat_wrapper Yx)
-    bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        npy_cdouble_wrapper Ax, npy_cdouble_wrapper Yx)
-    bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        npy_clongdouble_wrapper Ax, npy_clongdouble_wrapper Yx)
-    """
-    return _bsr.bsr_diagonal(*args)
+  return _bsr.bsr_diagonal(*args)
 
 def bsr_scale_rows(*args):
+  """
+    bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        signed char [] Ax, signed char const [] Xx)
+    bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned char [] Ax, unsigned char const [] Xx)
+    bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        short [] Ax, short const [] Xx)
+    bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned short [] Ax, unsigned short const [] Xx)
+    bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        int [] Ax, int const [] Xx)
+    bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned int [] Ax, unsigned int const [] Xx)
+    bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long long [] Ax, long long const [] Xx)
+    bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned long long [] Ax, unsigned long long const [] Xx)
+    bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        float [] Ax, float const [] Xx)
+    bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        double [] Ax, double const [] Xx)
+    bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long double [] Ax, long double const [] Xx)
+    bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cfloat_wrapper [] Ax, npy_cfloat_wrapper const [] Xx)
+    bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cdouble_wrapper [] Ax, npy_cdouble_wrapper const [] Xx)
+    bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_clongdouble_wrapper [] Ax, npy_clongdouble_wrapper const [] Xx)
     """
-    bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        signed char Ax, signed char Xx)
-    bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned char Ax, unsigned char Xx)
-    bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        short Ax, short Xx)
-    bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned short Ax, unsigned short Xx)
-    bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        int Ax, int Xx)
-    bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned int Ax, unsigned int Xx)
-    bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        long long Ax, long long Xx)
-    bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned long long Ax, unsigned long long Xx)
-    bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        float Ax, float Xx)
-    bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        double Ax, double Xx)
-    bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        long double Ax, long double Xx)
-    bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        npy_cfloat_wrapper Ax, npy_cfloat_wrapper Xx)
-    bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        npy_cdouble_wrapper Ax, npy_cdouble_wrapper Xx)
-    bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        npy_clongdouble_wrapper Ax, npy_clongdouble_wrapper Xx)
-    """
-    return _bsr.bsr_scale_rows(*args)
+  return _bsr.bsr_scale_rows(*args)
 
 def bsr_scale_columns(*args):
+  """
+    bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        signed char [] Ax, signed char const [] Xx)
+    bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned char [] Ax, unsigned char const [] Xx)
+    bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        short [] Ax, short const [] Xx)
+    bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned short [] Ax, unsigned short const [] Xx)
+    bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        int [] Ax, int const [] Xx)
+    bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned int [] Ax, unsigned int const [] Xx)
+    bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long long [] Ax, long long const [] Xx)
+    bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned long long [] Ax, unsigned long long const [] Xx)
+    bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        float [] Ax, float const [] Xx)
+    bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        double [] Ax, double const [] Xx)
+    bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long double [] Ax, long double const [] Xx)
+    bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cfloat_wrapper [] Ax, npy_cfloat_wrapper const [] Xx)
+    bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cdouble_wrapper [] Ax, npy_cdouble_wrapper const [] Xx)
+    bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_clongdouble_wrapper [] Ax, npy_clongdouble_wrapper const [] Xx)
     """
-    bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        signed char Ax, signed char Xx)
-    bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned char Ax, unsigned char Xx)
-    bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        short Ax, short Xx)
-    bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned short Ax, unsigned short Xx)
-    bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        int Ax, int Xx)
-    bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned int Ax, unsigned int Xx)
-    bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        long long Ax, long long Xx)
-    bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned long long Ax, unsigned long long Xx)
-    bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        float Ax, float Xx)
-    bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        double Ax, double Xx)
-    bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        long double Ax, long double Xx)
-    bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        npy_cfloat_wrapper Ax, npy_cfloat_wrapper Xx)
-    bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        npy_cdouble_wrapper Ax, npy_cdouble_wrapper Xx)
-    bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        npy_clongdouble_wrapper Ax, npy_clongdouble_wrapper Xx)
-    """
-    return _bsr.bsr_scale_columns(*args)
+  return _bsr.bsr_scale_columns(*args)
 
 def bsr_transpose(*args):
+  """
+    bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        signed char const [] Ax, int [] Bp, int [] Bj, signed char [] Bx)
+    bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned char const [] Ax, int [] Bp, int [] Bj, unsigned char [] Bx)
+    bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        short const [] Ax, int [] Bp, int [] Bj, short [] Bx)
+    bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned short const [] Ax, int [] Bp, int [] Bj, unsigned short [] Bx)
+    bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        int const [] Ax, int [] Bp, int [] Bj, int [] Bx)
+    bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned int const [] Ax, int [] Bp, int [] Bj, unsigned int [] Bx)
+    bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long long const [] Ax, int [] Bp, int [] Bj, long long [] Bx)
+    bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned long long const [] Ax, int [] Bp, int [] Bj, unsigned long long [] Bx)
+    bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        float const [] Ax, int [] Bp, int [] Bj, float [] Bx)
+    bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        double const [] Ax, int [] Bp, int [] Bj, double [] Bx)
+    bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long double const [] Ax, int [] Bp, int [] Bj, long double [] Bx)
+    bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cfloat_wrapper const [] Ax, int [] Bp, int [] Bj, npy_cfloat_wrapper [] Bx)
+    bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cdouble_wrapper const [] Ax, int [] Bp, int [] Bj, npy_cdouble_wrapper [] Bx)
+    bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_clongdouble_wrapper const [] Ax, int [] Bp, int [] Bj, npy_clongdouble_wrapper [] Bx)
     """
-    bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        signed char Ax, int Bp, int Bj, signed char Bx)
-    bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned char Ax, int Bp, int Bj, unsigned char Bx)
-    bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        short Ax, int Bp, int Bj, short Bx)
-    bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned short Ax, int Bp, int Bj, unsigned short Bx)
-    bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        int Ax, int Bp, int Bj, int Bx)
-    bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned int Ax, int Bp, int Bj, unsigned int Bx)
-    bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        long long Ax, int Bp, int Bj, long long Bx)
-    bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned long long Ax, int Bp, int Bj, unsigned long long Bx)
-    bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        float Ax, int Bp, int Bj, float Bx)
-    bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        double Ax, int Bp, int Bj, double Bx)
-    bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        long double Ax, int Bp, int Bj, long double Bx)
-    bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        npy_cfloat_wrapper Ax, int Bp, int Bj, npy_cfloat_wrapper Bx)
-    bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        npy_cdouble_wrapper Ax, int Bp, int Bj, npy_cdouble_wrapper Bx)
-    bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        npy_clongdouble_wrapper Ax, int Bp, int Bj,
-        npy_clongdouble_wrapper Bx)
-    """
-    return _bsr.bsr_transpose(*args)
+  return _bsr.bsr_transpose(*args)
 
 def bsr_matmat_pass2(*args):
+  """
+    bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, 
+        int const [] Aj, signed char const [] Ax, int const [] Bp, int const [] Bj, 
+        signed char const [] Bx, int [] Cp, int [] Cj, signed char [] Cx)
+    bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, 
+        int const [] Aj, unsigned char const [] Ax, int const [] Bp, int const [] Bj, 
+        unsigned char const [] Bx, int [] Cp, int [] Cj, unsigned char [] Cx)
+    bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, 
+        int const [] Aj, short const [] Ax, int const [] Bp, int const [] Bj, 
+        short const [] Bx, int [] Cp, int [] Cj, short [] Cx)
+    bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, 
+        int const [] Aj, unsigned short const [] Ax, int const [] Bp, int const [] Bj, 
+        unsigned short const [] Bx, int [] Cp, int [] Cj, unsigned short [] Cx)
+    bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, 
+        int const [] Aj, int const [] Ax, int const [] Bp, int const [] Bj, 
+        int const [] Bx, int [] Cp, int [] Cj, int [] Cx)
+    bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, 
+        int const [] Aj, unsigned int const [] Ax, int const [] Bp, int const [] Bj, 
+        unsigned int const [] Bx, int [] Cp, int [] Cj, unsigned int [] Cx)
+    bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, 
+        int const [] Aj, long long const [] Ax, int const [] Bp, int const [] Bj, 
+        long long const [] Bx, int [] Cp, int [] Cj, long long [] Cx)
+    bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, 
+        int const [] Aj, unsigned long long const [] Ax, int const [] Bp, 
+        int const [] Bj, unsigned long long const [] Bx, int [] Cp, int [] Cj, unsigned long long [] Cx)
+    bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, 
+        int const [] Aj, float const [] Ax, int const [] Bp, int const [] Bj, 
+        float const [] Bx, int [] Cp, int [] Cj, float [] Cx)
+    bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, 
+        int const [] Aj, double const [] Ax, int const [] Bp, int const [] Bj, 
+        double const [] Bx, int [] Cp, int [] Cj, double [] Cx)
+    bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, 
+        int const [] Aj, long double const [] Ax, int const [] Bp, int const [] Bj, 
+        long double const [] Bx, int [] Cp, int [] Cj, long double [] Cx)
+    bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, 
+        int const [] Aj, npy_cfloat_wrapper const [] Ax, int const [] Bp, 
+        int const [] Bj, npy_cfloat_wrapper const [] Bx, int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)
+    bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, 
+        int const [] Aj, npy_cdouble_wrapper const [] Ax, int const [] Bp, 
+        int const [] Bj, npy_cdouble_wrapper const [] Bx, int [] Cp, int [] Cj, 
+        npy_cdouble_wrapper [] Cx)
+    bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, 
+        int const [] Aj, npy_clongdouble_wrapper const [] Ax, int const [] Bp, 
+        int const [] Bj, npy_clongdouble_wrapper const [] Bx, int [] Cp, int [] Cj, 
+        npy_clongdouble_wrapper [] Cx)
     """
-    bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap,
-        int Aj, signed char Ax, int Bp, int Bj, signed char Bx,
-        int Cp, int Cj, signed char Cx)
-    bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap,
-        int Aj, unsigned char Ax, int Bp, int Bj, unsigned char Bx,
-        int Cp, int Cj, unsigned char Cx)
-    bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap,
-        int Aj, short Ax, int Bp, int Bj, short Bx,
-        int Cp, int Cj, short Cx)
-    bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap,
-        int Aj, unsigned short Ax, int Bp, int Bj,
-        unsigned short Bx, int Cp, int Cj, unsigned short Cx)
-    bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap,
-        int Aj, int Ax, int Bp, int Bj, int Bx, int Cp,
-        int Cj, int Cx)
-    bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap,
-        int Aj, unsigned int Ax, int Bp, int Bj, unsigned int Bx,
-        int Cp, int Cj, unsigned int Cx)
-    bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap,
-        int Aj, long long Ax, int Bp, int Bj, long long Bx,
-        int Cp, int Cj, long long Cx)
-    bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap,
-        int Aj, unsigned long long Ax, int Bp, int Bj,
-        unsigned long long Bx, int Cp, int Cj, unsigned long long Cx)
-    bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap,
-        int Aj, float Ax, int Bp, int Bj, float Bx,
-        int Cp, int Cj, float Cx)
-    bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap,
-        int Aj, double Ax, int Bp, int Bj, double Bx,
-        int Cp, int Cj, double Cx)
-    bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap,
-        int Aj, long double Ax, int Bp, int Bj, long double Bx,
-        int Cp, int Cj, long double Cx)
-    bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap,
-        int Aj, npy_cfloat_wrapper Ax, int Bp, int Bj,
-        npy_cfloat_wrapper Bx, int Cp, int Cj, npy_cfloat_wrapper Cx)
-    bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap,
-        int Aj, npy_cdouble_wrapper Ax, int Bp, int Bj,
-        npy_cdouble_wrapper Bx, int Cp, int Cj,
-        npy_cdouble_wrapper Cx)
-    bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, 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 _bsr.bsr_matmat_pass2(*args)
+  return _bsr.bsr_matmat_pass2(*args)
 
 def bsr_matvec(*args):
+  """
+    bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        signed char const [] Ax, signed char const [] Xx, signed char [] Yx)
+    bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned char const [] Ax, unsigned char const [] Xx, unsigned char [] Yx)
+    bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        short const [] Ax, short const [] Xx, short [] Yx)
+    bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned short const [] Ax, unsigned short const [] Xx, unsigned short [] Yx)
+    bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        int const [] Ax, int const [] Xx, int [] Yx)
+    bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned int const [] Ax, unsigned int const [] Xx, unsigned int [] Yx)
+    bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long long const [] Ax, long long const [] Xx, long long [] Yx)
+    bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned long long const [] Ax, unsigned long long const [] Xx, 
+        unsigned long long [] Yx)
+    bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        float const [] Ax, float const [] Xx, float [] Yx)
+    bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        double const [] Ax, double const [] Xx, double [] Yx)
+    bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long double const [] Ax, long double const [] Xx, long double [] Yx)
+    bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cfloat_wrapper const [] Ax, npy_cfloat_wrapper const [] Xx, 
+        npy_cfloat_wrapper [] Yx)
+    bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cdouble_wrapper const [] Ax, npy_cdouble_wrapper const [] Xx, 
+        npy_cdouble_wrapper [] Yx)
+    bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_clongdouble_wrapper const [] Ax, npy_clongdouble_wrapper const [] Xx, 
+        npy_clongdouble_wrapper [] Yx)
     """
-    bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        signed char Ax, signed char Xx, signed char Yx)
-    bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned char Ax, unsigned char Xx, unsigned char Yx)
-    bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        short Ax, short Xx, short Yx)
-    bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned short Ax, unsigned short Xx, unsigned short Yx)
-    bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        int Ax, int Xx, int Yx)
-    bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned int Ax, unsigned int Xx, unsigned int Yx)
-    bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        long long Ax, long long Xx, long long Yx)
-    bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned long long Ax, unsigned long long Xx,
-        unsigned long long Yx)
-    bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        float Ax, float Xx, float Yx)
-    bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        double Ax, double Xx, double Yx)
-    bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        long double Ax, long double Xx, long double Yx)
-    bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        npy_cfloat_wrapper Ax, npy_cfloat_wrapper Xx,
-        npy_cfloat_wrapper Yx)
-    bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        npy_cdouble_wrapper Ax, npy_cdouble_wrapper Xx,
-        npy_cdouble_wrapper Yx)
-    bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        npy_clongdouble_wrapper Ax, npy_clongdouble_wrapper Xx,
-        npy_clongdouble_wrapper Yx)
-    """
-    return _bsr.bsr_matvec(*args)
+  return _bsr.bsr_matvec(*args)
 
 def bsr_matvecs(*args):
+  """
+    bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, 
+        int const [] Aj, signed char const [] Ax, signed char const [] Xx, 
+        signed char [] Yx)
+    bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, 
+        int const [] Aj, unsigned char const [] Ax, unsigned char const [] Xx, 
+        unsigned char [] Yx)
+    bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, 
+        int const [] Aj, short const [] Ax, short const [] Xx, short [] Yx)
+    bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, 
+        int const [] Aj, unsigned short const [] Ax, unsigned short const [] Xx, 
+        unsigned short [] Yx)
+    bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, 
+        int const [] Aj, int const [] Ax, int const [] Xx, int [] Yx)
+    bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, 
+        int const [] Aj, unsigned int const [] Ax, unsigned int const [] Xx, 
+        unsigned int [] Yx)
+    bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, 
+        int const [] Aj, long long const [] Ax, long long const [] Xx, 
+        long long [] Yx)
+    bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, 
+        int const [] Aj, unsigned long long const [] Ax, unsigned long long const [] Xx, 
+        unsigned long long [] Yx)
+    bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, 
+        int const [] Aj, float const [] Ax, float const [] Xx, float [] Yx)
+    bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, 
+        int const [] Aj, double const [] Ax, double const [] Xx, double [] Yx)
+    bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, 
+        int const [] Aj, long double const [] Ax, long double const [] Xx, 
+        long double [] Yx)
+    bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, 
+        int const [] Aj, npy_cfloat_wrapper const [] Ax, npy_cfloat_wrapper const [] Xx, 
+        npy_cfloat_wrapper [] Yx)
+    bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, 
+        int const [] Aj, npy_cdouble_wrapper const [] Ax, npy_cdouble_wrapper const [] Xx, 
+        npy_cdouble_wrapper [] Yx)
+    bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, 
+        int const [] Aj, npy_clongdouble_wrapper const [] Ax, npy_clongdouble_wrapper const [] Xx, 
+        npy_clongdouble_wrapper [] Yx)
     """
-    bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap,
-        int Aj, signed char Ax, signed char Xx,
-        signed char Yx)
-    bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap,
-        int Aj, unsigned char Ax, unsigned char Xx,
-        unsigned char Yx)
-    bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap,
-        int Aj, short Ax, short Xx, short Yx)
-    bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap,
-        int Aj, unsigned short Ax, unsigned short Xx,
-        unsigned short Yx)
-    bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap,
-        int Aj, int Ax, int Xx, int Yx)
-    bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap,
-        int Aj, unsigned int Ax, unsigned int Xx,
-        unsigned int Yx)
-    bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap,
-        int Aj, long long Ax, long long Xx, long long Yx)
-    bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap,
-        int Aj, unsigned long long Ax, unsigned long long Xx,
-        unsigned long long Yx)
-    bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap,
-        int Aj, float Ax, float Xx, float Yx)
-    bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap,
-        int Aj, double Ax, double Xx, double Yx)
-    bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap,
-        int Aj, long double Ax, long double Xx,
-        long double Yx)
-    bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap,
-        int Aj, npy_cfloat_wrapper Ax, npy_cfloat_wrapper Xx,
-        npy_cfloat_wrapper Yx)
-    bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap,
-        int Aj, npy_cdouble_wrapper Ax, npy_cdouble_wrapper Xx,
-        npy_cdouble_wrapper Yx)
-    bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap,
-        int Aj, npy_clongdouble_wrapper Ax, npy_clongdouble_wrapper Xx,
-        npy_clongdouble_wrapper Yx)
-    """
-    return _bsr.bsr_matvecs(*args)
+  return _bsr.bsr_matvecs(*args)
 
 def bsr_elmul_bsr(*args):
+  """
+    bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        signed char const [] Ax, int const [] Bp, int const [] Bj, signed char const [] Bx, 
+        int [] Cp, int [] Cj, signed char [] Cx)
+    bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned char const [] Ax, int const [] Bp, int const [] Bj, unsigned char const [] Bx, 
+        int [] Cp, int [] Cj, unsigned char [] Cx)
+    bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        short const [] Ax, int const [] Bp, int const [] Bj, short const [] Bx, 
+        int [] Cp, int [] Cj, short [] Cx)
+    bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned short const [] Ax, int const [] Bp, int const [] Bj, 
+        unsigned short const [] Bx, int [] Cp, int [] Cj, unsigned short [] Cx)
+    bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        int const [] Ax, int const [] Bp, int const [] Bj, int const [] Bx, 
+        int [] Cp, int [] Cj, int [] Cx)
+    bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned int const [] Ax, int const [] Bp, int const [] Bj, unsigned int const [] Bx, 
+        int [] Cp, int [] Cj, unsigned int [] Cx)
+    bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long long const [] Ax, int const [] Bp, int const [] Bj, long long const [] Bx, 
+        int [] Cp, int [] Cj, long long [] Cx)
+    bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned long long const [] Ax, int const [] Bp, int const [] Bj, 
+        unsigned long long const [] Bx, int [] Cp, int [] Cj, unsigned long long [] Cx)
+    bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        float const [] Ax, int const [] Bp, int const [] Bj, float const [] Bx, 
+        int [] Cp, int [] Cj, float [] Cx)
+    bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        double const [] Ax, int const [] Bp, int const [] Bj, double const [] Bx, 
+        int [] Cp, int [] Cj, double [] Cx)
+    bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long double const [] Ax, int const [] Bp, int const [] Bj, long double const [] Bx, 
+        int [] Cp, int [] Cj, long double [] Cx)
+    bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cfloat_wrapper const [] Ax, int const [] Bp, int const [] Bj, 
+        npy_cfloat_wrapper const [] Bx, int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)
+    bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cdouble_wrapper const [] Ax, int const [] Bp, int const [] Bj, 
+        npy_cdouble_wrapper const [] Bx, int [] Cp, int [] Cj, npy_cdouble_wrapper [] Cx)
+    bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_clongdouble_wrapper const [] Ax, int const [] Bp, int const [] Bj, 
+        npy_clongdouble_wrapper const [] Bx, int [] Cp, int [] Cj, npy_clongdouble_wrapper [] Cx)
     """
-    bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        signed char Ax, int Bp, int Bj, signed char Bx,
-        int Cp, int Cj, signed char Cx)
-    bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        unsigned char Ax, int Bp, int Bj, unsigned char Bx,
-        int Cp, int Cj, unsigned char Cx)
-    bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        short Ax, int Bp, int Bj, short Bx, int Cp,
-        int Cj, short Cx)
-    bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        unsigned short Ax, int Bp, int Bj, unsigned short Bx,
-        int Cp, int Cj, unsigned short Cx)
-    bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        int Ax, int Bp, int Bj, int Bx, int Cp, int Cj,
-        int Cx)
-    bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        unsigned int Ax, int Bp, int Bj, unsigned int Bx,
-        int Cp, int Cj, unsigned int Cx)
-    bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        long long Ax, int Bp, int Bj, long long Bx,
-        int Cp, int Cj, long long Cx)
-    bsr_elmul_bsr(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,
-        int Cp, int Cj, unsigned long long Cx)
-    bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        float Ax, int Bp, int Bj, float Bx, int Cp,
-        int Cj, float Cx)
-    bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        double Ax, int Bp, int Bj, double Bx, int Cp,
-        int Cj, double Cx)
-    bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        long double Ax, int Bp, int Bj, long double Bx,
-        int Cp, int Cj, long double Cx)
-    bsr_elmul_bsr(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,
-        int Cp, int Cj, npy_cfloat_wrapper Cx)
-    bsr_elmul_bsr(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,
-        int Cp, int Cj, npy_cdouble_wrapper Cx)
-    bsr_elmul_bsr(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, int Cp, int Cj, npy_clongdouble_wrapper Cx)
-    """
-    return _bsr.bsr_elmul_bsr(*args)
+  return _bsr.bsr_elmul_bsr(*args)
 
 def bsr_eldiv_bsr(*args):
+  """
+    bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        signed char const [] Ax, int const [] Bp, int const [] Bj, signed char const [] Bx, 
+        int [] Cp, int [] Cj, signed char [] Cx)
+    bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned char const [] Ax, int const [] Bp, int const [] Bj, unsigned char const [] Bx, 
+        int [] Cp, int [] Cj, unsigned char [] Cx)
+    bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        short const [] Ax, int const [] Bp, int const [] Bj, short const [] Bx, 
+        int [] Cp, int [] Cj, short [] Cx)
+    bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned short const [] Ax, int const [] Bp, int const [] Bj, 
+        unsigned short const [] Bx, int [] Cp, int [] Cj, unsigned short [] Cx)
+    bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        int const [] Ax, int const [] Bp, int const [] Bj, int const [] Bx, 
+        int [] Cp, int [] Cj, int [] Cx)
+    bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned int const [] Ax, int const [] Bp, int const [] Bj, unsigned int const [] Bx, 
+        int [] Cp, int [] Cj, unsigned int [] Cx)
+    bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long long const [] Ax, int const [] Bp, int const [] Bj, long long const [] Bx, 
+        int [] Cp, int [] Cj, long long [] Cx)
+    bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned long long const [] Ax, int const [] Bp, int const [] Bj, 
+        unsigned long long const [] Bx, int [] Cp, int [] Cj, unsigned long long [] Cx)
+    bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        float const [] Ax, int const [] Bp, int const [] Bj, float const [] Bx, 
+        int [] Cp, int [] Cj, float [] Cx)
+    bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        double const [] Ax, int const [] Bp, int const [] Bj, double const [] Bx, 
+        int [] Cp, int [] Cj, double [] Cx)
+    bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long double const [] Ax, int const [] Bp, int const [] Bj, long double const [] Bx, 
+        int [] Cp, int [] Cj, long double [] Cx)
+    bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cfloat_wrapper const [] Ax, int const [] Bp, int const [] Bj, 
+        npy_cfloat_wrapper const [] Bx, int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)
+    bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cdouble_wrapper const [] Ax, int const [] Bp, int const [] Bj, 
+        npy_cdouble_wrapper const [] Bx, int [] Cp, int [] Cj, npy_cdouble_wrapper [] Cx)
+    bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_clongdouble_wrapper const [] Ax, int const [] Bp, int const [] Bj, 
+        npy_clongdouble_wrapper const [] Bx, int [] Cp, int [] Cj, npy_clongdouble_wrapper [] Cx)
     """
-    bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        signed char Ax, int Bp, int Bj, signed char Bx,
-        int Cp, int Cj, signed char Cx)
-    bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        unsigned char Ax, int Bp, int Bj, unsigned char Bx,
-        int Cp, int Cj, unsigned char Cx)
-    bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        short Ax, int Bp, int Bj, short Bx, int Cp,
-        int Cj, short Cx)
-    bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        unsigned short Ax, int Bp, int Bj, unsigned short Bx,
-        int Cp, int Cj, unsigned short Cx)
-    bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        int Ax, int Bp, int Bj, int Bx, int Cp, int Cj,
-        int Cx)
-    bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        unsigned int Ax, int Bp, int Bj, unsigned int Bx,
-        int Cp, int Cj, unsigned int Cx)
-    bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        long long Ax, int Bp, int Bj, long long Bx,
-        int Cp, int Cj, long long Cx)
-    bsr_eldiv_bsr(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,
-        int Cp, int Cj, unsigned long long Cx)
-    bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        float Ax, int Bp, int Bj, float Bx, int Cp,
-        int Cj, float Cx)
-    bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        double Ax, int Bp, int Bj, double Bx, int Cp,
-        int Cj, double Cx)
-    bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        long double Ax, int Bp, int Bj, long double Bx,
-        int Cp, int Cj, long double Cx)
-    bsr_eldiv_bsr(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,
-        int Cp, int Cj, npy_cfloat_wrapper Cx)
-    bsr_eldiv_bsr(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,
-        int Cp, int Cj, npy_cdouble_wrapper Cx)
-    bsr_eldiv_bsr(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, int Cp, int Cj, npy_clongdouble_wrapper Cx)
-    """
-    return _bsr.bsr_eldiv_bsr(*args)
+  return _bsr.bsr_eldiv_bsr(*args)
 
 def bsr_plus_bsr(*args):
+  """
+    bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        signed char const [] Ax, int const [] Bp, int const [] Bj, signed char const [] Bx, 
+        int [] Cp, int [] Cj, signed char [] Cx)
+    bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned char const [] Ax, int const [] Bp, int const [] Bj, unsigned char const [] Bx, 
+        int [] Cp, int [] Cj, unsigned char [] Cx)
+    bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        short const [] Ax, int const [] Bp, int const [] Bj, short const [] Bx, 
+        int [] Cp, int [] Cj, short [] Cx)
+    bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned short const [] Ax, int const [] Bp, int const [] Bj, 
+        unsigned short const [] Bx, int [] Cp, int [] Cj, unsigned short [] Cx)
+    bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        int const [] Ax, int const [] Bp, int const [] Bj, int const [] Bx, 
+        int [] Cp, int [] Cj, int [] Cx)
+    bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned int const [] Ax, int const [] Bp, int const [] Bj, unsigned int const [] Bx, 
+        int [] Cp, int [] Cj, unsigned int [] Cx)
+    bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long long const [] Ax, int const [] Bp, int const [] Bj, long long const [] Bx, 
+        int [] Cp, int [] Cj, long long [] Cx)
+    bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned long long const [] Ax, int const [] Bp, int const [] Bj, 
+        unsigned long long const [] Bx, int [] Cp, int [] Cj, unsigned long long [] Cx)
+    bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        float const [] Ax, int const [] Bp, int const [] Bj, float const [] Bx, 
+        int [] Cp, int [] Cj, float [] Cx)
+    bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        double const [] Ax, int const [] Bp, int const [] Bj, double const [] Bx, 
+        int [] Cp, int [] Cj, double [] Cx)
+    bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long double const [] Ax, int const [] Bp, int const [] Bj, long double const [] Bx, 
+        int [] Cp, int [] Cj, long double [] Cx)
+    bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cfloat_wrapper const [] Ax, int const [] Bp, int const [] Bj, 
+        npy_cfloat_wrapper const [] Bx, int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)
+    bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cdouble_wrapper const [] Ax, int const [] Bp, int const [] Bj, 
+        npy_cdouble_wrapper const [] Bx, int [] Cp, int [] Cj, npy_cdouble_wrapper [] Cx)
+    bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_clongdouble_wrapper const [] Ax, int const [] Bp, int const [] Bj, 
+        npy_clongdouble_wrapper const [] Bx, int [] Cp, int [] Cj, npy_clongdouble_wrapper [] Cx)
     """
-    bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        signed char Ax, int Bp, int Bj, signed char Bx,
-        int Cp, int Cj, signed char Cx)
-    bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        unsigned char Ax, int Bp, int Bj, unsigned char Bx,
-        int Cp, int Cj, unsigned char Cx)
-    bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        short Ax, int Bp, int Bj, short Bx, int Cp,
-        int Cj, short Cx)
-    bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        unsigned short Ax, int Bp, int Bj, unsigned short Bx,
-        int Cp, int Cj, unsigned short Cx)
-    bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        int Ax, int Bp, int Bj, int Bx, int Cp, int Cj,
-        int Cx)
-    bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        unsigned int Ax, int Bp, int Bj, unsigned int Bx,
-        int Cp, int Cj, unsigned int Cx)
-    bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        long long Ax, int Bp, int Bj, long long Bx,
-        int Cp, int Cj, long long Cx)
-    bsr_plus_bsr(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,
-        int Cp, int Cj, unsigned long long Cx)
-    bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        float Ax, int Bp, int Bj, float Bx, int Cp,
-        int Cj, float Cx)
-    bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        double Ax, int Bp, int Bj, double Bx, int Cp,
-        int Cj, double Cx)
-    bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        long double Ax, int Bp, int Bj, long double Bx,
-        int Cp, int Cj, long double Cx)
-    bsr_plus_bsr(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,
-        int Cp, int Cj, npy_cfloat_wrapper Cx)
-    bsr_plus_bsr(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,
-        int Cp, int Cj, npy_cdouble_wrapper Cx)
-    bsr_plus_bsr(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, int Cp, int Cj, npy_clongdouble_wrapper Cx)
-    """
-    return _bsr.bsr_plus_bsr(*args)
+  return _bsr.bsr_plus_bsr(*args)
 
 def bsr_minus_bsr(*args):
+  """
+    bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        signed char const [] Ax, int const [] Bp, int const [] Bj, signed char const [] Bx, 
+        int [] Cp, int [] Cj, signed char [] Cx)
+    bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned char const [] Ax, int const [] Bp, int const [] Bj, unsigned char const [] Bx, 
+        int [] Cp, int [] Cj, unsigned char [] Cx)
+    bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        short const [] Ax, int const [] Bp, int const [] Bj, short const [] Bx, 
+        int [] Cp, int [] Cj, short [] Cx)
+    bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned short const [] Ax, int const [] Bp, int const [] Bj, 
+        unsigned short const [] Bx, int [] Cp, int [] Cj, unsigned short [] Cx)
+    bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        int const [] Ax, int const [] Bp, int const [] Bj, int const [] Bx, 
+        int [] Cp, int [] Cj, int [] Cx)
+    bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned int const [] Ax, int const [] Bp, int const [] Bj, unsigned int const [] Bx, 
+        int [] Cp, int [] Cj, unsigned int [] Cx)
+    bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long long const [] Ax, int const [] Bp, int const [] Bj, long long const [] Bx, 
+        int [] Cp, int [] Cj, long long [] Cx)
+    bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned long long const [] Ax, int const [] Bp, int const [] Bj, 
+        unsigned long long const [] Bx, int [] Cp, int [] Cj, unsigned long long [] Cx)
+    bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        float const [] Ax, int const [] Bp, int const [] Bj, float const [] Bx, 
+        int [] Cp, int [] Cj, float [] Cx)
+    bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        double const [] Ax, int const [] Bp, int const [] Bj, double const [] Bx, 
+        int [] Cp, int [] Cj, double [] Cx)
+    bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long double const [] Ax, int const [] Bp, int const [] Bj, long double const [] Bx, 
+        int [] Cp, int [] Cj, long double [] Cx)
+    bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cfloat_wrapper const [] Ax, int const [] Bp, int const [] Bj, 
+        npy_cfloat_wrapper const [] Bx, int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)
+    bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cdouble_wrapper const [] Ax, int const [] Bp, int const [] Bj, 
+        npy_cdouble_wrapper const [] Bx, int [] Cp, int [] Cj, npy_cdouble_wrapper [] Cx)
+    bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_clongdouble_wrapper const [] Ax, int const [] Bp, int const [] Bj, 
+        npy_clongdouble_wrapper const [] Bx, int [] Cp, int [] Cj, npy_clongdouble_wrapper [] Cx)
     """
-    bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        signed char Ax, int Bp, int Bj, signed char Bx,
-        int Cp, int Cj, signed char Cx)
-    bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        unsigned char Ax, int Bp, int Bj, unsigned char Bx,
-        int Cp, int Cj, unsigned char Cx)
-    bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        short Ax, int Bp, int Bj, short Bx, int Cp,
-        int Cj, short Cx)
-    bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        unsigned short Ax, int Bp, int Bj, unsigned short Bx,
-        int Cp, int Cj, unsigned short Cx)
-    bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        int Ax, int Bp, int Bj, int Bx, int Cp, int Cj,
-        int Cx)
-    bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        unsigned int Ax, int Bp, int Bj, unsigned int Bx,
-        int Cp, int Cj, unsigned int Cx)
-    bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        long long Ax, int Bp, int Bj, long long Bx,
-        int Cp, int Cj, long long Cx)
-    bsr_minus_bsr(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,
-        int Cp, int Cj, unsigned long long Cx)
-    bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        float Ax, int Bp, int Bj, float Bx, int Cp,
-        int Cj, float Cx)
-    bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        double Ax, int Bp, int Bj, double Bx, int Cp,
-        int Cj, double Cx)
-    bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj,
-        long double Ax, int Bp, int Bj, long double Bx,
-        int Cp, int Cj, long double Cx)
-    bsr_minus_bsr(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,
-        int Cp, int Cj, npy_cfloat_wrapper Cx)
-    bsr_minus_bsr(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,
-        int Cp, int Cj, npy_cdouble_wrapper Cx)
-    bsr_minus_bsr(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, int Cp, int Cj, npy_clongdouble_wrapper Cx)
-    """
-    return _bsr.bsr_minus_bsr(*args)
+  return _bsr.bsr_minus_bsr(*args)
 
 def bsr_sort_indices(*args):
+  """
+    bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, 
+        signed char [] Ax)
+    bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, 
+        unsigned char [] Ax)
+    bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, 
+        short [] Ax)
+    bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, 
+        unsigned short [] Ax)
+    bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, 
+        int [] Ax)
+    bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, 
+        unsigned int [] Ax)
+    bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, 
+        long long [] Ax)
+    bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, 
+        unsigned long long [] Ax)
+    bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, 
+        float [] Ax)
+    bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, 
+        double [] Ax)
+    bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, 
+        long double [] Ax)
+    bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, 
+        npy_cfloat_wrapper [] Ax)
+    bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, 
+        npy_cdouble_wrapper [] Ax)
+    bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, 
+        npy_clongdouble_wrapper [] Ax)
     """
-    bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        signed char Ax)
-    bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned char Ax)
-    bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        short Ax)
-    bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned short Ax)
-    bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        int Ax)
-    bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned int Ax)
-    bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        long long Ax)
-    bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        unsigned long long Ax)
-    bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        float Ax)
-    bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        double Ax)
-    bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        long double Ax)
-    bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        npy_cfloat_wrapper Ax)
-    bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        npy_cdouble_wrapper Ax)
-    bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj,
-        npy_clongdouble_wrapper Ax)
-    """
-    return _bsr.bsr_sort_indices(*args)
+  return _bsr.bsr_sort_indices(*args)
+# This file is compatible with both classic and new-style classes.
+
+
diff --git a/scipy/sparse/sparsetools/bsr_wrap.cxx b/scipy/sparse/sparsetools/bsr_wrap.cxx
index 08e70f6..0f2c6d2 100644
--- a/scipy/sparse/sparsetools/bsr_wrap.cxx
+++ b/scipy/sparse/sparsetools/bsr_wrap.cxx
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.1+capsulehack
+ * Version 2.0.7
  * 
  * This file is not intended to be easily readable and contains a number of 
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -756,7 +756,16 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
 #define PyInt_Check(x) PyLong_Check(x)
 #define PyInt_AsLong(x) PyLong_AsLong(x)
 #define PyInt_FromLong(x) PyLong_FromLong(x)
+#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
+#define PyString_Check(name) PyBytes_Check(name)
+#define PyString_FromString(x) PyUnicode_FromString(x)
 #define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
+#define PyString_AsString(str) PyBytes_AsString(str)
+#define PyString_Size(str) PyBytes_Size(str)	
+#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
+#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
+#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
+#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
 
 #endif
 
@@ -896,6 +905,63 @@ PyObject *PyBool_FromLong(long ok)
 typedef int Py_ssize_t;
 # define PY_SSIZE_T_MAX INT_MAX
 # define PY_SSIZE_T_MIN INT_MIN
+typedef inquiry lenfunc;
+typedef intargfunc ssizeargfunc;
+typedef intintargfunc ssizessizeargfunc;
+typedef intobjargproc ssizeobjargproc;
+typedef intintobjargproc ssizessizeobjargproc;
+typedef getreadbufferproc readbufferproc;
+typedef getwritebufferproc writebufferproc;
+typedef getsegcountproc segcountproc;
+typedef getcharbufferproc charbufferproc;
+static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
+{
+  long result = 0;
+  PyObject *i = PyNumber_Int(x);
+  if (i) {
+    result = PyInt_AsLong(i);
+    Py_DECREF(i);
+  }
+  return result;
+}
+#endif
+
+#if PY_VERSION_HEX < 0x02040000
+#define Py_VISIT(op)				\
+  do { 						\
+    if (op) {					\
+      int vret = visit((op), arg);		\
+      if (vret)					\
+        return vret;				\
+    }						\
+  } while (0)
+#endif
+
+#if PY_VERSION_HEX < 0x02030000
+typedef struct {
+  PyTypeObject type;
+  PyNumberMethods as_number;
+  PyMappingMethods as_mapping;
+  PySequenceMethods as_sequence;
+  PyBufferProcs as_buffer;
+  PyObject *name, *slots;
+} PyHeapTypeObject;
+#endif
+
+#if PY_VERSION_HEX < 0x02030000
+typedef destructor freefunc;
+#endif
+
+#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
+     (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
+     (PY_MAJOR_VERSION > 3))
+# define SWIGPY_USE_CAPSULE
+# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
+#endif
+
+#if PY_VERSION_HEX < 0x03020000
+#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
+#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
 #endif
 
 /* -----------------------------------------------------------------------------
@@ -1042,9 +1108,6 @@ SWIG_Python_AddErrorMsg(const char* mesg)
 
 #ifdef __cplusplus
 extern "C" {
-#if 0
-} /* cc-mode */
-#endif
 #endif
 
 /* -----------------------------------------------------------------------------
@@ -1070,19 +1133,19 @@ typedef struct swig_const_info {
  * Wrapper of PyInstanceMethod_New() used in Python 3
  * It is exported to the generated module, used for -fastproxy
  * ----------------------------------------------------------------------------- */
-SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
-{
 #if PY_VERSION_HEX >= 0x03000000
+SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
+{
   return PyInstanceMethod_New(func);
+}
 #else
+SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
+{
   return NULL;
-#endif
 }
+#endif
 
 #ifdef __cplusplus
-#if 0
-{ /* cc-mode */
-#endif
 }
 #endif
 
@@ -1102,7 +1165,15 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
 #define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
-#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(ptr, type, flags)
+
+#ifdef SWIGPYTHON_BUILTIN
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
+#else
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
+#endif
+
+#define SWIG_InternalNewPointerObj(ptr, type, flags)	SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
+
 #define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
 #define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
 #define swig_owntype                                    int
@@ -1117,7 +1188,7 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
 
 /* for C or C++ function pointers */
 #define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
-#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(ptr, type, 0)
+#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
 
 /* for C++ member pointers, ie, member methods */
 #define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
@@ -1134,18 +1205,8 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
 #define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
 #define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
 #define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
-#define SWIG_fail                        		goto fail				
+#define SWIG_fail                        		goto fail					   
 
-/*
- * Python 2.7 and newer and Python 3.1 and newer should use Capsules API instead of
- * CObjects API.
- */
-#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
-     (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0))
-#define USE_CAPSULES
-#define TYPE_POINTER_NAME \
-    ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
-#endif
 
 /* Runtime API implementation */
 
@@ -1162,7 +1223,7 @@ SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
 SWIGINTERN void 
 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
   SWIG_PYTHON_THREAD_BEGIN_BLOCK;
-  PyErr_SetString(errtype, (char *) msg);
+  PyErr_SetString(errtype, msg);
   SWIG_PYTHON_THREAD_END_BLOCK;
 }
 
@@ -1170,12 +1231,41 @@ SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
 
 /* Set a constant value */
 
+#if defined(SWIGPYTHON_BUILTIN)
+
+SWIGINTERN void
+SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
+  PyObject *s = PyString_InternFromString(key);
+  PyList_Append(seq, s);
+  Py_DECREF(s);
+}
+
+SWIGINTERN void
+SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
+#if PY_VERSION_HEX < 0x02030000
+  PyDict_SetItemString(d, (char *)name, obj);
+#else
+  PyDict_SetItemString(d, name, obj);
+#endif
+  Py_DECREF(obj);
+  if (public_interface)
+    SwigPyBuiltin_AddPublicSymbol(public_interface, name);
+}
+
+#else
+
 SWIGINTERN void
 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
-  PyDict_SetItemString(d, (char*) name, obj);
+#if PY_VERSION_HEX < 0x02030000
+  PyDict_SetItemString(d, (char *)name, obj);
+#else
+  PyDict_SetItemString(d, name, obj);
+#endif
   Py_DECREF(obj);                            
 }
 
+#endif
+
 /* Append a value to the result obj */
 
 SWIGINTERN PyObject*
@@ -1236,6 +1326,14 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
     }
   }  
   if (!PyTuple_Check(args)) {
+    if (min <= 1 && max >= 1) {
+      register int i;
+      objs[0] = args;
+      for (i = 1; i < max; ++i) {
+	objs[i] = 0;
+      }
+      return 2;
+    }
     PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
     return 0;
   } else {
@@ -1288,11 +1386,11 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
 
 #define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
 
+#define SWIG_BUILTIN_TP_INIT	    (SWIG_POINTER_OWN << 2)
+#define SWIG_BUILTIN_INIT	    (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
+
 #ifdef __cplusplus
 extern "C" {
-#if 0
-} /* cc-mode */
-#endif
 #endif
 
 /*  How to access Py_None */
@@ -1343,6 +1441,7 @@ typedef struct {
   PyObject *destroy;
   int delargs;
   int implicitconv;
+  PyTypeObject *pytype;
 } SwigPyClientData;
 
 SWIGRUNTIMEINLINE int 
@@ -1409,13 +1508,13 @@ SwigPyClientData_New(PyObject* obj)
       data->delargs = 0;
     }
     data->implicitconv = 0;
+    data->pytype = 0;
     return data;
   }
 }
 
 SWIGRUNTIME void 
-SwigPyClientData_Del(SwigPyClientData* data)
-{
+SwigPyClientData_Del(SwigPyClientData *data) {
   Py_XDECREF(data->newraw);
   Py_XDECREF(data->newargs);
   Py_XDECREF(data->destroy);
@@ -1429,6 +1528,9 @@ typedef struct {
   swig_type_info *ty;
   int own;
   PyObject *next;
+#ifdef SWIGPYTHON_BUILTIN
+  PyObject *dict;
+#endif
 } SwigPyObject;
 
 SWIGRUNTIME PyObject *
@@ -1479,21 +1581,21 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
 #endif
 {
   const char *name = SWIG_TypePrettyName(v->ty);
-  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v);
+  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
   if (v->next) {
-#ifdef METH_NOARGS
+# ifdef METH_NOARGS
     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
-#else
+# else
     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
-#endif
-#if PY_VERSION_HEX >= 0x03000000
+# endif
+# if PY_VERSION_HEX >= 0x03000000
     PyObject *joined = PyUnicode_Concat(repr, nrep);
     Py_DecRef(repr);
     Py_DecRef(nrep);
     repr = joined;
-#else
+# else
     PyString_ConcatAndDel(&repr,nrep);
-#endif
+# endif
   }
   return repr;  
 }
@@ -1543,27 +1645,43 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
     Py_INCREF(Py_NotImplemented);
     return Py_NotImplemented;
   }
-  if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) )
-    res = Py_True;
-  else
-    res = Py_False;
-  Py_INCREF(res);
+  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
   return res;  
 }
 
 
-SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
+SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
 
+#ifdef SWIGPYTHON_BUILTIN
+static swig_type_info *SwigPyObject_stype = 0;
 SWIGRUNTIME PyTypeObject*
 SwigPyObject_type(void) {
-  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
+    SwigPyClientData *cd;
+    assert(SwigPyObject_stype);
+    cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
+    assert(cd);
+    assert(cd->pytype);
+    return cd->pytype;
+}
+#else
+SWIGRUNTIME PyTypeObject*
+SwigPyObject_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
   return type;
 }
+#endif
 
 SWIGRUNTIMEINLINE int
 SwigPyObject_Check(PyObject *op) {
+#ifdef SWIGPYTHON_BUILTIN
+  PyTypeObject *target_tp = SwigPyObject_type();
+  if (PyType_IsSubtype(op->ob_type, target_tp))
+    return 1;
+  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
+#else
   return (Py_TYPE(op) == SwigPyObject_type())
     || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
+#endif
 }
 
 SWIGRUNTIME PyObject *
@@ -1667,8 +1785,10 @@ SwigPyObject_own(PyObject *v, PyObject *args)
   PyObject *val = 0;
 #if (PY_VERSION_HEX < 0x02020000)
   if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
-#else
+#elif (PY_VERSION_HEX < 0x02050000)
   if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
+#else
+  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) 
 #endif
     {
       return NULL;
@@ -1729,9 +1849,9 @@ SwigPyObject_getattr(SwigPyObject *sobj,char *name)
 #endif
 
 SWIGRUNTIME PyTypeObject*
-_PySwigObject_type(void) {
+SwigPyObject_TypeOnce(void) {
   static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
-  
+
   static PyNumberMethods SwigPyObject_as_number = {
     (binaryfunc)0, /*nb_add*/
     (binaryfunc)0, /*nb_subtract*/
@@ -1778,85 +1898,89 @@ _PySwigObject_type(void) {
 #endif
   };
 
-  static PyTypeObject swigpyobject_type;  
+  static PyTypeObject swigpyobject_type;
   static int type_init = 0;
   if (!type_init) {
-    const PyTypeObject tmp
-      = {
-	/* PyObject header changed in Python 3 */
+    const PyTypeObject tmp = {
+      /* PyObject header changed in Python 3 */
 #if PY_VERSION_HEX >= 0x03000000
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-#else    
-	PyObject_HEAD_INIT(NULL)
-	0,				    /* ob_size */
+      PyVarObject_HEAD_INIT(NULL, 0)
+#else
+      PyObject_HEAD_INIT(NULL)
+      0,                                    /* ob_size */
 #endif
-	(char *)"SwigPyObject",		    /* tp_name */
-	sizeof(SwigPyObject),		    /* tp_basicsize */
-	0,			            /* tp_itemsize */
-	(destructor)SwigPyObject_dealloc,   /* tp_dealloc */
-	(printfunc)SwigPyObject_print,	    /* tp_print */
+      (char *)"SwigPyObject",               /* tp_name */
+      sizeof(SwigPyObject),                 /* tp_basicsize */
+      0,                                    /* tp_itemsize */
+      (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
+      (printfunc)SwigPyObject_print,        /* tp_print */
 #if PY_VERSION_HEX < 0x02020000
-	(getattrfunc)SwigPyObject_getattr,  /* tp_getattr */ 
+      (getattrfunc)SwigPyObject_getattr,    /* tp_getattr */
 #else
-	(getattrfunc)0,			    /* tp_getattr */ 
+      (getattrfunc)0,                       /* tp_getattr */
 #endif
-	(setattrfunc)0,			    /* tp_setattr */ 
+      (setattrfunc)0,                       /* tp_setattr */
 #if PY_VERSION_HEX >= 0x03000000
     0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
 #else
-	(cmpfunc)SwigPyObject_compare,	    /* tp_compare */
+      (cmpfunc)SwigPyObject_compare,        /* tp_compare */
 #endif
-	(reprfunc)SwigPyObject_repr,	    /* tp_repr */    
-	&SwigPyObject_as_number,	    /* tp_as_number */
-	0,				    /* tp_as_sequence */
-	0,				    /* tp_as_mapping */
-	(hashfunc)0,			    /* tp_hash */
-	(ternaryfunc)0,			    /* tp_call */
-	(reprfunc)SwigPyObject_str,	    /* tp_str */
-	PyObject_GenericGetAttr,            /* tp_getattro */
-	0,				    /* tp_setattro */
-	0,		                    /* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
-	swigobject_doc, 	            /* tp_doc */        
-	0,                                  /* tp_traverse */
-	0,                                  /* tp_clear */
-	(richcmpfunc)SwigPyObject_richcompare,           /* tp_richcompare */
-	0,                                  /* tp_weaklistoffset */
+      (reprfunc)SwigPyObject_repr,          /* tp_repr */
+      &SwigPyObject_as_number,              /* tp_as_number */
+      0,                                    /* tp_as_sequence */
+      0,                                    /* tp_as_mapping */
+      (hashfunc)0,                          /* tp_hash */
+      (ternaryfunc)0,                       /* tp_call */
+      (reprfunc)SwigPyObject_str,           /* tp_str */
+      PyObject_GenericGetAttr,              /* tp_getattro */
+      0,                                    /* tp_setattro */
+      0,                                    /* tp_as_buffer */
+      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
+      swigobject_doc,                       /* tp_doc */
+      0,                                    /* tp_traverse */
+      0,                                    /* tp_clear */
+      (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
+      0,                                    /* tp_weaklistoffset */
 #if PY_VERSION_HEX >= 0x02020000
-	0,                                  /* tp_iter */
-	0,                                  /* tp_iternext */
-	swigobject_methods,		    /* tp_methods */ 
-	0,			            /* tp_members */
-	0,				    /* tp_getset */	    	
-	0,			            /* tp_base */	        
-	0,				    /* tp_dict */	    	
-	0,				    /* tp_descr_get */  	
-	0,				    /* tp_descr_set */  	
-	0,				    /* tp_dictoffset */ 	
-	0,				    /* tp_init */	    	
-	0,				    /* tp_alloc */	    	
-	0,			            /* tp_new */	    	
-	0,	                            /* tp_free */	   
-	0,                                  /* tp_is_gc */  
-	0,				    /* tp_bases */   
-	0,				    /* tp_mro */
-	0,				    /* tp_cache */   
-	0,				    /* tp_subclasses */
-	0,				    /* tp_weaklist */
+      0,                                    /* tp_iter */
+      0,                                    /* tp_iternext */
+      swigobject_methods,                   /* tp_methods */
+      0,                                    /* tp_members */
+      0,                                    /* tp_getset */
+      0,                                    /* tp_base */
+      0,                                    /* tp_dict */
+      0,                                    /* tp_descr_get */
+      0,                                    /* tp_descr_set */
+      0,                                    /* tp_dictoffset */
+      0,                                    /* tp_init */
+      0,                                    /* tp_alloc */
+      0,                                    /* tp_new */
+      0,                                    /* tp_free */
+      0,                                    /* tp_is_gc */
+      0,                                    /* tp_bases */
+      0,                                    /* tp_mro */
+      0,                                    /* tp_cache */
+      0,                                    /* tp_subclasses */
+      0,                                    /* tp_weaklist */
 #endif
 #if PY_VERSION_HEX >= 0x02030000
-	0,                                  /* tp_del */
+      0,                                    /* tp_del */
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+      0,                                    /* tp_version */
 #endif
 #ifdef COUNT_ALLOCS
-	0,0,0,0                             /* tp_alloc -> tp_next */
+      0,0,0,0                               /* tp_alloc -> tp_next */
 #endif
-      };
+    };
     swigpyobject_type = tmp;
-    /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
-#if PY_VERSION_HEX < 0x03000000
+    type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
     swigpyobject_type.ob_type = &PyType_Type;
+#else
+    if (PyType_Ready(&swigpyobject_type) < 0)
+      return NULL;
 #endif
-    type_init = 1;
   }
   return &swigpyobject_type;
 }
@@ -1930,17 +2054,17 @@ SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
   return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
 }
 
-SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
+SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
 
 SWIGRUNTIME PyTypeObject*
 SwigPyPacked_type(void) {
-  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
   return type;
 }
 
 SWIGRUNTIMEINLINE int
 SwigPyPacked_Check(PyObject *op) {
-  return ((op)->ob_type == _PySwigPacked_type()) 
+  return ((op)->ob_type == SwigPyPacked_TypeOnce()) 
     || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
 }
 
@@ -1955,83 +2079,87 @@ SwigPyPacked_dealloc(PyObject *v)
 }
 
 SWIGRUNTIME PyTypeObject*
-_PySwigPacked_type(void) {
+SwigPyPacked_TypeOnce(void) {
   static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
   static PyTypeObject swigpypacked_type;
-  static int type_init = 0;  
+  static int type_init = 0;
   if (!type_init) {
-    const PyTypeObject tmp
-      = {
-    /* PyObject header changed in Python 3 */
+    const PyTypeObject tmp = {
+      /* PyObject header changed in Python 3 */
 #if PY_VERSION_HEX>=0x03000000
-    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+      PyVarObject_HEAD_INIT(NULL, 0)
 #else
-	PyObject_HEAD_INIT(NULL)
-    0,				    /* ob_size */	
+      PyObject_HEAD_INIT(NULL)
+      0,                                    /* ob_size */
 #endif
-	(char *)"SwigPyPacked",		    /* tp_name */	
-	sizeof(SwigPyPacked),		    /* tp_basicsize */	
-	0,				    /* tp_itemsize */	
-	(destructor)SwigPyPacked_dealloc,   /* tp_dealloc */	
-	(printfunc)SwigPyPacked_print,	    /* tp_print */   	
-	(getattrfunc)0,			    /* tp_getattr */ 	
-	(setattrfunc)0,			    /* tp_setattr */ 	
+      (char *)"SwigPyPacked",               /* tp_name */
+      sizeof(SwigPyPacked),                 /* tp_basicsize */
+      0,                                    /* tp_itemsize */
+      (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
+      (printfunc)SwigPyPacked_print,        /* tp_print */
+      (getattrfunc)0,                       /* tp_getattr */
+      (setattrfunc)0,                       /* tp_setattr */
 #if PY_VERSION_HEX>=0x03000000
-    0, /* tp_reserved in 3.0.1 */
+      0, /* tp_reserved in 3.0.1 */
 #else
-    (cmpfunc)SwigPyPacked_compare,	    /* tp_compare */
+      (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
 #endif
-	(reprfunc)SwigPyPacked_repr,	    /* tp_repr */
-	0,	                            /* tp_as_number */
-	0,				    /* tp_as_sequence */
-	0,				    /* tp_as_mapping */
-	(hashfunc)0,			    /* tp_hash */
-	(ternaryfunc)0,			    /* tp_call */
-	(reprfunc)SwigPyPacked_str,	    /* tp_str */
-	PyObject_GenericGetAttr,            /* tp_getattro */
-	0,				    /* tp_setattro */
-	0,		                    /* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
-	swigpacked_doc, 	            /* tp_doc */
-	0,                                  /* tp_traverse */
-	0,                                  /* tp_clear */
-	0,                                  /* tp_richcompare */
-	0,                                  /* tp_weaklistoffset */
+      (reprfunc)SwigPyPacked_repr,          /* tp_repr */
+      0,                                    /* tp_as_number */
+      0,                                    /* tp_as_sequence */
+      0,                                    /* tp_as_mapping */
+      (hashfunc)0,                          /* tp_hash */
+      (ternaryfunc)0,                       /* tp_call */
+      (reprfunc)SwigPyPacked_str,           /* tp_str */
+      PyObject_GenericGetAttr,              /* tp_getattro */
+      0,                                    /* tp_setattro */
+      0,                                    /* tp_as_buffer */
+      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
+      swigpacked_doc,                       /* tp_doc */
+      0,                                    /* tp_traverse */
+      0,                                    /* tp_clear */
+      0,                                    /* tp_richcompare */
+      0,                                    /* tp_weaklistoffset */
 #if PY_VERSION_HEX >= 0x02020000
-	0,                                  /* tp_iter */
-	0,                                  /* tp_iternext */
-	0,		                    /* tp_methods */ 
-	0,			            /* tp_members */
-	0,				    /* tp_getset */	    	
-	0,			            /* tp_base */	        
-	0,				    /* tp_dict */	    	
-	0,				    /* tp_descr_get */  	
-	0,				    /* tp_descr_set */  	
-	0,				    /* tp_dictoffset */ 	
-	0,				    /* tp_init */	    	
-	0,				    /* tp_alloc */	    	
-	0,			            /* tp_new */	    	
-	0, 	                            /* tp_free */	   
-        0,                                  /* tp_is_gc */  
-	0,				    /* tp_bases */   
-	0,				    /* tp_mro */
-	0,				    /* tp_cache */   
- 	0,				    /* tp_subclasses */
-	0,				    /* tp_weaklist */
+      0,                                    /* tp_iter */
+      0,                                    /* tp_iternext */
+      0,                                    /* tp_methods */
+      0,                                    /* tp_members */
+      0,                                    /* tp_getset */
+      0,                                    /* tp_base */
+      0,                                    /* tp_dict */
+      0,                                    /* tp_descr_get */
+      0,                                    /* tp_descr_set */
+      0,                                    /* tp_dictoffset */
+      0,                                    /* tp_init */
+      0,                                    /* tp_alloc */
+      0,                                    /* tp_new */
+      0,                                    /* tp_free */
+      0,                                    /* tp_is_gc */
+      0,                                    /* tp_bases */
+      0,                                    /* tp_mro */
+      0,                                    /* tp_cache */
+      0,                                    /* tp_subclasses */
+      0,                                    /* tp_weaklist */
 #endif
 #if PY_VERSION_HEX >= 0x02030000
-	0,                                  /* tp_del */
+      0,                                    /* tp_del */
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+      0,                                    /* tp_version */
 #endif
 #ifdef COUNT_ALLOCS
-	0,0,0,0                             /* tp_alloc -> tp_next */
+      0,0,0,0                               /* tp_alloc -> tp_next */
 #endif
-      };
+    };
     swigpypacked_type = tmp;
-    /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */
-#if PY_VERSION_HEX < 0x03000000
+    type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
     swigpypacked_type.ob_type = &PyType_Type;
+#else
+    if (PyType_Ready(&swigpypacked_type) < 0)
+      return NULL;
 #endif
-    type_init = 1;
   }
   return &swigpypacked_type;
 }
@@ -2098,50 +2226,65 @@ SWIG_This(void)
 SWIGRUNTIME SwigPyObject *
 SWIG_Python_GetSwigThis(PyObject *pyobj) 
 {
-  if (SwigPyObject_Check(pyobj)) {
+  PyObject *obj;
+
+  if (SwigPyObject_Check(pyobj))
     return (SwigPyObject *) pyobj;
-  } else {
-    PyObject *obj = 0;
+
+#ifdef SWIGPYTHON_BUILTIN
+  (void)obj;
+# ifdef PyWeakref_CheckProxy
+  if (PyWeakref_CheckProxy(pyobj)) {
+    pyobj = PyWeakref_GET_OBJECT(pyobj);
+    if (pyobj && SwigPyObject_Check(pyobj))
+      return (SwigPyObject*) pyobj;
+  }
+# endif
+  return NULL;
+#else
+
+  obj = 0;
+
 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
-    if (PyInstance_Check(pyobj)) {
-      obj = _PyInstance_Lookup(pyobj, SWIG_This());      
+  if (PyInstance_Check(pyobj)) {
+    obj = _PyInstance_Lookup(pyobj, SWIG_This());      
+  } else {
+    PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
+    if (dictptr != NULL) {
+      PyObject *dict = *dictptr;
+      obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
     } else {
-      PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
-      if (dictptr != NULL) {
-	PyObject *dict = *dictptr;
-	obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
-      } else {
 #ifdef PyWeakref_CheckProxy
-	if (PyWeakref_CheckProxy(pyobj)) {
-	  PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
-	  return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
-	}
+      if (PyWeakref_CheckProxy(pyobj)) {
+	PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
+	return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
+      }
 #endif
-	obj = PyObject_GetAttr(pyobj,SWIG_This());
-	if (obj) {
-	  Py_DECREF(obj);
-	} else {
-	  if (PyErr_Occurred()) PyErr_Clear();
-	  return 0;
-	}
+      obj = PyObject_GetAttr(pyobj,SWIG_This());
+      if (obj) {
+	Py_DECREF(obj);
+      } else {
+	if (PyErr_Occurred()) PyErr_Clear();
+	return 0;
       }
     }
+  }
 #else
-    obj = PyObject_GetAttr(pyobj,SWIG_This());
-    if (obj) {
-      Py_DECREF(obj);
-    } else {
-      if (PyErr_Occurred()) PyErr_Clear();
-      return 0;
-    }
+  obj = PyObject_GetAttr(pyobj,SWIG_This());
+  if (obj) {
+    Py_DECREF(obj);
+  } else {
+    if (PyErr_Occurred()) PyErr_Clear();
+    return 0;
+  }
 #endif
-    if (obj && !SwigPyObject_Check(obj)) {
-      /* a PyObject is called 'this', try to get the 'real this'
-	 SwigPyObject from it */ 
-      return SWIG_Python_GetSwigThis(obj);
-    }
-    return (SwigPyObject *)obj;
+  if (obj && !SwigPyObject_Check(obj)) {
+    /* a PyObject is called 'this', try to get the 'real this'
+       SwigPyObject from it */ 
+    return SWIG_Python_GetSwigThis(obj);
   }
+  return (SwigPyObject *)obj;
+#endif
 }
 
 /* Acquire a pointer value */
@@ -2163,91 +2306,97 @@ SWIG_Python_AcquirePtr(PyObject *obj, int own) {
 
 SWIGRUNTIME int
 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
-  if (!obj) return SWIG_ERROR;
+  int res;
+  SwigPyObject *sobj;
+
+  if (!obj)
+    return SWIG_ERROR;
   if (obj == Py_None) {
-    if (ptr) *ptr = 0;
+    if (ptr)
+      *ptr = 0;
     return SWIG_OK;
-  } else {
-    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
-    if (own)
-      *own = 0;
-    while (sobj) {
-      void *vptr = sobj->ptr;
-      if (ty) {
-	swig_type_info *to = sobj->ty;
-	if (to == ty) {
-	  /* no type cast needed */
-	  if (ptr) *ptr = vptr;
-	  break;
-	} else {
-	  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
-	  if (!tc) {
-	    sobj = (SwigPyObject *)sobj->next;
-	  } else {
-	    if (ptr) {
-              int newmemory = 0;
-              *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
-              if (newmemory == SWIG_CAST_NEW_MEMORY) {
-                assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
-                if (own)
-                  *own = *own | SWIG_CAST_NEW_MEMORY;
-              }
-            }
-	    break;
-	  }
-	}
+  }
+
+  res = SWIG_ERROR;
+
+  sobj = SWIG_Python_GetSwigThis(obj);
+  if (own)
+    *own = 0;
+  while (sobj) {
+    void *vptr = sobj->ptr;
+    if (ty) {
+      swig_type_info *to = sobj->ty;
+      if (to == ty) {
+        /* no type cast needed */
+        if (ptr) *ptr = vptr;
+        break;
       } else {
-	if (ptr) *ptr = vptr;
-	break;
-      }
-    }
-    if (sobj) {
-      if (own)
-        *own = *own | sobj->own;
-      if (flags & SWIG_POINTER_DISOWN) {
-	sobj->own = 0;
+        swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+        if (!tc) {
+          sobj = (SwigPyObject *)sobj->next;
+        } else {
+          if (ptr) {
+            int newmemory = 0;
+            *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+            if (newmemory == SWIG_CAST_NEW_MEMORY) {
+              assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
+              if (own)
+                *own = *own | SWIG_CAST_NEW_MEMORY;
+            }
+          }
+          break;
+        }
       }
-      return SWIG_OK;
     } else {
-      int res = SWIG_ERROR;
-      if (flags & SWIG_POINTER_IMPLICIT_CONV) {
-	SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
-	if (data && !data->implicitconv) {
-	  PyObject *klass = data->klass;
-	  if (klass) {
-	    PyObject *impconv;
-	    data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
-	    impconv = SWIG_Python_CallFunctor(klass, obj);
-	    data->implicitconv = 0;
-	    if (PyErr_Occurred()) {
-	      PyErr_Clear();
-	      impconv = 0;
-	    }
-	    if (impconv) {
-	      SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
-	      if (iobj) {
-		void *vptr;
-		res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
-		if (SWIG_IsOK(res)) {
-		  if (ptr) {
-		    *ptr = vptr;
-		    /* transfer the ownership to 'ptr' */
-		    iobj->own = 0;
-		    res = SWIG_AddCast(res);
-		    res = SWIG_AddNewMask(res);
-		  } else {
-		    res = SWIG_AddCast(res);		    
-		  }
-		}
-	      }
-	      Py_DECREF(impconv);
-	    }
-	  }
-	}
+      if (ptr) *ptr = vptr;
+      break;
+    }
+  }
+  if (sobj) {
+    if (own)
+      *own = *own | sobj->own;
+    if (flags & SWIG_POINTER_DISOWN) {
+      sobj->own = 0;
+    }
+    res = SWIG_OK;
+  } else {
+    if (flags & SWIG_POINTER_IMPLICIT_CONV) {
+      SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
+      if (data && !data->implicitconv) {
+        PyObject *klass = data->klass;
+        if (klass) {
+          PyObject *impconv;
+          data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
+          impconv = SWIG_Python_CallFunctor(klass, obj);
+          data->implicitconv = 0;
+          if (PyErr_Occurred()) {
+            PyErr_Clear();
+            impconv = 0;
+          }
+          if (impconv) {
+            SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
+            if (iobj) {
+              void *vptr;
+              res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
+              if (SWIG_IsOK(res)) {
+                if (ptr) {
+                  *ptr = vptr;
+                  /* transfer the ownership to 'ptr' */
+                  iobj->own = 0;
+                  res = SWIG_AddCast(res);
+                  res = SWIG_AddNewMask(res);
+                } else {
+                  res = SWIG_AddCast(res);		    
+                }
+              }
+            }
+            Py_DECREF(impconv);
+          }
+        }
       }
-      return res;
     }
   }
+  return res;
 }
 
 /* Convert a function ptr value */
@@ -2401,7 +2550,7 @@ SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
 SWIGINTERN PyObject *
 SWIG_Python_InitShadowInstance(PyObject *args) {
   PyObject *obj[2];
-  if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
+  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
     return NULL;
   } else {
     SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
@@ -2417,22 +2566,54 @@ SWIG_Python_InitShadowInstance(PyObject *args) {
 /* Create a new pointer object */
 
 SWIGRUNTIME PyObject *
-SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
-  if (!ptr) {
+SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
+  SwigPyClientData *clientdata;
+  PyObject * robj;
+  int own;
+
+  if (!ptr)
     return SWIG_Py_Void();
-  } else {
-    int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
-    PyObject *robj = SwigPyObject_New(ptr, type, own);
-    SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
-    if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
-      PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
-      if (inst) {
-	Py_DECREF(robj);
-	robj = inst;
+
+  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
+  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
+  if (clientdata && clientdata->pytype) {
+    SwigPyObject *newobj;
+    if (flags & SWIG_BUILTIN_TP_INIT) {
+      newobj = (SwigPyObject*) self;
+      if (newobj->ptr) {
+        PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
+        while (newobj->next)
+	  newobj = (SwigPyObject *) newobj->next;
+        newobj->next = next_self;
+        newobj = (SwigPyObject *)next_self;
       }
+    } else {
+      newobj = PyObject_New(SwigPyObject, clientdata->pytype);
+    }
+    if (newobj) {
+      newobj->ptr = ptr;
+      newobj->ty = type;
+      newobj->own = own;
+      newobj->next = 0;
+#ifdef SWIGPYTHON_BUILTIN
+      newobj->dict = 0;
+#endif
+      return (PyObject*) newobj;
+    }
+    return SWIG_Py_Void();
+  }
+
+  assert(!(flags & SWIG_BUILTIN_TP_INIT));
+
+  robj = SwigPyObject_New(ptr, type, own);
+  if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
+    PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
+    if (inst) {
+      Py_DECREF(robj);
+      robj = inst;
     }
-    return robj;
   }
+  return robj;
 }
 
 /* Create a new packed object */
@@ -2458,12 +2639,12 @@ SWIG_Python_GetModule(void) {
 #ifdef SWIG_LINK_RUNTIME
     type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
 #else
-#ifdef USE_CAPSULES
-    type_pointer = PyCapsule_Import(TYPE_POINTER_NAME, 0);
-#else
+# ifdef SWIGPY_USE_CAPSULE
+    type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
+# else
     type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
 				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
-#endif
+# endif
     if (PyErr_Occurred()) {
       PyErr_Clear();
       type_pointer = (void *)0;
@@ -2506,16 +2687,19 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o)
 #endif
 
 SWIGRUNTIME void
+#ifdef SWIGPY_USE_CAPSULE
+SWIG_Python_DestroyModule(PyObject *obj)
+#else
 SWIG_Python_DestroyModule(void *vptr)
+#endif
 {
-  size_t i;
-#ifdef USE_CAPSULES
-  swig_module_info *swig_module =
-    (swig_module_info *) PyCapsule_GetPointer((PyObject *)vptr, TYPE_POINTER_NAME);
+#ifdef SWIGPY_USE_CAPSULE
+  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
 #else
   swig_module_info *swig_module = (swig_module_info *) vptr;
 #endif
   swig_type_info **types = swig_module->types;
+  size_t i;
   for (i =0; i < swig_module->size; ++i) {
     swig_type_info *ty = types[i];
     if (ty->owndata) {
@@ -2529,30 +2713,28 @@ SWIG_Python_DestroyModule(void *vptr)
 
 SWIGRUNTIME void
 SWIG_Python_SetModule(swig_module_info *swig_module) {
-  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
-
 #if PY_VERSION_HEX >= 0x03000000
  /* Add a dummy module object into sys.modules */
   PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
 #else
-  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
-				   swig_empty_runtime_method_table);
-#endif
-#ifdef USE_CAPSULES
-  PyObject *pointer = PyCapsule_New((void *)swig_module, TYPE_POINTER_NAME,
-				    (PyCapsule_Destructor)SWIG_Python_DestroyModule);
-#else
-  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
+  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
 #endif
+#ifdef SWIGPY_USE_CAPSULE
+  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
   if (pointer && module) {
-#ifdef USE_CAPSULES
     PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
+  } else {
+    Py_XDECREF(pointer);
+  }
 #else
+  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+  if (pointer && module) {
     PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
-#endif
   } else {
     Py_XDECREF(pointer);
   }
+#endif
 }
 
 /* The python cached type query */
@@ -2570,8 +2752,8 @@ SWIG_Python_TypeQuery(const char *type)
   PyObject *obj = PyDict_GetItem(cache, key);
   swig_type_info *descriptor;
   if (obj) {
-#ifdef USE_CAPSULES
-    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, type);
+#ifdef SWIGPY_USE_CAPSULE
+    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
 #else
     descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
 #endif
@@ -2579,8 +2761,8 @@ SWIG_Python_TypeQuery(const char *type)
     swig_module_info *swig_module = SWIG_Python_GetModule();
     descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
     if (descriptor) {
-#ifdef USE_CAPSULES
-      obj = PyCapsule_New(descriptor, type, NULL);
+#ifdef SWIGPY_USE_CAPSULE
+      obj = PyCapsule_New((void*) descriptor, NULL, NULL);
 #else
       obj = PyCObject_FromVoidPtr(descriptor, NULL);
 #endif
@@ -2644,7 +2826,7 @@ SwigPyObject_GetDesc(PyObject *self)
 {
   SwigPyObject *v = (SwigPyObject *)self;
   swig_type_info *ty = v ? v->ty : 0;
-  return ty ? ty->str : (char*)"";
+  return ty ? ty->str : "";
 }
 
 SWIGRUNTIME void
@@ -2687,7 +2869,7 @@ SWIG_Python_TypeError(const char *type, PyObject *obj)
 
 /* Convert a pointer value, signal an exception on a type mismatch */
 SWIGRUNTIME void *
-SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
+SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
   void *result;
   if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
     PyErr_Clear();
@@ -2701,11 +2883,62 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags)
   return result;
 }
 
+#ifdef SWIGPYTHON_BUILTIN
+SWIGRUNTIME int
+SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
+  PyTypeObject *tp = obj->ob_type;
+  PyObject *descr;
+  PyObject *encoded_name;
+  descrsetfunc f;
+  int res;
 
-#ifdef __cplusplus
-#if 0
-{ /* cc-mode */
+# ifdef Py_USING_UNICODE
+  if (PyString_Check(name)) {
+    name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
+    if (!name)
+      return -1;
+  } else if (!PyUnicode_Check(name))
+# else
+  if (!PyString_Check(name))
+# endif
+  {
+    PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
+    return -1;
+  } else {
+    Py_INCREF(name);
+  }
+
+  if (!tp->tp_dict) {
+    if (PyType_Ready(tp) < 0)
+      goto done;
+  }
+
+  res = -1;
+  descr = _PyType_Lookup(tp, name);
+  f = NULL;
+  if (descr != NULL)
+    f = descr->ob_type->tp_descr_set;
+  if (!f) {
+    if (PyString_Check(name)) {
+      encoded_name = name;
+      Py_INCREF(name);
+    } else {
+      encoded_name = PyUnicode_AsUTF8String(name);
+    }
+    PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
+    Py_DECREF(encoded_name);
+  } else {
+    res = f(descr, obj, value);
+  }
+  
+  done:
+  Py_DECREF(name);
+  return res;
+}
 #endif
+
+
+#ifdef __cplusplus
 }
 #endif
 
@@ -2745,7 +2978,7 @@ static swig_module_info swig_module = {swig_types, 1, 0, 0, 0, 0};
 #endif
 #define SWIG_name    "_bsr"
 
-#define SWIGVERSION 0x020001 
+#define SWIGVERSION 0x020007 
 #define SWIG_VERSION SWIGVERSION
 
 
@@ -5091,8 +5324,8 @@ SWIGINTERN PyObject *_wrap_bsr_diagonal(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 8); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 8) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 8) {
@@ -5785,7 +6018,7 @@ fail:
     "    bsr_diagonal< int,npy_cfloat_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper [])\n"
     "    bsr_diagonal< int,npy_cdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper [])\n"
     "    bsr_diagonal< int,npy_clongdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -7587,8 +7820,8 @@ SWIGINTERN PyObject *_wrap_bsr_scale_rows(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 8); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 8) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 8) {
@@ -8281,7 +8514,7 @@ fail:
     "    bsr_scale_rows< int,npy_cfloat_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cfloat_wrapper [],npy_cfloat_wrapper const [])\n"
     "    bsr_scale_rows< int,npy_cdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cdouble_wrapper [],npy_cdouble_wrapper const [])\n"
     "    bsr_scale_rows< int,npy_clongdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_clongdouble_wrapper [],npy_clongdouble_wrapper const [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -10083,8 +10316,8 @@ SWIGINTERN PyObject *_wrap_bsr_scale_columns(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 8); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 8) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 8) {
@@ -10777,7 +11010,7 @@ fail:
     "    bsr_scale_columns< int,npy_cfloat_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cfloat_wrapper [],npy_cfloat_wrapper const [])\n"
     "    bsr_scale_columns< int,npy_cdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cdouble_wrapper [],npy_cdouble_wrapper const [])\n"
     "    bsr_scale_columns< int,npy_clongdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_clongdouble_wrapper [],npy_clongdouble_wrapper const [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -12803,8 +13036,8 @@ SWIGINTERN PyObject *_wrap_bsr_transpose(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 10); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 10) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 10) {
@@ -13637,7 +13870,7 @@ fail:
     "    bsr_transpose< int,npy_cfloat_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    bsr_transpose< int,npy_cdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    bsr_transpose< int,npy_clongdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -16797,8 +17030,8 @@ SWIGINTERN PyObject *_wrap_bsr_matmat_pass2(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 14); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 14) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 14) {
@@ -17925,7 +18158,7 @@ fail:
     "    bsr_matmat_pass2< int,npy_cfloat_wrapper >(int const,int const,int const,int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    bsr_matmat_pass2< int,npy_cdouble_wrapper >(int const,int const,int const,int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    bsr_matmat_pass2< int,npy_clongdouble_wrapper >(int const,int const,int const,int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -20063,8 +20296,8 @@ SWIGINTERN PyObject *_wrap_bsr_matvec(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 9); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 9) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 9) {
@@ -20827,7 +21060,7 @@ fail:
     "    bsr_matvec< int,npy_cfloat_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper [])\n"
     "    bsr_matvec< int,npy_cdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper [])\n"
     "    bsr_matvec< int,npy_clongdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],npy_clongdouble_wrapper const [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -23091,8 +23324,8 @@ SWIGINTERN PyObject *_wrap_bsr_matvecs(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 10); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 10) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 10) {
@@ -23939,7 +24172,7 @@ fail:
     "    bsr_matvecs< int,npy_cfloat_wrapper >(int const,int const,int const,int const,int const,int const [],int const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper [])\n"
     "    bsr_matvecs< int,npy_cdouble_wrapper >(int const,int const,int const,int const,int const,int const [],int const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper [])\n"
     "    bsr_matvecs< int,npy_clongdouble_wrapper >(int const,int const,int const,int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],npy_clongdouble_wrapper const [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -26973,8 +27206,8 @@ SWIGINTERN PyObject *_wrap_bsr_elmul_bsr(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 13); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 13) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 13) {
@@ -28017,7 +28250,7 @@ fail:
     "    bsr_elmul_bsr< int,npy_cfloat_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    bsr_elmul_bsr< int,npy_cdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    bsr_elmul_bsr< int,npy_clongdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -31051,8 +31284,8 @@ SWIGINTERN PyObject *_wrap_bsr_eldiv_bsr(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 13); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 13) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 13) {
@@ -32095,7 +32328,7 @@ fail:
     "    bsr_eldiv_bsr< int,npy_cfloat_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    bsr_eldiv_bsr< int,npy_cdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    bsr_eldiv_bsr< int,npy_clongdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -35129,8 +35362,8 @@ SWIGINTERN PyObject *_wrap_bsr_plus_bsr(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 13); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 13) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 13) {
@@ -36173,7 +36406,7 @@ fail:
     "    bsr_plus_bsr< int,npy_cfloat_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    bsr_plus_bsr< int,npy_cdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    bsr_plus_bsr< int,npy_clongdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -39207,8 +39440,8 @@ SWIGINTERN PyObject *_wrap_bsr_minus_bsr(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 13); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 13) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 13) {
@@ -40251,7 +40484,7 @@ fail:
     "    bsr_minus_bsr< int,npy_cfloat_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    bsr_minus_bsr< int,npy_cdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    bsr_minus_bsr< int,npy_clongdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -41269,8 +41502,8 @@ SWIGINTERN PyObject *_wrap_bsr_sort_indices(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 7); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 7) {
@@ -41893,457 +42126,457 @@ fail:
     "    bsr_sort_indices< int,npy_cfloat_wrapper >(int const,int const,int const,int const,int [],int [],npy_cfloat_wrapper [])\n"
     "    bsr_sort_indices< int,npy_cdouble_wrapper >(int const,int const,int const,int const,int [],int [],npy_cdouble_wrapper [])\n"
     "    bsr_sort_indices< int,npy_clongdouble_wrapper >(int const,int const,int const,int const,int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
 static PyMethodDef SwigMethods[] = {
 	 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
 	 { (char *)"bsr_diagonal", _wrap_bsr_diagonal, METH_VARARGS, (char *)"\n"
-		"bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    signed char Ax, signed char Yx)\n"
-		"bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned char Ax, unsigned char Yx)\n"
-		"bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    short Ax, short Yx)\n"
-		"bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned short Ax, unsigned short Yx)\n"
-		"bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    int Ax, int Yx)\n"
-		"bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned int Ax, unsigned int Yx)\n"
-		"bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    long long Ax, long long Yx)\n"
-		"bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned long long Ax, unsigned long long Yx)\n"
-		"bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    float Ax, float Yx)\n"
-		"bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    double Ax, double Yx)\n"
-		"bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    long double Ax, long double Yx)\n"
-		"bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    npy_cfloat_wrapper Ax, npy_cfloat_wrapper Yx)\n"
-		"bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    npy_cdouble_wrapper Ax, npy_cdouble_wrapper Yx)\n"
-		"bsr_diagonal(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    npy_clongdouble_wrapper Ax, npy_clongdouble_wrapper Yx)\n"
+		"bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    signed char const [] Ax, signed char [] Yx)\n"
+		"bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned char const [] Ax, unsigned char [] Yx)\n"
+		"bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    short const [] Ax, short [] Yx)\n"
+		"bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned short const [] Ax, unsigned short [] Yx)\n"
+		"bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    int const [] Ax, int [] Yx)\n"
+		"bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned int const [] Ax, unsigned int [] Yx)\n"
+		"bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long long const [] Ax, long long [] Yx)\n"
+		"bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned long long const [] Ax, unsigned long long [] Yx)\n"
+		"bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    float const [] Ax, float [] Yx)\n"
+		"bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    double const [] Ax, double [] Yx)\n"
+		"bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long double const [] Ax, long double [] Yx)\n"
+		"bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cfloat_wrapper const [] Ax, npy_cfloat_wrapper [] Yx)\n"
+		"bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cdouble_wrapper const [] Ax, npy_cdouble_wrapper [] Yx)\n"
+		"bsr_diagonal(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_clongdouble_wrapper const [] Ax, npy_clongdouble_wrapper [] Yx)\n"
 		""},
 	 { (char *)"bsr_scale_rows", _wrap_bsr_scale_rows, METH_VARARGS, (char *)"\n"
-		"bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    signed char Ax, signed char Xx)\n"
-		"bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned char Ax, unsigned char Xx)\n"
-		"bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    short Ax, short Xx)\n"
-		"bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned short Ax, unsigned short Xx)\n"
-		"bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    int Ax, int Xx)\n"
-		"bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned int Ax, unsigned int Xx)\n"
-		"bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    long long Ax, long long Xx)\n"
-		"bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned long long Ax, unsigned long long Xx)\n"
-		"bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    float Ax, float Xx)\n"
-		"bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    double Ax, double Xx)\n"
-		"bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    long double Ax, long double Xx)\n"
-		"bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    npy_cfloat_wrapper Ax, npy_cfloat_wrapper Xx)\n"
-		"bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    npy_cdouble_wrapper Ax, npy_cdouble_wrapper Xx)\n"
-		"bsr_scale_rows(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    npy_clongdouble_wrapper Ax, npy_clongdouble_wrapper Xx)\n"
+		"bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    signed char [] Ax, signed char const [] Xx)\n"
+		"bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned char [] Ax, unsigned char const [] Xx)\n"
+		"bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    short [] Ax, short const [] Xx)\n"
+		"bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned short [] Ax, unsigned short const [] Xx)\n"
+		"bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    int [] Ax, int const [] Xx)\n"
+		"bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned int [] Ax, unsigned int const [] Xx)\n"
+		"bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long long [] Ax, long long const [] Xx)\n"
+		"bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned long long [] Ax, unsigned long long const [] Xx)\n"
+		"bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    float [] Ax, float const [] Xx)\n"
+		"bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    double [] Ax, double const [] Xx)\n"
+		"bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long double [] Ax, long double const [] Xx)\n"
+		"bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cfloat_wrapper [] Ax, npy_cfloat_wrapper const [] Xx)\n"
+		"bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cdouble_wrapper [] Ax, npy_cdouble_wrapper const [] Xx)\n"
+		"bsr_scale_rows(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_clongdouble_wrapper [] Ax, npy_clongdouble_wrapper const [] Xx)\n"
 		""},
 	 { (char *)"bsr_scale_columns", _wrap_bsr_scale_columns, METH_VARARGS, (char *)"\n"
-		"bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    signed char Ax, signed char Xx)\n"
-		"bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned char Ax, unsigned char Xx)\n"
-		"bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    short Ax, short Xx)\n"
-		"bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned short Ax, unsigned short Xx)\n"
-		"bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    int Ax, int Xx)\n"
-		"bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned int Ax, unsigned int Xx)\n"
-		"bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    long long Ax, long long Xx)\n"
-		"bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned long long Ax, unsigned long long Xx)\n"
-		"bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    float Ax, float Xx)\n"
-		"bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    double Ax, double Xx)\n"
-		"bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    long double Ax, long double Xx)\n"
-		"bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    npy_cfloat_wrapper Ax, npy_cfloat_wrapper Xx)\n"
-		"bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    npy_cdouble_wrapper Ax, npy_cdouble_wrapper Xx)\n"
-		"bsr_scale_columns(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    npy_clongdouble_wrapper Ax, npy_clongdouble_wrapper Xx)\n"
+		"bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    signed char [] Ax, signed char const [] Xx)\n"
+		"bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned char [] Ax, unsigned char const [] Xx)\n"
+		"bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    short [] Ax, short const [] Xx)\n"
+		"bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned short [] Ax, unsigned short const [] Xx)\n"
+		"bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    int [] Ax, int const [] Xx)\n"
+		"bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned int [] Ax, unsigned int const [] Xx)\n"
+		"bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long long [] Ax, long long const [] Xx)\n"
+		"bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned long long [] Ax, unsigned long long const [] Xx)\n"
+		"bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    float [] Ax, float const [] Xx)\n"
+		"bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    double [] Ax, double const [] Xx)\n"
+		"bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long double [] Ax, long double const [] Xx)\n"
+		"bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cfloat_wrapper [] Ax, npy_cfloat_wrapper const [] Xx)\n"
+		"bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cdouble_wrapper [] Ax, npy_cdouble_wrapper const [] Xx)\n"
+		"bsr_scale_columns(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_clongdouble_wrapper [] Ax, npy_clongdouble_wrapper const [] Xx)\n"
 		""},
 	 { (char *)"bsr_transpose", _wrap_bsr_transpose, METH_VARARGS, (char *)"\n"
-		"bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    signed char Ax, int Bp, int Bj, signed char Bx)\n"
-		"bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned char Ax, int Bp, int Bj, unsigned char Bx)\n"
-		"bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    short Ax, int Bp, int Bj, short Bx)\n"
-		"bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned short Ax, int Bp, int Bj, unsigned short Bx)\n"
-		"bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    int Ax, int Bp, int Bj, int Bx)\n"
-		"bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned int Ax, int Bp, int Bj, unsigned int Bx)\n"
-		"bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    long long Ax, int Bp, int Bj, long long Bx)\n"
-		"bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned long long Ax, int Bp, int Bj, unsigned long long Bx)\n"
-		"bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    float Ax, int Bp, int Bj, float Bx)\n"
-		"bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    double Ax, int Bp, int Bj, double Bx)\n"
-		"bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    long double Ax, int Bp, int Bj, long double Bx)\n"
-		"bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    npy_cfloat_wrapper Ax, int Bp, int Bj, npy_cfloat_wrapper Bx)\n"
-		"bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    npy_cdouble_wrapper Ax, int Bp, int Bj, npy_cdouble_wrapper Bx)\n"
-		"bsr_transpose(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    npy_clongdouble_wrapper Ax, int Bp, int Bj, \n"
-		"    npy_clongdouble_wrapper Bx)\n"
+		"bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    signed char const [] Ax, int [] Bp, int [] Bj, signed char [] Bx)\n"
+		"bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned char const [] Ax, int [] Bp, int [] Bj, unsigned char [] Bx)\n"
+		"bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    short const [] Ax, int [] Bp, int [] Bj, short [] Bx)\n"
+		"bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned short const [] Ax, int [] Bp, int [] Bj, unsigned short [] Bx)\n"
+		"bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    int const [] Ax, int [] Bp, int [] Bj, int [] Bx)\n"
+		"bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned int const [] Ax, int [] Bp, int [] Bj, unsigned int [] Bx)\n"
+		"bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long long const [] Ax, int [] Bp, int [] Bj, long long [] Bx)\n"
+		"bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned long long const [] Ax, int [] Bp, int [] Bj, unsigned long long [] Bx)\n"
+		"bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    float const [] Ax, int [] Bp, int [] Bj, float [] Bx)\n"
+		"bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    double const [] Ax, int [] Bp, int [] Bj, double [] Bx)\n"
+		"bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long double const [] Ax, int [] Bp, int [] Bj, long double [] Bx)\n"
+		"bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cfloat_wrapper const [] Ax, int [] Bp, int [] Bj, npy_cfloat_wrapper [] Bx)\n"
+		"bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cdouble_wrapper const [] Ax, int [] Bp, int [] Bj, npy_cdouble_wrapper [] Bx)\n"
+		"bsr_transpose(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_clongdouble_wrapper const [] Ax, int [] Bp, int [] Bj, npy_clongdouble_wrapper [] Bx)\n"
 		""},
 	 { (char *)"bsr_matmat_pass2", _wrap_bsr_matmat_pass2, METH_VARARGS, (char *)"\n"
-		"bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap, \n"
-		"    int Aj, signed char Ax, int Bp, int Bj, signed char Bx, \n"
-		"    int Cp, int Cj, signed char Cx)\n"
-		"bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap, \n"
-		"    int Aj, unsigned char Ax, int Bp, int Bj, unsigned char Bx, \n"
-		"    int Cp, int Cj, unsigned char Cx)\n"
-		"bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap, \n"
-		"    int Aj, short Ax, int Bp, int Bj, short Bx, \n"
-		"    int Cp, int Cj, short Cx)\n"
-		"bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap, \n"
-		"    int Aj, unsigned short Ax, int Bp, int Bj, \n"
-		"    unsigned short Bx, int Cp, int Cj, unsigned short Cx)\n"
-		"bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap, \n"
-		"    int Aj, int Ax, int Bp, int Bj, int Bx, int Cp, \n"
-		"    int Cj, int Cx)\n"
-		"bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap, \n"
-		"    int Aj, unsigned int Ax, int Bp, int Bj, unsigned int Bx, \n"
-		"    int Cp, int Cj, unsigned int Cx)\n"
-		"bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap, \n"
-		"    int Aj, long long Ax, int Bp, int Bj, long long Bx, \n"
-		"    int Cp, int Cj, long long Cx)\n"
-		"bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap, \n"
-		"    int Aj, unsigned long long Ax, int Bp, int Bj, \n"
-		"    unsigned long long Bx, int Cp, int Cj, unsigned long long Cx)\n"
-		"bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap, \n"
-		"    int Aj, float Ax, int Bp, int Bj, float Bx, \n"
-		"    int Cp, int Cj, float Cx)\n"
-		"bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap, \n"
-		"    int Aj, double Ax, int Bp, int Bj, double Bx, \n"
-		"    int Cp, int Cj, double Cx)\n"
-		"bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap, \n"
-		"    int Aj, long double Ax, int Bp, int Bj, long double Bx, \n"
-		"    int Cp, int Cj, long double Cx)\n"
-		"bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap, \n"
-		"    int Aj, npy_cfloat_wrapper Ax, int Bp, int Bj, \n"
-		"    npy_cfloat_wrapper Bx, int Cp, int Cj, npy_cfloat_wrapper Cx)\n"
-		"bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap, \n"
-		"    int Aj, npy_cdouble_wrapper Ax, int Bp, int Bj, \n"
-		"    npy_cdouble_wrapper Bx, int Cp, int Cj, \n"
-		"    npy_cdouble_wrapper Cx)\n"
-		"bsr_matmat_pass2(int n_brow, int n_bcol, int R, int C, int N, int Ap, \n"
-		"    int Aj, npy_clongdouble_wrapper Ax, int Bp, \n"
-		"    int Bj, npy_clongdouble_wrapper Bx, int Cp, \n"
-		"    int Cj, npy_clongdouble_wrapper Cx)\n"
+		"bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, \n"
+		"    int const [] Aj, signed char const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    signed char const [] Bx, int [] Cp, int [] Cj, signed char [] Cx)\n"
+		"bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, \n"
+		"    int const [] Aj, unsigned char const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    unsigned char const [] Bx, int [] Cp, int [] Cj, unsigned char [] Cx)\n"
+		"bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, \n"
+		"    int const [] Aj, short const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    short const [] Bx, int [] Cp, int [] Cj, short [] Cx)\n"
+		"bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, \n"
+		"    int const [] Aj, unsigned short const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    unsigned short const [] Bx, int [] Cp, int [] Cj, unsigned short [] Cx)\n"
+		"bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, \n"
+		"    int const [] Aj, int const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    int const [] Bx, int [] Cp, int [] Cj, int [] Cx)\n"
+		"bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, \n"
+		"    int const [] Aj, unsigned int const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    unsigned int const [] Bx, int [] Cp, int [] Cj, unsigned int [] Cx)\n"
+		"bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, \n"
+		"    int const [] Aj, long long const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    long long const [] Bx, int [] Cp, int [] Cj, long long [] Cx)\n"
+		"bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, \n"
+		"    int const [] Aj, unsigned long long const [] Ax, int const [] Bp, \n"
+		"    int const [] Bj, unsigned long long const [] Bx, int [] Cp, int [] Cj, unsigned long long [] Cx)\n"
+		"bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, \n"
+		"    int const [] Aj, float const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    float const [] Bx, int [] Cp, int [] Cj, float [] Cx)\n"
+		"bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, \n"
+		"    int const [] Aj, double const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    double const [] Bx, int [] Cp, int [] Cj, double [] Cx)\n"
+		"bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, \n"
+		"    int const [] Aj, long double const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    long double const [] Bx, int [] Cp, int [] Cj, long double [] Cx)\n"
+		"bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, \n"
+		"    int const [] Aj, npy_cfloat_wrapper const [] Ax, int const [] Bp, \n"
+		"    int const [] Bj, npy_cfloat_wrapper const [] Bx, int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)\n"
+		"bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, \n"
+		"    int const [] Aj, npy_cdouble_wrapper const [] Ax, int const [] Bp, \n"
+		"    int const [] Bj, npy_cdouble_wrapper const [] Bx, int [] Cp, int [] Cj, \n"
+		"    npy_cdouble_wrapper [] Cx)\n"
+		"bsr_matmat_pass2(int const n_brow, int const n_bcol, int const R, int const C, int const N, int const [] Ap, \n"
+		"    int const [] Aj, npy_clongdouble_wrapper const [] Ax, int const [] Bp, \n"
+		"    int const [] Bj, npy_clongdouble_wrapper const [] Bx, int [] Cp, int [] Cj, \n"
+		"    npy_clongdouble_wrapper [] Cx)\n"
 		""},
 	 { (char *)"bsr_matvec", _wrap_bsr_matvec, METH_VARARGS, (char *)"\n"
-		"bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    signed char Ax, signed char Xx, signed char Yx)\n"
-		"bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned char Ax, unsigned char Xx, unsigned char Yx)\n"
-		"bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    short Ax, short Xx, short Yx)\n"
-		"bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned short Ax, unsigned short Xx, unsigned short Yx)\n"
-		"bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    int Ax, int Xx, int Yx)\n"
-		"bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned int Ax, unsigned int Xx, unsigned int Yx)\n"
-		"bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    long long Ax, long long Xx, long long Yx)\n"
-		"bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned long long Ax, unsigned long long Xx, \n"
-		"    unsigned long long Yx)\n"
-		"bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    float Ax, float Xx, float Yx)\n"
-		"bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    double Ax, double Xx, double Yx)\n"
-		"bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    long double Ax, long double Xx, long double Yx)\n"
-		"bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    npy_cfloat_wrapper Ax, npy_cfloat_wrapper Xx, \n"
-		"    npy_cfloat_wrapper Yx)\n"
-		"bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    npy_cdouble_wrapper Ax, npy_cdouble_wrapper Xx, \n"
-		"    npy_cdouble_wrapper Yx)\n"
-		"bsr_matvec(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    npy_clongdouble_wrapper Ax, npy_clongdouble_wrapper Xx, \n"
-		"    npy_clongdouble_wrapper Yx)\n"
+		"bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    signed char const [] Ax, signed char const [] Xx, signed char [] Yx)\n"
+		"bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned char const [] Ax, unsigned char const [] Xx, unsigned char [] Yx)\n"
+		"bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    short const [] Ax, short const [] Xx, short [] Yx)\n"
+		"bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned short const [] Ax, unsigned short const [] Xx, unsigned short [] Yx)\n"
+		"bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    int const [] Ax, int const [] Xx, int [] Yx)\n"
+		"bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned int const [] Ax, unsigned int const [] Xx, unsigned int [] Yx)\n"
+		"bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long long const [] Ax, long long const [] Xx, long long [] Yx)\n"
+		"bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned long long const [] Ax, unsigned long long const [] Xx, \n"
+		"    unsigned long long [] Yx)\n"
+		"bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    float const [] Ax, float const [] Xx, float [] Yx)\n"
+		"bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    double const [] Ax, double const [] Xx, double [] Yx)\n"
+		"bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long double const [] Ax, long double const [] Xx, long double [] Yx)\n"
+		"bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cfloat_wrapper const [] Ax, npy_cfloat_wrapper const [] Xx, \n"
+		"    npy_cfloat_wrapper [] Yx)\n"
+		"bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cdouble_wrapper const [] Ax, npy_cdouble_wrapper const [] Xx, \n"
+		"    npy_cdouble_wrapper [] Yx)\n"
+		"bsr_matvec(int const n_brow, int const n_bcol, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_clongdouble_wrapper const [] Ax, npy_clongdouble_wrapper const [] Xx, \n"
+		"    npy_clongdouble_wrapper [] Yx)\n"
 		""},
 	 { (char *)"bsr_matvecs", _wrap_bsr_matvecs, METH_VARARGS, (char *)"\n"
-		"bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap, \n"
-		"    int Aj, signed char Ax, signed char Xx, \n"
-		"    signed char Yx)\n"
-		"bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap, \n"
-		"    int Aj, unsigned char Ax, unsigned char Xx, \n"
-		"    unsigned char Yx)\n"
-		"bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap, \n"
-		"    int Aj, short Ax, short Xx, short Yx)\n"
-		"bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap, \n"
-		"    int Aj, unsigned short Ax, unsigned short Xx, \n"
-		"    unsigned short Yx)\n"
-		"bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap, \n"
-		"    int Aj, int Ax, int Xx, int Yx)\n"
-		"bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap, \n"
-		"    int Aj, unsigned int Ax, unsigned int Xx, \n"
-		"    unsigned int Yx)\n"
-		"bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap, \n"
-		"    int Aj, long long Ax, long long Xx, long long Yx)\n"
-		"bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap, \n"
-		"    int Aj, unsigned long long Ax, unsigned long long Xx, \n"
-		"    unsigned long long Yx)\n"
-		"bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap, \n"
-		"    int Aj, float Ax, float Xx, float Yx)\n"
-		"bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap, \n"
-		"    int Aj, double Ax, double Xx, double Yx)\n"
-		"bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap, \n"
-		"    int Aj, long double Ax, long double Xx, \n"
-		"    long double Yx)\n"
-		"bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap, \n"
-		"    int Aj, npy_cfloat_wrapper Ax, npy_cfloat_wrapper Xx, \n"
-		"    npy_cfloat_wrapper Yx)\n"
-		"bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap, \n"
-		"    int Aj, npy_cdouble_wrapper Ax, npy_cdouble_wrapper Xx, \n"
-		"    npy_cdouble_wrapper Yx)\n"
-		"bsr_matvecs(int n_brow, int n_bcol, int n_vecs, int R, int C, int Ap, \n"
-		"    int Aj, npy_clongdouble_wrapper Ax, npy_clongdouble_wrapper Xx, \n"
-		"    npy_clongdouble_wrapper Yx)\n"
+		"bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, \n"
+		"    int const [] Aj, signed char const [] Ax, signed char const [] Xx, \n"
+		"    signed char [] Yx)\n"
+		"bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, \n"
+		"    int const [] Aj, unsigned char const [] Ax, unsigned char const [] Xx, \n"
+		"    unsigned char [] Yx)\n"
+		"bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, \n"
+		"    int const [] Aj, short const [] Ax, short const [] Xx, short [] Yx)\n"
+		"bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, \n"
+		"    int const [] Aj, unsigned short const [] Ax, unsigned short const [] Xx, \n"
+		"    unsigned short [] Yx)\n"
+		"bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, \n"
+		"    int const [] Aj, int const [] Ax, int const [] Xx, int [] Yx)\n"
+		"bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, \n"
+		"    int const [] Aj, unsigned int const [] Ax, unsigned int const [] Xx, \n"
+		"    unsigned int [] Yx)\n"
+		"bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, \n"
+		"    int const [] Aj, long long const [] Ax, long long const [] Xx, \n"
+		"    long long [] Yx)\n"
+		"bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, \n"
+		"    int const [] Aj, unsigned long long const [] Ax, unsigned long long const [] Xx, \n"
+		"    unsigned long long [] Yx)\n"
+		"bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, \n"
+		"    int const [] Aj, float const [] Ax, float const [] Xx, float [] Yx)\n"
+		"bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, \n"
+		"    int const [] Aj, double const [] Ax, double const [] Xx, double [] Yx)\n"
+		"bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, \n"
+		"    int const [] Aj, long double const [] Ax, long double const [] Xx, \n"
+		"    long double [] Yx)\n"
+		"bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, \n"
+		"    int const [] Aj, npy_cfloat_wrapper const [] Ax, npy_cfloat_wrapper const [] Xx, \n"
+		"    npy_cfloat_wrapper [] Yx)\n"
+		"bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, \n"
+		"    int const [] Aj, npy_cdouble_wrapper const [] Ax, npy_cdouble_wrapper const [] Xx, \n"
+		"    npy_cdouble_wrapper [] Yx)\n"
+		"bsr_matvecs(int const n_brow, int const n_bcol, int const n_vecs, int const R, int const C, int const [] Ap, \n"
+		"    int const [] Aj, npy_clongdouble_wrapper const [] Ax, npy_clongdouble_wrapper const [] Xx, \n"
+		"    npy_clongdouble_wrapper [] Yx)\n"
 		""},
 	 { (char *)"bsr_elmul_bsr", _wrap_bsr_elmul_bsr, METH_VARARGS, (char *)"\n"
-		"bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    signed char Ax, int Bp, int Bj, signed char Bx, \n"
-		"    int Cp, int Cj, signed char Cx)\n"
-		"bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned char Ax, int Bp, int Bj, unsigned char Bx, \n"
-		"    int Cp, int Cj, unsigned char Cx)\n"
-		"bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    short Ax, int Bp, int Bj, short Bx, int Cp, \n"
-		"    int Cj, short Cx)\n"
-		"bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned short Ax, int Bp, int Bj, unsigned short Bx, \n"
-		"    int Cp, int Cj, unsigned short Cx)\n"
-		"bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    int Ax, int Bp, int Bj, int Bx, int Cp, int Cj, \n"
-		"    int Cx)\n"
-		"bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned int Ax, int Bp, int Bj, unsigned int Bx, \n"
-		"    int Cp, int Cj, unsigned int Cx)\n"
-		"bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    long long Ax, int Bp, int Bj, long long Bx, \n"
-		"    int Cp, int Cj, long long Cx)\n"
-		"bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned long long Ax, int Bp, int Bj, unsigned long long Bx, \n"
-		"    int Cp, int Cj, unsigned long long Cx)\n"
-		"bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    float Ax, int Bp, int Bj, float Bx, int Cp, \n"
-		"    int Cj, float Cx)\n"
-		"bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    double Ax, int Bp, int Bj, double Bx, int Cp, \n"
-		"    int Cj, double Cx)\n"
-		"bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    long double Ax, int Bp, int Bj, long double Bx, \n"
-		"    int Cp, int Cj, long double Cx)\n"
-		"bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    npy_cfloat_wrapper Ax, int Bp, int Bj, npy_cfloat_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_cfloat_wrapper Cx)\n"
-		"bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    npy_cdouble_wrapper Ax, int Bp, int Bj, npy_cdouble_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_cdouble_wrapper Cx)\n"
-		"bsr_elmul_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    npy_clongdouble_wrapper Ax, int Bp, int Bj, \n"
-		"    npy_clongdouble_wrapper Bx, int Cp, int Cj, npy_clongdouble_wrapper Cx)\n"
+		"bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    signed char const [] Ax, int const [] Bp, int const [] Bj, signed char const [] Bx, \n"
+		"    int [] Cp, int [] Cj, signed char [] Cx)\n"
+		"bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned char const [] Ax, int const [] Bp, int const [] Bj, unsigned char const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned char [] Cx)\n"
+		"bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    short const [] Ax, int const [] Bp, int const [] Bj, short const [] Bx, \n"
+		"    int [] Cp, int [] Cj, short [] Cx)\n"
+		"bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned short const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    unsigned short const [] Bx, int [] Cp, int [] Cj, unsigned short [] Cx)\n"
+		"bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    int const [] Ax, int const [] Bp, int const [] Bj, int const [] Bx, \n"
+		"    int [] Cp, int [] Cj, int [] Cx)\n"
+		"bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned int const [] Ax, int const [] Bp, int const [] Bj, unsigned int const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned int [] Cx)\n"
+		"bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long long const [] Ax, int const [] Bp, int const [] Bj, long long const [] Bx, \n"
+		"    int [] Cp, int [] Cj, long long [] Cx)\n"
+		"bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned long long const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    unsigned long long const [] Bx, int [] Cp, int [] Cj, unsigned long long [] Cx)\n"
+		"bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    float const [] Ax, int const [] Bp, int const [] Bj, float const [] Bx, \n"
+		"    int [] Cp, int [] Cj, float [] Cx)\n"
+		"bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    double const [] Ax, int const [] Bp, int const [] Bj, double const [] Bx, \n"
+		"    int [] Cp, int [] Cj, double [] Cx)\n"
+		"bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long double const [] Ax, int const [] Bp, int const [] Bj, long double const [] Bx, \n"
+		"    int [] Cp, int [] Cj, long double [] Cx)\n"
+		"bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cfloat_wrapper const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    npy_cfloat_wrapper const [] Bx, int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)\n"
+		"bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cdouble_wrapper const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    npy_cdouble_wrapper const [] Bx, int [] Cp, int [] Cj, npy_cdouble_wrapper [] Cx)\n"
+		"bsr_elmul_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_clongdouble_wrapper const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    npy_clongdouble_wrapper const [] Bx, int [] Cp, int [] Cj, npy_clongdouble_wrapper [] Cx)\n"
 		""},
 	 { (char *)"bsr_eldiv_bsr", _wrap_bsr_eldiv_bsr, METH_VARARGS, (char *)"\n"
-		"bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    signed char Ax, int Bp, int Bj, signed char Bx, \n"
-		"    int Cp, int Cj, signed char Cx)\n"
-		"bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned char Ax, int Bp, int Bj, unsigned char Bx, \n"
-		"    int Cp, int Cj, unsigned char Cx)\n"
-		"bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    short Ax, int Bp, int Bj, short Bx, int Cp, \n"
-		"    int Cj, short Cx)\n"
-		"bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned short Ax, int Bp, int Bj, unsigned short Bx, \n"
-		"    int Cp, int Cj, unsigned short Cx)\n"
-		"bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    int Ax, int Bp, int Bj, int Bx, int Cp, int Cj, \n"
-		"    int Cx)\n"
-		"bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned int Ax, int Bp, int Bj, unsigned int Bx, \n"
-		"    int Cp, int Cj, unsigned int Cx)\n"
-		"bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    long long Ax, int Bp, int Bj, long long Bx, \n"
-		"    int Cp, int Cj, long long Cx)\n"
-		"bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned long long Ax, int Bp, int Bj, unsigned long long Bx, \n"
-		"    int Cp, int Cj, unsigned long long Cx)\n"
-		"bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    float Ax, int Bp, int Bj, float Bx, int Cp, \n"
-		"    int Cj, float Cx)\n"
-		"bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    double Ax, int Bp, int Bj, double Bx, int Cp, \n"
-		"    int Cj, double Cx)\n"
-		"bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    long double Ax, int Bp, int Bj, long double Bx, \n"
-		"    int Cp, int Cj, long double Cx)\n"
-		"bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    npy_cfloat_wrapper Ax, int Bp, int Bj, npy_cfloat_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_cfloat_wrapper Cx)\n"
-		"bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    npy_cdouble_wrapper Ax, int Bp, int Bj, npy_cdouble_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_cdouble_wrapper Cx)\n"
-		"bsr_eldiv_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    npy_clongdouble_wrapper Ax, int Bp, int Bj, \n"
-		"    npy_clongdouble_wrapper Bx, int Cp, int Cj, npy_clongdouble_wrapper Cx)\n"
+		"bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    signed char const [] Ax, int const [] Bp, int const [] Bj, signed char const [] Bx, \n"
+		"    int [] Cp, int [] Cj, signed char [] Cx)\n"
+		"bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned char const [] Ax, int const [] Bp, int const [] Bj, unsigned char const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned char [] Cx)\n"
+		"bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    short const [] Ax, int const [] Bp, int const [] Bj, short const [] Bx, \n"
+		"    int [] Cp, int [] Cj, short [] Cx)\n"
+		"bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned short const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    unsigned short const [] Bx, int [] Cp, int [] Cj, unsigned short [] Cx)\n"
+		"bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    int const [] Ax, int const [] Bp, int const [] Bj, int const [] Bx, \n"
+		"    int [] Cp, int [] Cj, int [] Cx)\n"
+		"bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned int const [] Ax, int const [] Bp, int const [] Bj, unsigned int const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned int [] Cx)\n"
+		"bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long long const [] Ax, int const [] Bp, int const [] Bj, long long const [] Bx, \n"
+		"    int [] Cp, int [] Cj, long long [] Cx)\n"
+		"bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned long long const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    unsigned long long const [] Bx, int [] Cp, int [] Cj, unsigned long long [] Cx)\n"
+		"bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    float const [] Ax, int const [] Bp, int const [] Bj, float const [] Bx, \n"
+		"    int [] Cp, int [] Cj, float [] Cx)\n"
+		"bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    double const [] Ax, int const [] Bp, int const [] Bj, double const [] Bx, \n"
+		"    int [] Cp, int [] Cj, double [] Cx)\n"
+		"bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long double const [] Ax, int const [] Bp, int const [] Bj, long double const [] Bx, \n"
+		"    int [] Cp, int [] Cj, long double [] Cx)\n"
+		"bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cfloat_wrapper const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    npy_cfloat_wrapper const [] Bx, int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)\n"
+		"bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cdouble_wrapper const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    npy_cdouble_wrapper const [] Bx, int [] Cp, int [] Cj, npy_cdouble_wrapper [] Cx)\n"
+		"bsr_eldiv_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_clongdouble_wrapper const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    npy_clongdouble_wrapper const [] Bx, int [] Cp, int [] Cj, npy_clongdouble_wrapper [] Cx)\n"
 		""},
 	 { (char *)"bsr_plus_bsr", _wrap_bsr_plus_bsr, METH_VARARGS, (char *)"\n"
-		"bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    signed char Ax, int Bp, int Bj, signed char Bx, \n"
-		"    int Cp, int Cj, signed char Cx)\n"
-		"bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned char Ax, int Bp, int Bj, unsigned char Bx, \n"
-		"    int Cp, int Cj, unsigned char Cx)\n"
-		"bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    short Ax, int Bp, int Bj, short Bx, int Cp, \n"
-		"    int Cj, short Cx)\n"
-		"bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned short Ax, int Bp, int Bj, unsigned short Bx, \n"
-		"    int Cp, int Cj, unsigned short Cx)\n"
-		"bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    int Ax, int Bp, int Bj, int Bx, int Cp, int Cj, \n"
-		"    int Cx)\n"
-		"bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned int Ax, int Bp, int Bj, unsigned int Bx, \n"
-		"    int Cp, int Cj, unsigned int Cx)\n"
-		"bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    long long Ax, int Bp, int Bj, long long Bx, \n"
-		"    int Cp, int Cj, long long Cx)\n"
-		"bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned long long Ax, int Bp, int Bj, unsigned long long Bx, \n"
-		"    int Cp, int Cj, unsigned long long Cx)\n"
-		"bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    float Ax, int Bp, int Bj, float Bx, int Cp, \n"
-		"    int Cj, float Cx)\n"
-		"bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    double Ax, int Bp, int Bj, double Bx, int Cp, \n"
-		"    int Cj, double Cx)\n"
-		"bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    long double Ax, int Bp, int Bj, long double Bx, \n"
-		"    int Cp, int Cj, long double Cx)\n"
-		"bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    npy_cfloat_wrapper Ax, int Bp, int Bj, npy_cfloat_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_cfloat_wrapper Cx)\n"
-		"bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    npy_cdouble_wrapper Ax, int Bp, int Bj, npy_cdouble_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_cdouble_wrapper Cx)\n"
-		"bsr_plus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    npy_clongdouble_wrapper Ax, int Bp, int Bj, \n"
-		"    npy_clongdouble_wrapper Bx, int Cp, int Cj, npy_clongdouble_wrapper Cx)\n"
+		"bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    signed char const [] Ax, int const [] Bp, int const [] Bj, signed char const [] Bx, \n"
+		"    int [] Cp, int [] Cj, signed char [] Cx)\n"
+		"bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned char const [] Ax, int const [] Bp, int const [] Bj, unsigned char const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned char [] Cx)\n"
+		"bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    short const [] Ax, int const [] Bp, int const [] Bj, short const [] Bx, \n"
+		"    int [] Cp, int [] Cj, short [] Cx)\n"
+		"bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned short const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    unsigned short const [] Bx, int [] Cp, int [] Cj, unsigned short [] Cx)\n"
+		"bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    int const [] Ax, int const [] Bp, int const [] Bj, int const [] Bx, \n"
+		"    int [] Cp, int [] Cj, int [] Cx)\n"
+		"bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned int const [] Ax, int const [] Bp, int const [] Bj, unsigned int const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned int [] Cx)\n"
+		"bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long long const [] Ax, int const [] Bp, int const [] Bj, long long const [] Bx, \n"
+		"    int [] Cp, int [] Cj, long long [] Cx)\n"
+		"bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned long long const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    unsigned long long const [] Bx, int [] Cp, int [] Cj, unsigned long long [] Cx)\n"
+		"bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    float const [] Ax, int const [] Bp, int const [] Bj, float const [] Bx, \n"
+		"    int [] Cp, int [] Cj, float [] Cx)\n"
+		"bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    double const [] Ax, int const [] Bp, int const [] Bj, double const [] Bx, \n"
+		"    int [] Cp, int [] Cj, double [] Cx)\n"
+		"bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long double const [] Ax, int const [] Bp, int const [] Bj, long double const [] Bx, \n"
+		"    int [] Cp, int [] Cj, long double [] Cx)\n"
+		"bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cfloat_wrapper const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    npy_cfloat_wrapper const [] Bx, int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)\n"
+		"bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cdouble_wrapper const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    npy_cdouble_wrapper const [] Bx, int [] Cp, int [] Cj, npy_cdouble_wrapper [] Cx)\n"
+		"bsr_plus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_clongdouble_wrapper const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    npy_clongdouble_wrapper const [] Bx, int [] Cp, int [] Cj, npy_clongdouble_wrapper [] Cx)\n"
 		""},
 	 { (char *)"bsr_minus_bsr", _wrap_bsr_minus_bsr, METH_VARARGS, (char *)"\n"
-		"bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    signed char Ax, int Bp, int Bj, signed char Bx, \n"
-		"    int Cp, int Cj, signed char Cx)\n"
-		"bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned char Ax, int Bp, int Bj, unsigned char Bx, \n"
-		"    int Cp, int Cj, unsigned char Cx)\n"
-		"bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    short Ax, int Bp, int Bj, short Bx, int Cp, \n"
-		"    int Cj, short Cx)\n"
-		"bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned short Ax, int Bp, int Bj, unsigned short Bx, \n"
-		"    int Cp, int Cj, unsigned short Cx)\n"
-		"bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    int Ax, int Bp, int Bj, int Bx, int Cp, int Cj, \n"
-		"    int Cx)\n"
-		"bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned int Ax, int Bp, int Bj, unsigned int Bx, \n"
-		"    int Cp, int Cj, unsigned int Cx)\n"
-		"bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    long long Ax, int Bp, int Bj, long long Bx, \n"
-		"    int Cp, int Cj, long long Cx)\n"
-		"bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned long long Ax, int Bp, int Bj, unsigned long long Bx, \n"
-		"    int Cp, int Cj, unsigned long long Cx)\n"
-		"bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    float Ax, int Bp, int Bj, float Bx, int Cp, \n"
-		"    int Cj, float Cx)\n"
-		"bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    double Ax, int Bp, int Bj, double Bx, int Cp, \n"
-		"    int Cj, double Cx)\n"
-		"bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    long double Ax, int Bp, int Bj, long double Bx, \n"
-		"    int Cp, int Cj, long double Cx)\n"
-		"bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    npy_cfloat_wrapper Ax, int Bp, int Bj, npy_cfloat_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_cfloat_wrapper Cx)\n"
-		"bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    npy_cdouble_wrapper Ax, int Bp, int Bj, npy_cdouble_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_cdouble_wrapper Cx)\n"
-		"bsr_minus_bsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    npy_clongdouble_wrapper Ax, int Bp, int Bj, \n"
-		"    npy_clongdouble_wrapper Bx, int Cp, int Cj, npy_clongdouble_wrapper Cx)\n"
+		"bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    signed char const [] Ax, int const [] Bp, int const [] Bj, signed char const [] Bx, \n"
+		"    int [] Cp, int [] Cj, signed char [] Cx)\n"
+		"bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned char const [] Ax, int const [] Bp, int const [] Bj, unsigned char const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned char [] Cx)\n"
+		"bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    short const [] Ax, int const [] Bp, int const [] Bj, short const [] Bx, \n"
+		"    int [] Cp, int [] Cj, short [] Cx)\n"
+		"bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned short const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    unsigned short const [] Bx, int [] Cp, int [] Cj, unsigned short [] Cx)\n"
+		"bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    int const [] Ax, int const [] Bp, int const [] Bj, int const [] Bx, \n"
+		"    int [] Cp, int [] Cj, int [] Cx)\n"
+		"bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned int const [] Ax, int const [] Bp, int const [] Bj, unsigned int const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned int [] Cx)\n"
+		"bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long long const [] Ax, int const [] Bp, int const [] Bj, long long const [] Bx, \n"
+		"    int [] Cp, int [] Cj, long long [] Cx)\n"
+		"bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned long long const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    unsigned long long const [] Bx, int [] Cp, int [] Cj, unsigned long long [] Cx)\n"
+		"bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    float const [] Ax, int const [] Bp, int const [] Bj, float const [] Bx, \n"
+		"    int [] Cp, int [] Cj, float [] Cx)\n"
+		"bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    double const [] Ax, int const [] Bp, int const [] Bj, double const [] Bx, \n"
+		"    int [] Cp, int [] Cj, double [] Cx)\n"
+		"bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long double const [] Ax, int const [] Bp, int const [] Bj, long double const [] Bx, \n"
+		"    int [] Cp, int [] Cj, long double [] Cx)\n"
+		"bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cfloat_wrapper const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    npy_cfloat_wrapper const [] Bx, int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)\n"
+		"bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cdouble_wrapper const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    npy_cdouble_wrapper const [] Bx, int [] Cp, int [] Cj, npy_cdouble_wrapper [] Cx)\n"
+		"bsr_minus_bsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_clongdouble_wrapper const [] Ax, int const [] Bp, int const [] Bj, \n"
+		"    npy_clongdouble_wrapper const [] Bx, int [] Cp, int [] Cj, npy_clongdouble_wrapper [] Cx)\n"
 		""},
 	 { (char *)"bsr_sort_indices", _wrap_bsr_sort_indices, METH_VARARGS, (char *)"\n"
-		"bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    signed char Ax)\n"
-		"bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned char Ax)\n"
-		"bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    short Ax)\n"
-		"bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned short Ax)\n"
-		"bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    int Ax)\n"
-		"bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned int Ax)\n"
-		"bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    long long Ax)\n"
-		"bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    unsigned long long Ax)\n"
-		"bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    float Ax)\n"
-		"bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    double Ax)\n"
-		"bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    long double Ax)\n"
-		"bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    npy_cfloat_wrapper Ax)\n"
-		"bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    npy_cdouble_wrapper Ax)\n"
-		"bsr_sort_indices(int n_brow, int n_bcol, int R, int C, int Ap, int Aj, \n"
-		"    npy_clongdouble_wrapper Ax)\n"
+		"bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, \n"
+		"    signed char [] Ax)\n"
+		"bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, \n"
+		"    unsigned char [] Ax)\n"
+		"bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, \n"
+		"    short [] Ax)\n"
+		"bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, \n"
+		"    unsigned short [] Ax)\n"
+		"bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, \n"
+		"    int [] Ax)\n"
+		"bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, \n"
+		"    unsigned int [] Ax)\n"
+		"bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, \n"
+		"    long long [] Ax)\n"
+		"bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, \n"
+		"    unsigned long long [] Ax)\n"
+		"bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, \n"
+		"    float [] Ax)\n"
+		"bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, \n"
+		"    double [] Ax)\n"
+		"bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, \n"
+		"    long double [] Ax)\n"
+		"bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, \n"
+		"    npy_cfloat_wrapper [] Ax)\n"
+		"bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, \n"
+		"    npy_cdouble_wrapper [] Ax)\n"
+		"bsr_sort_indices(int const n_brow, int const n_bcol, int const R, int const C, int [] Ap, int [] Aj, \n"
+		"    npy_clongdouble_wrapper [] Ax)\n"
 		""},
 	 { NULL, NULL, 0, NULL }
 };
@@ -42743,24 +42976,23 @@ extern "C" {
   swig_varlink_type(void) {
     static char varlink__doc__[] = "Swig var link object";
     static PyTypeObject varlink_type;
-    static int type_init = 0;  
+    static int type_init = 0;
     if (!type_init) {
-      const PyTypeObject tmp
-      = {
+      const PyTypeObject tmp = {
         /* PyObject header changed in Python 3 */
 #if PY_VERSION_HEX >= 0x03000000
-        PyVarObject_HEAD_INIT(&PyType_Type, 0)
+        PyVarObject_HEAD_INIT(NULL, 0)
 #else
         PyObject_HEAD_INIT(NULL)
-        0,                                  /* Number of items in variable part (ob_size) */
+        0,                                  /* ob_size */
 #endif
-        (char *)"swigvarlink",              /* Type name (tp_name) */
-        sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
-        0,                                  /* Itemsize (tp_itemsize) */
-        (destructor) swig_varlink_dealloc,  /* Deallocator (tp_dealloc) */ 
-        (printfunc) swig_varlink_print,     /* Print (tp_print) */
-        (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
-        (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
+        (char *)"swigvarlink",              /* tp_name */
+        sizeof(swig_varlinkobject),         /* tp_basicsize */
+        0,                                  /* tp_itemsize */
+        (destructor) swig_varlink_dealloc,  /* tp_dealloc */
+        (printfunc) swig_varlink_print,     /* tp_print */
+        (getattrfunc) swig_varlink_getattr, /* tp_getattr */
+        (setattrfunc) swig_varlink_setattr, /* tp_setattr */
         0,                                  /* tp_compare */
         (reprfunc) swig_varlink_repr,       /* tp_repr */
         0,                                  /* tp_as_number */
@@ -42784,16 +43016,21 @@ extern "C" {
 #if PY_VERSION_HEX >= 0x02030000
         0,                                  /* tp_del */
 #endif
+#if PY_VERSION_HEX >= 0x02060000
+        0,                                  /* tp_version */
+#endif
 #ifdef COUNT_ALLOCS
         0,0,0,0                             /* tp_alloc -> tp_next */
 #endif
       };
       varlink_type = tmp;
-      /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
-#if PY_VERSION_HEX < 0x03000000
+      type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
       varlink_type.ob_type = &PyType_Type;
+#else
+      if (PyType_Ready(&varlink_type) < 0)
+      return NULL;
 #endif
-      type_init = 1;
     }
     return &varlink_type;
   }
@@ -42844,7 +43081,7 @@ extern "C" {
     for (i = 0; constants[i].type; ++i) {
       switch(constants[i].type) {
       case SWIG_PY_POINTER:
-        obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
+        obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
         break;
       case SWIG_PY_BINARY:
         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
@@ -42925,10 +43162,19 @@ PyObject*
 void
 #endif
 SWIG_init(void) {
-  PyObject *m, *d;  
+  PyObject *m, *d, *md;
 #if PY_VERSION_HEX >= 0x03000000
   static struct PyModuleDef SWIG_module = {
+# if PY_VERSION_HEX >= 0x03020000
     PyModuleDef_HEAD_INIT,
+# else
+    {
+      PyObject_HEAD_INIT(NULL)
+      NULL, /* m_init */
+      0,    /* m_index */
+      NULL, /* m_copy */
+    },
+# endif
     (char *) SWIG_name,
     NULL,
     -1,
@@ -42940,6 +43186,49 @@ SWIG_init(void) {
   };
 #endif
   
+#if defined(SWIGPYTHON_BUILTIN)
+  static SwigPyClientData SwigPyObject_clientdata = {
+    0, 0, 0, 0, 0, 0, 0
+  };
+  static PyGetSetDef this_getset_def = {
+    (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
+  };
+  static SwigPyGetSet thisown_getset_closure = {
+    (PyCFunction) SwigPyObject_own,
+    (PyCFunction) SwigPyObject_own
+  };
+  static PyGetSetDef thisown_getset_def = {
+    (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
+  };
+  PyObject *metatype_args;
+  PyTypeObject *builtin_pytype;
+  int builtin_base_count;
+  swig_type_info *builtin_basetype;
+  PyObject *tuple;
+  PyGetSetDescrObject *static_getset;
+  PyTypeObject *metatype;
+  SwigPyClientData *cd;
+  PyObject *public_interface, *public_symbol;
+  PyObject *this_descr;
+  PyObject *thisown_descr;
+  int i;
+  
+  (void)builtin_pytype;
+  (void)builtin_base_count;
+  (void)builtin_basetype;
+  (void)tuple;
+  (void)static_getset;
+  
+  /* metatype is used to implement static member variables. */
+  metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
+  assert(metatype_args);
+  metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
+  assert(metatype);
+  Py_DECREF(metatype_args);
+  metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
+  assert(PyType_Ready(metatype) >= 0);
+#endif
+  
   /* Fix SwigMethods to carry the callback ptrs when needed */
   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
   
@@ -42948,11 +43237,47 @@ SWIG_init(void) {
 #else
   m = Py_InitModule((char *) SWIG_name, SwigMethods);
 #endif
-  d = PyModule_GetDict(m);
+  md = d = PyModule_GetDict(m);
   
   SWIG_InitializeModule(0);
-  SWIG_InstallConstants(d,swig_const_table);
   
+#ifdef SWIGPYTHON_BUILTIN
+  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
+  assert(SwigPyObject_stype);
+  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
+  if (!cd) {
+    SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
+    SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
+  } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
+    PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
+# if PY_VERSION_HEX >= 0x03000000
+    return NULL;
+# else
+    return;
+# endif
+  }
+  
+  /* All objects have a 'this' attribute */
+  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
+  (void)this_descr;
+  
+  /* All objects have a 'thisown' attribute */
+  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
+  (void)thisown_descr;
+  
+  public_interface = PyList_New(0);
+  public_symbol = 0;
+  (void)public_symbol;
+  
+  PyDict_SetItemString(md, "__all__", public_interface);
+  Py_DECREF(public_interface);
+  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
+  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
+  for (i = 0; swig_const_table[i].name != 0; ++i)
+  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
+#endif
+  
+  SWIG_InstallConstants(d,swig_const_table);
   
   
   import_array();
diff --git a/scipy/sparse/sparsetools/coo.py b/scipy/sparse/sparsetools/coo.py
index 48d8a03..1adb9ed 100644
--- a/scipy/sparse/sparsetools/coo.py
+++ b/scipy/sparse/sparsetools/coo.py
@@ -1,5 +1,5 @@
 # This file was automatically generated by SWIG (http://www.swig.org).
-# Version 2.0.4
+# Version 2.0.7
 #
 # Do not make changes to this file unless you know what you are doing--modify
 # the SWIG interface file instead.
@@ -68,138 +68,141 @@ except AttributeError:
 
 
 
-def coo_count_diagonals(*args):
-  """coo_count_diagonals(int nnz, int Ai, int Aj) -> int"""
-  return _coo.coo_count_diagonals(*args)
-# This file is compatible with both classic and new-style classes.
-
-
 def coo_tocsr(*args):
   """
-    coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, signed char Ax, 
-        int Bp, int Bj, signed char Bx)
-    coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned char Ax, 
-        int Bp, int Bj, unsigned char Bx)
-    coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, short Ax, 
-        int Bp, int Bj, short Bx)
-    coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned short Ax, 
-        int Bp, int Bj, unsigned short Bx)
-    coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, int Ax, 
-        int Bp, int Bj, int Bx)
-    coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned int Ax, 
-        int Bp, int Bj, unsigned int Bx)
-    coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, long long Ax, 
-        int Bp, int Bj, long long Bx)
-    coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned long long Ax, 
-        int Bp, int Bj, unsigned long long Bx)
-    coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, float Ax, 
-        int Bp, int Bj, float Bx)
-    coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, double Ax, 
-        int Bp, int Bj, double Bx)
-    coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, long double Ax, 
-        int Bp, int Bj, long double Bx)
-    coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, npy_cfloat_wrapper Ax, 
-        int Bp, int Bj, npy_cfloat_wrapper Bx)
-    coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, npy_cdouble_wrapper Ax, 
-        int Bp, int Bj, npy_cdouble_wrapper Bx)
-    coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, npy_clongdouble_wrapper Ax, 
-        int Bp, int Bj, npy_clongdouble_wrapper Bx)
+    coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        signed char const [] Ax, int [] Bp, int [] Bj, signed char [] Bx)
+    coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        unsigned char const [] Ax, int [] Bp, int [] Bj, unsigned char [] Bx)
+    coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        short const [] Ax, int [] Bp, int [] Bj, short [] Bx)
+    coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        unsigned short const [] Ax, int [] Bp, int [] Bj, unsigned short [] Bx)
+    coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        int const [] Ax, int [] Bp, int [] Bj, int [] Bx)
+    coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        unsigned int const [] Ax, int [] Bp, int [] Bj, unsigned int [] Bx)
+    coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        long long const [] Ax, int [] Bp, int [] Bj, long long [] Bx)
+    coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        unsigned long long const [] Ax, int [] Bp, int [] Bj, unsigned long long [] Bx)
+    coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        float const [] Ax, int [] Bp, int [] Bj, float [] Bx)
+    coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        double const [] Ax, int [] Bp, int [] Bj, double [] Bx)
+    coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        long double const [] Ax, int [] Bp, int [] Bj, long double [] Bx)
+    coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        npy_cfloat_wrapper const [] Ax, int [] Bp, int [] Bj, npy_cfloat_wrapper [] Bx)
+    coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        npy_cdouble_wrapper const [] Ax, int [] Bp, int [] Bj, npy_cdouble_wrapper [] Bx)
+    coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        npy_clongdouble_wrapper const [] Ax, int [] Bp, int [] Bj, npy_clongdouble_wrapper [] Bx)
     """
   return _coo.coo_tocsr(*args)
 
 def coo_tocsc(*args):
   """
-    coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, signed char Ax, 
-        int Bp, int Bi, signed char Bx)
-    coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned char Ax, 
-        int Bp, int Bi, unsigned char Bx)
-    coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, short Ax, 
-        int Bp, int Bi, short Bx)
-    coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned short Ax, 
-        int Bp, int Bi, unsigned short Bx)
-    coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, int Ax, 
-        int Bp, int Bi, int Bx)
-    coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned int Ax, 
-        int Bp, int Bi, unsigned int Bx)
-    coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, long long Ax, 
-        int Bp, int Bi, long long Bx)
-    coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned long long Ax, 
-        int Bp, int Bi, unsigned long long Bx)
-    coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, float Ax, 
-        int Bp, int Bi, float Bx)
-    coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, double Ax, 
-        int Bp, int Bi, double Bx)
-    coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, long double Ax, 
-        int Bp, int Bi, long double Bx)
-    coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, npy_cfloat_wrapper Ax, 
-        int Bp, int Bi, npy_cfloat_wrapper Bx)
-    coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, npy_cdouble_wrapper Ax, 
-        int Bp, int Bi, npy_cdouble_wrapper Bx)
-    coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, npy_clongdouble_wrapper Ax, 
-        int Bp, int Bi, npy_clongdouble_wrapper Bx)
+    coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        signed char const [] Ax, int [] Bp, int [] Bi, signed char [] Bx)
+    coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        unsigned char const [] Ax, int [] Bp, int [] Bi, unsigned char [] Bx)
+    coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        short const [] Ax, int [] Bp, int [] Bi, short [] Bx)
+    coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        unsigned short const [] Ax, int [] Bp, int [] Bi, unsigned short [] Bx)
+    coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        int const [] Ax, int [] Bp, int [] Bi, int [] Bx)
+    coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        unsigned int const [] Ax, int [] Bp, int [] Bi, unsigned int [] Bx)
+    coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        long long const [] Ax, int [] Bp, int [] Bi, long long [] Bx)
+    coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        unsigned long long const [] Ax, int [] Bp, int [] Bi, unsigned long long [] Bx)
+    coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        float const [] Ax, int [] Bp, int [] Bi, float [] Bx)
+    coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        double const [] Ax, int [] Bp, int [] Bi, double [] Bx)
+    coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        long double const [] Ax, int [] Bp, int [] Bi, long double [] Bx)
+    coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        npy_cfloat_wrapper const [] Ax, int [] Bp, int [] Bi, npy_cfloat_wrapper [] Bx)
+    coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        npy_cdouble_wrapper const [] Ax, int [] Bp, int [] Bi, npy_cdouble_wrapper [] Bx)
+    coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        npy_clongdouble_wrapper const [] Ax, int [] Bp, int [] Bi, npy_clongdouble_wrapper [] Bx)
     """
   return _coo.coo_tocsc(*args)
 
 def coo_todense(*args):
   """
-    coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, signed char Ax, 
-        signed char Bx, int fortran)
-    coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned char Ax, 
-        unsigned char Bx, int fortran)
-    coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, short Ax, 
-        short Bx, int fortran)
-    coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned short Ax, 
-        unsigned short Bx, int fortran)
-    coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, int Ax, 
-        int Bx, int fortran)
-    coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned int Ax, 
-        unsigned int Bx, int fortran)
-    coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, long long Ax, 
-        long long Bx, int fortran)
-    coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned long long Ax, 
-        unsigned long long Bx, int fortran)
-    coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, float Ax, 
-        float Bx, int fortran)
-    coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, double Ax, 
-        double Bx, int fortran)
-    coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, long double Ax, 
-        long double Bx, int fortran)
-    coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, npy_cfloat_wrapper Ax, 
-        npy_cfloat_wrapper Bx, int fortran)
-    coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, npy_cdouble_wrapper Ax, 
-        npy_cdouble_wrapper Bx, int fortran)
-    coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, npy_clongdouble_wrapper Ax, 
-        npy_clongdouble_wrapper Bx, 
-        int fortran)
+    coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        signed char const [] Ax, signed char [] Bx, int fortran)
+    coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        unsigned char const [] Ax, unsigned char [] Bx, int fortran)
+    coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        short const [] Ax, short [] Bx, int fortran)
+    coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        unsigned short const [] Ax, unsigned short [] Bx, int fortran)
+    coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        int const [] Ax, int [] Bx, int fortran)
+    coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        unsigned int const [] Ax, unsigned int [] Bx, int fortran)
+    coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        long long const [] Ax, long long [] Bx, int fortran)
+    coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        unsigned long long const [] Ax, unsigned long long [] Bx, int fortran)
+    coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        float const [] Ax, float [] Bx, int fortran)
+    coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        double const [] Ax, double [] Bx, int fortran)
+    coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        long double const [] Ax, long double [] Bx, int fortran)
+    coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        npy_cfloat_wrapper const [] Ax, npy_cfloat_wrapper [] Bx, int fortran)
+    coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        npy_cdouble_wrapper const [] Ax, npy_cdouble_wrapper [] Bx, int fortran)
+    coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, 
+        npy_clongdouble_wrapper const [] Ax, npy_clongdouble_wrapper [] Bx, int fortran)
     """
   return _coo.coo_todense(*args)
 
 def coo_matvec(*args):
   """
-    coo_matvec(int nnz, int Ai, int Aj, signed char Ax, signed char Xx, 
-        signed char Yx)
-    coo_matvec(int nnz, int Ai, int Aj, unsigned char Ax, unsigned char Xx, 
-        unsigned char Yx)
-    coo_matvec(int nnz, int Ai, int Aj, short Ax, short Xx, short Yx)
-    coo_matvec(int nnz, int Ai, int Aj, unsigned short Ax, unsigned short Xx, 
-        unsigned short Yx)
-    coo_matvec(int nnz, int Ai, int Aj, int Ax, int Xx, int Yx)
-    coo_matvec(int nnz, int Ai, int Aj, unsigned int Ax, unsigned int Xx, 
-        unsigned int Yx)
-    coo_matvec(int nnz, int Ai, int Aj, long long Ax, long long Xx, 
-        long long Yx)
-    coo_matvec(int nnz, int Ai, int Aj, unsigned long long Ax, unsigned long long Xx, 
-        unsigned long long Yx)
-    coo_matvec(int nnz, int Ai, int Aj, float Ax, float Xx, float Yx)
-    coo_matvec(int nnz, int Ai, int Aj, double Ax, double Xx, double Yx)
-    coo_matvec(int nnz, int Ai, int Aj, long double Ax, long double Xx, 
-        long double Yx)
-    coo_matvec(int nnz, int Ai, int Aj, npy_cfloat_wrapper Ax, npy_cfloat_wrapper Xx, 
-        npy_cfloat_wrapper Yx)
-    coo_matvec(int nnz, int Ai, int Aj, npy_cdouble_wrapper Ax, npy_cdouble_wrapper Xx, 
-        npy_cdouble_wrapper Yx)
-    coo_matvec(int nnz, int Ai, int Aj, npy_clongdouble_wrapper Ax, 
-        npy_clongdouble_wrapper Xx, npy_clongdouble_wrapper Yx)
+    coo_matvec(int const nnz, int const [] Ai, int const [] Aj, signed char const [] Ax, signed char const [] Xx, 
+        signed char [] Yx)
+    coo_matvec(int const nnz, int const [] Ai, int const [] Aj, unsigned char const [] Ax, unsigned char const [] Xx, 
+        unsigned char [] Yx)
+    coo_matvec(int const nnz, int const [] Ai, int const [] Aj, short const [] Ax, short const [] Xx, 
+        short [] Yx)
+    coo_matvec(int const nnz, int const [] Ai, int const [] Aj, unsigned short const [] Ax, unsigned short const [] Xx, 
+        unsigned short [] Yx)
+    coo_matvec(int const nnz, int const [] Ai, int const [] Aj, int const [] Ax, int const [] Xx, 
+        int [] Yx)
+    coo_matvec(int const nnz, int const [] Ai, int const [] Aj, unsigned int const [] Ax, unsigned int const [] Xx, 
+        unsigned int [] Yx)
+    coo_matvec(int const nnz, int const [] Ai, int const [] Aj, long long const [] Ax, long long const [] Xx, 
+        long long [] Yx)
+    coo_matvec(int const nnz, int const [] Ai, int const [] Aj, unsigned long long const [] Ax, 
+        unsigned long long const [] Xx, unsigned long long [] Yx)
+    coo_matvec(int const nnz, int const [] Ai, int const [] Aj, float const [] Ax, float const [] Xx, 
+        float [] Yx)
+    coo_matvec(int const nnz, int const [] Ai, int const [] Aj, double const [] Ax, double const [] Xx, 
+        double [] Yx)
+    coo_matvec(int const nnz, int const [] Ai, int const [] Aj, long double const [] Ax, long double const [] Xx, 
+        long double [] Yx)
+    coo_matvec(int const nnz, int const [] Ai, int const [] Aj, npy_cfloat_wrapper const [] Ax, 
+        npy_cfloat_wrapper const [] Xx, npy_cfloat_wrapper [] Yx)
+    coo_matvec(int const nnz, int const [] Ai, int const [] Aj, npy_cdouble_wrapper const [] Ax, 
+        npy_cdouble_wrapper const [] Xx, npy_cdouble_wrapper [] Yx)
+    coo_matvec(int const nnz, int const [] Ai, int const [] Aj, npy_clongdouble_wrapper const [] Ax, 
+        npy_clongdouble_wrapper const [] Xx, npy_clongdouble_wrapper [] Yx)
     """
   return _coo.coo_matvec(*args)
 
+def coo_count_diagonals(*args):
+  """coo_count_diagonals(int const nnz, int const [] Ai, int const [] Aj) -> int"""
+  return _coo.coo_count_diagonals(*args)
+# This file is compatible with both classic and new-style classes.
+
+
diff --git a/scipy/sparse/sparsetools/coo_wrap.cxx b/scipy/sparse/sparsetools/coo_wrap.cxx
index 95f886b..bafcbf2 100644
--- a/scipy/sparse/sparsetools/coo_wrap.cxx
+++ b/scipy/sparse/sparsetools/coo_wrap.cxx
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.7
  * 
  * This file is not intended to be easily readable and contains a number of 
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -756,6 +756,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
 #define PyInt_Check(x) PyLong_Check(x)
 #define PyInt_AsLong(x) PyLong_AsLong(x)
 #define PyInt_FromLong(x) PyLong_FromLong(x)
+#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
 #define PyString_Check(name) PyBytes_Check(name)
 #define PyString_FromString(x) PyUnicode_FromString(x)
 #define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
@@ -1222,7 +1223,7 @@ SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
 SWIGINTERN void 
 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
   SWIG_PYTHON_THREAD_BEGIN_BLOCK;
-  PyErr_SetString(errtype, (char *) msg);
+  PyErr_SetString(errtype, msg);
   SWIG_PYTHON_THREAD_END_BLOCK;
 }
 
@@ -1241,7 +1242,11 @@ SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
 
 SWIGINTERN void
 SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
+#if PY_VERSION_HEX < 0x02030000
   PyDict_SetItemString(d, (char *)name, obj);
+#else
+  PyDict_SetItemString(d, name, obj);
+#endif
   Py_DECREF(obj);
   if (public_interface)
     SwigPyBuiltin_AddPublicSymbol(public_interface, name);
@@ -1251,7 +1256,11 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam
 
 SWIGINTERN void
 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
+#if PY_VERSION_HEX < 0x02030000
   PyDict_SetItemString(d, (char *)name, obj);
+#else
+  PyDict_SetItemString(d, name, obj);
+#endif
   Py_DECREF(obj);                            
 }
 
@@ -1572,7 +1581,7 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
 #endif
 {
   const char *name = SWIG_TypePrettyName(v->ty);
-  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, (void *)v);
+  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
   if (v->next) {
 # ifdef METH_NOARGS
     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
@@ -1776,8 +1785,10 @@ SwigPyObject_own(PyObject *v, PyObject *args)
   PyObject *val = 0;
 #if (PY_VERSION_HEX < 0x02020000)
   if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
-#else
+#elif (PY_VERSION_HEX < 0x02050000)
   if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
+#else
+  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) 
 #endif
     {
       return NULL;
@@ -2539,7 +2550,7 @@ SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
 SWIGINTERN PyObject *
 SWIG_Python_InitShadowInstance(PyObject *args) {
   PyObject *obj[2];
-  if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
+  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
     return NULL;
   } else {
     SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
@@ -2815,7 +2826,7 @@ SwigPyObject_GetDesc(PyObject *self)
 {
   SwigPyObject *v = (SwigPyObject *)self;
   swig_type_info *ty = v ? v->ty : 0;
-  return ty ? ty->str : (char*)"";
+  return ty ? ty->str : "";
 }
 
 SWIGRUNTIME void
@@ -2872,6 +2883,7 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(arg
   return result;
 }
 
+#ifdef SWIGPYTHON_BUILTIN
 SWIGRUNTIME int
 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
   PyTypeObject *tp = obj->ob_type;
@@ -2880,15 +2892,15 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
   descrsetfunc f;
   int res;
 
-#ifdef Py_USING_UNICODE
+# ifdef Py_USING_UNICODE
   if (PyString_Check(name)) {
     name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
     if (!name)
       return -1;
   } else if (!PyUnicode_Check(name))
-#else
+# else
   if (!PyString_Check(name))
-#endif
+# endif
   {
     PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
     return -1;
@@ -2923,6 +2935,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
   Py_DECREF(name);
   return res;
 }
+#endif
 
 
 #ifdef __cplusplus
@@ -2965,7 +2978,7 @@ static swig_module_info swig_module = {swig_types, 1, 0, 0, 0, 0};
 #endif
 #define SWIG_name    "_coo"
 
-#define SWIGVERSION 0x020004 
+#define SWIGVERSION 0x020007 
 #define SWIG_VERSION SWIGVERSION
 
 
@@ -3511,13 +3524,10 @@ SWIG_AsVal_int (PyObject * obj, int *val)
 }
 
 
-  #define SWIG_From_long   PyInt_FromLong 
-
-
-SWIGINTERNINLINE PyObject *
-SWIG_From_int  (int value)
-{    
-  return SWIG_From_long  (value);
+SWIGINTERNINLINE PyObject*
+  SWIG_From_int  (int value)
+{
+  return PyInt_FromLong((long) value);
 }
 
 #ifdef __cplusplus
@@ -13664,123 +13674,126 @@ fail:
 static PyMethodDef SwigMethods[] = {
 	 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
 	 { (char *)"coo_tocsr", _wrap_coo_tocsr, METH_VARARGS, (char *)"\n"
-		"coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, signed char Ax, \n"
-		"    int Bp, int Bj, signed char Bx)\n"
-		"coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned char Ax, \n"
-		"    int Bp, int Bj, unsigned char Bx)\n"
-		"coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, short Ax, \n"
-		"    int Bp, int Bj, short Bx)\n"
-		"coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned short Ax, \n"
-		"    int Bp, int Bj, unsigned short Bx)\n"
-		"coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, int Ax, \n"
-		"    int Bp, int Bj, int Bx)\n"
-		"coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned int Ax, \n"
-		"    int Bp, int Bj, unsigned int Bx)\n"
-		"coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, long long Ax, \n"
-		"    int Bp, int Bj, long long Bx)\n"
-		"coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned long long Ax, \n"
-		"    int Bp, int Bj, unsigned long long Bx)\n"
-		"coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, float Ax, \n"
-		"    int Bp, int Bj, float Bx)\n"
-		"coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, double Ax, \n"
-		"    int Bp, int Bj, double Bx)\n"
-		"coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, long double Ax, \n"
-		"    int Bp, int Bj, long double Bx)\n"
-		"coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, npy_cfloat_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_cfloat_wrapper Bx)\n"
-		"coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, npy_cdouble_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_cdouble_wrapper Bx)\n"
-		"coo_tocsr(int n_row, int n_col, int nnz, int Ai, int Aj, npy_clongdouble_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_clongdouble_wrapper Bx)\n"
+		"coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    signed char const [] Ax, int [] Bp, int [] Bj, signed char [] Bx)\n"
+		"coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    unsigned char const [] Ax, int [] Bp, int [] Bj, unsigned char [] Bx)\n"
+		"coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    short const [] Ax, int [] Bp, int [] Bj, short [] Bx)\n"
+		"coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    unsigned short const [] Ax, int [] Bp, int [] Bj, unsigned short [] Bx)\n"
+		"coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    int const [] Ax, int [] Bp, int [] Bj, int [] Bx)\n"
+		"coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    unsigned int const [] Ax, int [] Bp, int [] Bj, unsigned int [] Bx)\n"
+		"coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    long long const [] Ax, int [] Bp, int [] Bj, long long [] Bx)\n"
+		"coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    unsigned long long const [] Ax, int [] Bp, int [] Bj, unsigned long long [] Bx)\n"
+		"coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    float const [] Ax, int [] Bp, int [] Bj, float [] Bx)\n"
+		"coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    double const [] Ax, int [] Bp, int [] Bj, double [] Bx)\n"
+		"coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    long double const [] Ax, int [] Bp, int [] Bj, long double [] Bx)\n"
+		"coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    npy_cfloat_wrapper const [] Ax, int [] Bp, int [] Bj, npy_cfloat_wrapper [] Bx)\n"
+		"coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    npy_cdouble_wrapper const [] Ax, int [] Bp, int [] Bj, npy_cdouble_wrapper [] Bx)\n"
+		"coo_tocsr(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    npy_clongdouble_wrapper const [] Ax, int [] Bp, int [] Bj, npy_clongdouble_wrapper [] Bx)\n"
 		""},
 	 { (char *)"coo_tocsc", _wrap_coo_tocsc, METH_VARARGS, (char *)"\n"
-		"coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, signed char Ax, \n"
-		"    int Bp, int Bi, signed char Bx)\n"
-		"coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned char Ax, \n"
-		"    int Bp, int Bi, unsigned char Bx)\n"
-		"coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, short Ax, \n"
-		"    int Bp, int Bi, short Bx)\n"
-		"coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned short Ax, \n"
-		"    int Bp, int Bi, unsigned short Bx)\n"
-		"coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, int Ax, \n"
-		"    int Bp, int Bi, int Bx)\n"
-		"coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned int Ax, \n"
-		"    int Bp, int Bi, unsigned int Bx)\n"
-		"coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, long long Ax, \n"
-		"    int Bp, int Bi, long long Bx)\n"
-		"coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned long long Ax, \n"
-		"    int Bp, int Bi, unsigned long long Bx)\n"
-		"coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, float Ax, \n"
-		"    int Bp, int Bi, float Bx)\n"
-		"coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, double Ax, \n"
-		"    int Bp, int Bi, double Bx)\n"
-		"coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, long double Ax, \n"
-		"    int Bp, int Bi, long double Bx)\n"
-		"coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, npy_cfloat_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_cfloat_wrapper Bx)\n"
-		"coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, npy_cdouble_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_cdouble_wrapper Bx)\n"
-		"coo_tocsc(int n_row, int n_col, int nnz, int Ai, int Aj, npy_clongdouble_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_clongdouble_wrapper Bx)\n"
+		"coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    signed char const [] Ax, int [] Bp, int [] Bi, signed char [] Bx)\n"
+		"coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    unsigned char const [] Ax, int [] Bp, int [] Bi, unsigned char [] Bx)\n"
+		"coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    short const [] Ax, int [] Bp, int [] Bi, short [] Bx)\n"
+		"coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    unsigned short const [] Ax, int [] Bp, int [] Bi, unsigned short [] Bx)\n"
+		"coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    int const [] Ax, int [] Bp, int [] Bi, int [] Bx)\n"
+		"coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    unsigned int const [] Ax, int [] Bp, int [] Bi, unsigned int [] Bx)\n"
+		"coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    long long const [] Ax, int [] Bp, int [] Bi, long long [] Bx)\n"
+		"coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    unsigned long long const [] Ax, int [] Bp, int [] Bi, unsigned long long [] Bx)\n"
+		"coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    float const [] Ax, int [] Bp, int [] Bi, float [] Bx)\n"
+		"coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    double const [] Ax, int [] Bp, int [] Bi, double [] Bx)\n"
+		"coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    long double const [] Ax, int [] Bp, int [] Bi, long double [] Bx)\n"
+		"coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    npy_cfloat_wrapper const [] Ax, int [] Bp, int [] Bi, npy_cfloat_wrapper [] Bx)\n"
+		"coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    npy_cdouble_wrapper const [] Ax, int [] Bp, int [] Bi, npy_cdouble_wrapper [] Bx)\n"
+		"coo_tocsc(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    npy_clongdouble_wrapper const [] Ax, int [] Bp, int [] Bi, npy_clongdouble_wrapper [] Bx)\n"
 		""},
 	 { (char *)"coo_todense", _wrap_coo_todense, METH_VARARGS, (char *)"\n"
-		"coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, signed char Ax, \n"
-		"    signed char Bx, int fortran)\n"
-		"coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned char Ax, \n"
-		"    unsigned char Bx, int fortran)\n"
-		"coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, short Ax, \n"
-		"    short Bx, int fortran)\n"
-		"coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned short Ax, \n"
-		"    unsigned short Bx, int fortran)\n"
-		"coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, int Ax, \n"
-		"    int Bx, int fortran)\n"
-		"coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned int Ax, \n"
-		"    unsigned int Bx, int fortran)\n"
-		"coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, long long Ax, \n"
-		"    long long Bx, int fortran)\n"
-		"coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, unsigned long long Ax, \n"
-		"    unsigned long long Bx, int fortran)\n"
-		"coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, float Ax, \n"
-		"    float Bx, int fortran)\n"
-		"coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, double Ax, \n"
-		"    double Bx, int fortran)\n"
-		"coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, long double Ax, \n"
-		"    long double Bx, int fortran)\n"
-		"coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, npy_cfloat_wrapper Ax, \n"
-		"    npy_cfloat_wrapper Bx, int fortran)\n"
-		"coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, npy_cdouble_wrapper Ax, \n"
-		"    npy_cdouble_wrapper Bx, int fortran)\n"
-		"coo_todense(int n_row, int n_col, int nnz, int Ai, int Aj, npy_clongdouble_wrapper Ax, \n"
-		"    npy_clongdouble_wrapper Bx, \n"
-		"    int fortran)\n"
+		"coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    signed char const [] Ax, signed char [] Bx, int fortran)\n"
+		"coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    unsigned char const [] Ax, unsigned char [] Bx, int fortran)\n"
+		"coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    short const [] Ax, short [] Bx, int fortran)\n"
+		"coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    unsigned short const [] Ax, unsigned short [] Bx, int fortran)\n"
+		"coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    int const [] Ax, int [] Bx, int fortran)\n"
+		"coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    unsigned int const [] Ax, unsigned int [] Bx, int fortran)\n"
+		"coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    long long const [] Ax, long long [] Bx, int fortran)\n"
+		"coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    unsigned long long const [] Ax, unsigned long long [] Bx, int fortran)\n"
+		"coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    float const [] Ax, float [] Bx, int fortran)\n"
+		"coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    double const [] Ax, double [] Bx, int fortran)\n"
+		"coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    long double const [] Ax, long double [] Bx, int fortran)\n"
+		"coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    npy_cfloat_wrapper const [] Ax, npy_cfloat_wrapper [] Bx, int fortran)\n"
+		"coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    npy_cdouble_wrapper const [] Ax, npy_cdouble_wrapper [] Bx, int fortran)\n"
+		"coo_todense(int const n_row, int const n_col, int const nnz, int const [] Ai, int const [] Aj, \n"
+		"    npy_clongdouble_wrapper const [] Ax, npy_clongdouble_wrapper [] Bx, int fortran)\n"
 		""},
 	 { (char *)"coo_matvec", _wrap_coo_matvec, METH_VARARGS, (char *)"\n"
-		"coo_matvec(int nnz, int Ai, int Aj, signed char Ax, signed char Xx, \n"
-		"    signed char Yx)\n"
-		"coo_matvec(int nnz, int Ai, int Aj, unsigned char Ax, unsigned char Xx, \n"
-		"    unsigned char Yx)\n"
-		"coo_matvec(int nnz, int Ai, int Aj, short Ax, short Xx, short Yx)\n"
-		"coo_matvec(int nnz, int Ai, int Aj, unsigned short Ax, unsigned short Xx, \n"
-		"    unsigned short Yx)\n"
-		"coo_matvec(int nnz, int Ai, int Aj, int Ax, int Xx, int Yx)\n"
-		"coo_matvec(int nnz, int Ai, int Aj, unsigned int Ax, unsigned int Xx, \n"
-		"    unsigned int Yx)\n"
-		"coo_matvec(int nnz, int Ai, int Aj, long long Ax, long long Xx, \n"
-		"    long long Yx)\n"
-		"coo_matvec(int nnz, int Ai, int Aj, unsigned long long Ax, unsigned long long Xx, \n"
-		"    unsigned long long Yx)\n"
-		"coo_matvec(int nnz, int Ai, int Aj, float Ax, float Xx, float Yx)\n"
-		"coo_matvec(int nnz, int Ai, int Aj, double Ax, double Xx, double Yx)\n"
-		"coo_matvec(int nnz, int Ai, int Aj, long double Ax, long double Xx, \n"
-		"    long double Yx)\n"
-		"coo_matvec(int nnz, int Ai, int Aj, npy_cfloat_wrapper Ax, npy_cfloat_wrapper Xx, \n"
-		"    npy_cfloat_wrapper Yx)\n"
-		"coo_matvec(int nnz, int Ai, int Aj, npy_cdouble_wrapper Ax, npy_cdouble_wrapper Xx, \n"
-		"    npy_cdouble_wrapper Yx)\n"
-		"coo_matvec(int nnz, int Ai, int Aj, npy_clongdouble_wrapper Ax, \n"
-		"    npy_clongdouble_wrapper Xx, npy_clongdouble_wrapper Yx)\n"
+		"coo_matvec(int const nnz, int const [] Ai, int const [] Aj, signed char const [] Ax, signed char const [] Xx, \n"
+		"    signed char [] Yx)\n"
+		"coo_matvec(int const nnz, int const [] Ai, int const [] Aj, unsigned char const [] Ax, unsigned char const [] Xx, \n"
+		"    unsigned char [] Yx)\n"
+		"coo_matvec(int const nnz, int const [] Ai, int const [] Aj, short const [] Ax, short const [] Xx, \n"
+		"    short [] Yx)\n"
+		"coo_matvec(int const nnz, int const [] Ai, int const [] Aj, unsigned short const [] Ax, unsigned short const [] Xx, \n"
+		"    unsigned short [] Yx)\n"
+		"coo_matvec(int const nnz, int const [] Ai, int const [] Aj, int const [] Ax, int const [] Xx, \n"
+		"    int [] Yx)\n"
+		"coo_matvec(int const nnz, int const [] Ai, int const [] Aj, unsigned int const [] Ax, unsigned int const [] Xx, \n"
+		"    unsigned int [] Yx)\n"
+		"coo_matvec(int const nnz, int const [] Ai, int const [] Aj, long long const [] Ax, long long const [] Xx, \n"
+		"    long long [] Yx)\n"
+		"coo_matvec(int const nnz, int const [] Ai, int const [] Aj, unsigned long long const [] Ax, \n"
+		"    unsigned long long const [] Xx, unsigned long long [] Yx)\n"
+		"coo_matvec(int const nnz, int const [] Ai, int const [] Aj, float const [] Ax, float const [] Xx, \n"
+		"    float [] Yx)\n"
+		"coo_matvec(int const nnz, int const [] Ai, int const [] Aj, double const [] Ax, double const [] Xx, \n"
+		"    double [] Yx)\n"
+		"coo_matvec(int const nnz, int const [] Ai, int const [] Aj, long double const [] Ax, long double const [] Xx, \n"
+		"    long double [] Yx)\n"
+		"coo_matvec(int const nnz, int const [] Ai, int const [] Aj, npy_cfloat_wrapper const [] Ax, \n"
+		"    npy_cfloat_wrapper const [] Xx, npy_cfloat_wrapper [] Yx)\n"
+		"coo_matvec(int const nnz, int const [] Ai, int const [] Aj, npy_cdouble_wrapper const [] Ax, \n"
+		"    npy_cdouble_wrapper const [] Xx, npy_cdouble_wrapper [] Yx)\n"
+		"coo_matvec(int const nnz, int const [] Ai, int const [] Aj, npy_clongdouble_wrapper const [] Ax, \n"
+		"    npy_clongdouble_wrapper const [] Xx, npy_clongdouble_wrapper [] Yx)\n"
 		""},
-	 { (char *)"coo_count_diagonals", _wrap_coo_count_diagonals, METH_VARARGS, (char *)"coo_count_diagonals(int nnz, int Ai, int Aj) -> int"},
+	 { (char *)"coo_count_diagonals", _wrap_coo_count_diagonals, METH_VARARGS, (char *)"coo_count_diagonals(int const nnz, int const [] Ai, int const [] Aj) -> int"},
 	 { NULL, NULL, 0, NULL }
 };
 
diff --git a/scipy/sparse/sparsetools/csc.py b/scipy/sparse/sparsetools/csc.py
index 9403e95..c59252b 100644
--- a/scipy/sparse/sparsetools/csc.py
+++ b/scipy/sparse/sparsetools/csc.py
@@ -1,9 +1,10 @@
 # This file was automatically generated by SWIG (http://www.swig.org).
-# Version 2.0.1+capsulehack
+# Version 2.0.7
 #
 # Do not make changes to this file unless you know what you are doing--modify
 # the SWIG interface file instead.
-# This file is compatible with both classic and new-style classes.
+
+
 
 from sys import version_info
 if version_info >= (2,6,0):
@@ -39,7 +40,7 @@ def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
             return
     method = class_type.__swig_setmethods__.get(name,None)
     if method: return method(self,value)
-    if (not static) or hasattr(self,name):
+    if (not static):
         self.__dict__[name] = value
     else:
         raise AttributeError("You cannot add attributes to %s" % self)
@@ -68,356 +69,379 @@ except AttributeError:
 
 
 def csc_matmat_pass1(*args):
+  """
+    csc_matmat_pass1(int const n_row, int const n_col, int const [] Ap, int const [] Ai, int const [] Bp, 
+        int const [] 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 const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, 
+        signed char [] Yx)
+    csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, 
+        unsigned char [] Yx)
+    csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, 
+        short [] Yx)
+    csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, 
+        unsigned short [] Yx)
+    csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, 
+        int [] Yx)
+    csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, 
+        unsigned int [] Yx)
+    csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, 
+        long long [] Yx)
+    csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, 
+        unsigned long long [] Yx)
+    csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, 
+        float [] Yx)
+    csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, 
+        double [] Yx)
+    csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, 
+        long double [] Yx)
+    csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, 
+        npy_cfloat_wrapper [] Yx)
+    csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, 
+        npy_cdouble_wrapper [] Yx)
+    csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] 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 const n_row, int const n_col, int const [] Ap, int const [] Ai, signed char const [] Ax, 
+        int [] Bp, int [] Bj, signed char [] Bx)
+    csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned char const [] Ax, 
+        int [] Bp, int [] Bj, unsigned char [] Bx)
+    csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, short const [] Ax, 
+        int [] Bp, int [] Bj, short [] Bx)
+    csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned short const [] Ax, 
+        int [] Bp, int [] Bj, unsigned short [] Bx)
+    csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, int const [] Ax, 
+        int [] Bp, int [] Bj, int [] Bx)
+    csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned int const [] Ax, 
+        int [] Bp, int [] Bj, unsigned int [] Bx)
+    csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long long const [] Ax, 
+        int [] Bp, int [] Bj, long long [] Bx)
+    csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned long long const [] Ax, 
+        int [] Bp, int [] Bj, unsigned long long [] Bx)
+    csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, float const [] Ax, 
+        int [] Bp, int [] Bj, float [] Bx)
+    csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, double const [] Ax, 
+        int [] Bp, int [] Bj, double [] Bx)
+    csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long double const [] Ax, 
+        int [] Bp, int [] Bj, long double [] Bx)
+    csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cfloat_wrapper const [] Ax, 
+        int [] Bp, int [] Bj, npy_cfloat_wrapper [] Bx)
+    csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cdouble_wrapper const [] Ax, 
+        int [] Bp, int [] Bj, npy_cdouble_wrapper [] Bx)
+    csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_clongdouble_wrapper const [] 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 const n_row, int const n_col, int const [] Ap, int const [] Ai, signed char const [] Ax, 
+        int const [] Bp, int const [] Bi, signed char const [] Bx, int [] Cp, 
+        int [] Ci, signed char [] Cx)
+    csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned char const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned char const [] Bx, 
+        int [] Cp, int [] Ci, unsigned char [] Cx)
+    csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, short const [] Ax, 
+        int const [] Bp, int const [] Bi, short const [] Bx, int [] Cp, int [] Ci, 
+        short [] Cx)
+    csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned short const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned short const [] Bx, 
+        int [] Cp, int [] Ci, unsigned short [] Cx)
+    csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, int const [] Ax, 
+        int const [] Bp, int const [] Bi, int const [] Bx, int [] Cp, int [] Ci, 
+        int [] Cx)
+    csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned int const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned int const [] Bx, int [] Cp, 
+        int [] Ci, unsigned int [] Cx)
+    csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long long const [] Ax, 
+        int const [] Bp, int const [] Bi, long long const [] Bx, int [] Cp, 
+        int [] Ci, long long [] Cx)
+    csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned long long const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned long long const [] Bx, 
+        int [] Cp, int [] Ci, unsigned long long [] Cx)
+    csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, float const [] Ax, 
+        int const [] Bp, int const [] Bi, float const [] Bx, int [] Cp, int [] Ci, 
+        float [] Cx)
+    csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, double const [] Ax, 
+        int const [] Bp, int const [] Bi, double const [] Bx, int [] Cp, int [] Ci, 
+        double [] Cx)
+    csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long double const [] Ax, 
+        int const [] Bp, int const [] Bi, long double const [] Bx, int [] Cp, 
+        int [] Ci, long double [] Cx)
+    csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cfloat_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bi, npy_cfloat_wrapper const [] Bx, 
+        int [] Cp, int [] Ci, npy_cfloat_wrapper [] Cx)
+    csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bi, npy_cdouble_wrapper const [] Bx, 
+        int [] Cp, int [] Ci, npy_cdouble_wrapper [] Cx)
+    csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_clongdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bi, npy_clongdouble_wrapper const [] 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 const n_row, int const n_col, int const [] Ap, int const [] Ai, signed char const [] Ax, 
+        signed char const [] Xx, signed char [] Yx)
+    csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned char const [] Ax, 
+        unsigned char const [] Xx, unsigned char [] Yx)
+    csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, short const [] Ax, 
+        short const [] Xx, short [] Yx)
+    csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned short const [] Ax, 
+        unsigned short const [] Xx, unsigned short [] Yx)
+    csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, int const [] Ax, 
+        int const [] Xx, int [] Yx)
+    csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned int const [] Ax, 
+        unsigned int const [] Xx, unsigned int [] Yx)
+    csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long long const [] Ax, 
+        long long const [] Xx, long long [] Yx)
+    csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned long long const [] Ax, 
+        unsigned long long const [] Xx, unsigned long long [] Yx)
+    csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, float const [] Ax, 
+        float const [] Xx, float [] Yx)
+    csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, double const [] Ax, 
+        double const [] Xx, double [] Yx)
+    csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long double const [] Ax, 
+        long double const [] Xx, long double [] Yx)
+    csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cfloat_wrapper const [] Ax, 
+        npy_cfloat_wrapper const [] Xx, npy_cfloat_wrapper [] Yx)
+    csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cdouble_wrapper const [] Ax, 
+        npy_cdouble_wrapper const [] Xx, npy_cdouble_wrapper [] Yx)
+    csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_clongdouble_wrapper const [] Ax, 
+        npy_clongdouble_wrapper const [] 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 const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, 
+        signed char const [] Ax, signed char const [] Xx, signed char [] Yx)
+    csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, 
+        unsigned char const [] Ax, unsigned char const [] Xx, unsigned char [] Yx)
+    csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, 
+        short const [] Ax, short const [] Xx, short [] Yx)
+    csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, 
+        unsigned short const [] Ax, unsigned short const [] Xx, unsigned short [] Yx)
+    csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, 
+        int const [] Ax, int const [] Xx, int [] Yx)
+    csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, 
+        unsigned int const [] Ax, unsigned int const [] Xx, unsigned int [] Yx)
+    csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, 
+        long long const [] Ax, long long const [] Xx, long long [] Yx)
+    csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, 
+        unsigned long long const [] Ax, unsigned long long const [] Xx, unsigned long long [] Yx)
+    csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, 
+        float const [] Ax, float const [] Xx, float [] Yx)
+    csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, 
+        double const [] Ax, double const [] Xx, double [] Yx)
+    csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, 
+        long double const [] Ax, long double const [] Xx, long double [] Yx)
+    csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, 
+        npy_cfloat_wrapper const [] Ax, npy_cfloat_wrapper const [] Xx, npy_cfloat_wrapper [] Yx)
+    csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, 
+        npy_cdouble_wrapper const [] Ax, npy_cdouble_wrapper const [] Xx, npy_cdouble_wrapper [] Yx)
+    csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, 
+        npy_clongdouble_wrapper const [] Ax, npy_clongdouble_wrapper const [] 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 const n_row, int const n_col, int const [] Ap, int const [] Ai, signed char const [] Ax, 
+        int const [] Bp, int const [] Bi, signed char const [] Bx, int [] Cp, 
+        int [] Ci, signed char [] Cx)
+    csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned char const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned char const [] Bx, 
+        int [] Cp, int [] Ci, unsigned char [] Cx)
+    csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, short const [] Ax, 
+        int const [] Bp, int const [] Bi, short const [] Bx, int [] Cp, int [] Ci, 
+        short [] Cx)
+    csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned short const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned short const [] Bx, 
+        int [] Cp, int [] Ci, unsigned short [] Cx)
+    csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, int const [] Ax, 
+        int const [] Bp, int const [] Bi, int const [] Bx, int [] Cp, int [] Ci, 
+        int [] Cx)
+    csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned int const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned int const [] Bx, int [] Cp, 
+        int [] Ci, unsigned int [] Cx)
+    csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long long const [] Ax, 
+        int const [] Bp, int const [] Bi, long long const [] Bx, int [] Cp, 
+        int [] Ci, long long [] Cx)
+    csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned long long const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned long long const [] Bx, 
+        int [] Cp, int [] Ci, unsigned long long [] Cx)
+    csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, float const [] Ax, 
+        int const [] Bp, int const [] Bi, float const [] Bx, int [] Cp, int [] Ci, 
+        float [] Cx)
+    csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, double const [] Ax, 
+        int const [] Bp, int const [] Bi, double const [] Bx, int [] Cp, int [] Ci, 
+        double [] Cx)
+    csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long double const [] Ax, 
+        int const [] Bp, int const [] Bi, long double const [] Bx, int [] Cp, 
+        int [] Ci, long double [] Cx)
+    csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cfloat_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bi, npy_cfloat_wrapper const [] Bx, 
+        int [] Cp, int [] Ci, npy_cfloat_wrapper [] Cx)
+    csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bi, npy_cdouble_wrapper const [] Bx, 
+        int [] Cp, int [] Ci, npy_cdouble_wrapper [] Cx)
+    csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_clongdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bi, npy_clongdouble_wrapper const [] 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 const n_row, int const n_col, int const [] Ap, int const [] Ai, signed char const [] Ax, 
+        int const [] Bp, int const [] Bi, signed char const [] Bx, int [] Cp, 
+        int [] Ci, signed char [] Cx)
+    csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned char const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned char const [] Bx, 
+        int [] Cp, int [] Ci, unsigned char [] Cx)
+    csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, short const [] Ax, 
+        int const [] Bp, int const [] Bi, short const [] Bx, int [] Cp, int [] Ci, 
+        short [] Cx)
+    csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned short const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned short const [] Bx, 
+        int [] Cp, int [] Ci, unsigned short [] Cx)
+    csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, int const [] Ax, 
+        int const [] Bp, int const [] Bi, int const [] Bx, int [] Cp, int [] Ci, 
+        int [] Cx)
+    csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned int const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned int const [] Bx, int [] Cp, 
+        int [] Ci, unsigned int [] Cx)
+    csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long long const [] Ax, 
+        int const [] Bp, int const [] Bi, long long const [] Bx, int [] Cp, 
+        int [] Ci, long long [] Cx)
+    csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned long long const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned long long const [] Bx, 
+        int [] Cp, int [] Ci, unsigned long long [] Cx)
+    csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, float const [] Ax, 
+        int const [] Bp, int const [] Bi, float const [] Bx, int [] Cp, int [] Ci, 
+        float [] Cx)
+    csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, double const [] Ax, 
+        int const [] Bp, int const [] Bi, double const [] Bx, int [] Cp, int [] Ci, 
+        double [] Cx)
+    csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long double const [] Ax, 
+        int const [] Bp, int const [] Bi, long double const [] Bx, int [] Cp, 
+        int [] Ci, long double [] Cx)
+    csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cfloat_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bi, npy_cfloat_wrapper const [] Bx, 
+        int [] Cp, int [] Ci, npy_cfloat_wrapper [] Cx)
+    csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bi, npy_cdouble_wrapper const [] Bx, 
+        int [] Cp, int [] Ci, npy_cdouble_wrapper [] Cx)
+    csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_clongdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bi, npy_clongdouble_wrapper const [] 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 const n_row, int const n_col, int const [] Ap, int const [] Ai, signed char const [] Ax, 
+        int const [] Bp, int const [] Bi, signed char const [] Bx, int [] Cp, 
+        int [] Ci, signed char [] Cx)
+    csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned char const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned char const [] Bx, 
+        int [] Cp, int [] Ci, unsigned char [] Cx)
+    csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, short const [] Ax, 
+        int const [] Bp, int const [] Bi, short const [] Bx, int [] Cp, int [] Ci, 
+        short [] Cx)
+    csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned short const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned short const [] Bx, 
+        int [] Cp, int [] Ci, unsigned short [] Cx)
+    csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, int const [] Ax, 
+        int const [] Bp, int const [] Bi, int const [] Bx, int [] Cp, int [] Ci, 
+        int [] Cx)
+    csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned int const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned int const [] Bx, int [] Cp, 
+        int [] Ci, unsigned int [] Cx)
+    csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long long const [] Ax, 
+        int const [] Bp, int const [] Bi, long long const [] Bx, int [] Cp, 
+        int [] Ci, long long [] Cx)
+    csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned long long const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned long long const [] Bx, 
+        int [] Cp, int [] Ci, unsigned long long [] Cx)
+    csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, float const [] Ax, 
+        int const [] Bp, int const [] Bi, float const [] Bx, int [] Cp, int [] Ci, 
+        float [] Cx)
+    csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, double const [] Ax, 
+        int const [] Bp, int const [] Bi, double const [] Bx, int [] Cp, int [] Ci, 
+        double [] Cx)
+    csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long double const [] Ax, 
+        int const [] Bp, int const [] Bi, long double const [] Bx, int [] Cp, 
+        int [] Ci, long double [] Cx)
+    csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cfloat_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bi, npy_cfloat_wrapper const [] Bx, 
+        int [] Cp, int [] Ci, npy_cfloat_wrapper [] Cx)
+    csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bi, npy_cdouble_wrapper const [] Bx, 
+        int [] Cp, int [] Ci, npy_cdouble_wrapper [] Cx)
+    csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_clongdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bi, npy_clongdouble_wrapper const [] 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 const n_row, int const n_col, int const [] Ap, int const [] Ai, signed char const [] Ax, 
+        int const [] Bp, int const [] Bi, signed char const [] Bx, int [] Cp, 
+        int [] Ci, signed char [] Cx)
+    csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned char const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned char const [] Bx, 
+        int [] Cp, int [] Ci, unsigned char [] Cx)
+    csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, short const [] Ax, 
+        int const [] Bp, int const [] Bi, short const [] Bx, int [] Cp, int [] Ci, 
+        short [] Cx)
+    csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned short const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned short const [] Bx, 
+        int [] Cp, int [] Ci, unsigned short [] Cx)
+    csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, int const [] Ax, 
+        int const [] Bp, int const [] Bi, int const [] Bx, int [] Cp, int [] Ci, 
+        int [] Cx)
+    csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned int const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned int const [] Bx, int [] Cp, 
+        int [] Ci, unsigned int [] Cx)
+    csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long long const [] Ax, 
+        int const [] Bp, int const [] Bi, long long const [] Bx, int [] Cp, 
+        int [] Ci, long long [] Cx)
+    csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned long long const [] Ax, 
+        int const [] Bp, int const [] Bi, unsigned long long const [] Bx, 
+        int [] Cp, int [] Ci, unsigned long long [] Cx)
+    csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, float const [] Ax, 
+        int const [] Bp, int const [] Bi, float const [] Bx, int [] Cp, int [] Ci, 
+        float [] Cx)
+    csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, double const [] Ax, 
+        int const [] Bp, int const [] Bi, double const [] Bx, int [] Cp, int [] Ci, 
+        double [] Cx)
+    csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long double const [] Ax, 
+        int const [] Bp, int const [] Bi, long double const [] Bx, int [] Cp, 
+        int [] Ci, long double [] Cx)
+    csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cfloat_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bi, npy_cfloat_wrapper const [] Bx, 
+        int [] Cp, int [] Ci, npy_cfloat_wrapper [] Cx)
+    csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bi, npy_cdouble_wrapper const [] Bx, 
+        int [] Cp, int [] Ci, npy_cdouble_wrapper [] Cx)
+    csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_clongdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bi, npy_clongdouble_wrapper const [] 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)
+# This file is compatible with both classic and new-style classes.
+
+
diff --git a/scipy/sparse/sparsetools/csc_wrap.cxx b/scipy/sparse/sparsetools/csc_wrap.cxx
index 62be59d..02792a2 100644
--- a/scipy/sparse/sparsetools/csc_wrap.cxx
+++ b/scipy/sparse/sparsetools/csc_wrap.cxx
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.1+capsulehack
+ * Version 2.0.7
  * 
  * This file is not intended to be easily readable and contains a number of 
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -756,7 +756,16 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
 #define PyInt_Check(x) PyLong_Check(x)
 #define PyInt_AsLong(x) PyLong_AsLong(x)
 #define PyInt_FromLong(x) PyLong_FromLong(x)
+#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
+#define PyString_Check(name) PyBytes_Check(name)
+#define PyString_FromString(x) PyUnicode_FromString(x)
 #define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
+#define PyString_AsString(str) PyBytes_AsString(str)
+#define PyString_Size(str) PyBytes_Size(str)	
+#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
+#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
+#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
+#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
 
 #endif
 
@@ -896,6 +905,63 @@ PyObject *PyBool_FromLong(long ok)
 typedef int Py_ssize_t;
 # define PY_SSIZE_T_MAX INT_MAX
 # define PY_SSIZE_T_MIN INT_MIN
+typedef inquiry lenfunc;
+typedef intargfunc ssizeargfunc;
+typedef intintargfunc ssizessizeargfunc;
+typedef intobjargproc ssizeobjargproc;
+typedef intintobjargproc ssizessizeobjargproc;
+typedef getreadbufferproc readbufferproc;
+typedef getwritebufferproc writebufferproc;
+typedef getsegcountproc segcountproc;
+typedef getcharbufferproc charbufferproc;
+static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
+{
+  long result = 0;
+  PyObject *i = PyNumber_Int(x);
+  if (i) {
+    result = PyInt_AsLong(i);
+    Py_DECREF(i);
+  }
+  return result;
+}
+#endif
+
+#if PY_VERSION_HEX < 0x02040000
+#define Py_VISIT(op)				\
+  do { 						\
+    if (op) {					\
+      int vret = visit((op), arg);		\
+      if (vret)					\
+        return vret;				\
+    }						\
+  } while (0)
+#endif
+
+#if PY_VERSION_HEX < 0x02030000
+typedef struct {
+  PyTypeObject type;
+  PyNumberMethods as_number;
+  PyMappingMethods as_mapping;
+  PySequenceMethods as_sequence;
+  PyBufferProcs as_buffer;
+  PyObject *name, *slots;
+} PyHeapTypeObject;
+#endif
+
+#if PY_VERSION_HEX < 0x02030000
+typedef destructor freefunc;
+#endif
+
+#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
+     (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
+     (PY_MAJOR_VERSION > 3))
+# define SWIGPY_USE_CAPSULE
+# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
+#endif
+
+#if PY_VERSION_HEX < 0x03020000
+#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
+#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
 #endif
 
 /* -----------------------------------------------------------------------------
@@ -1042,9 +1108,6 @@ SWIG_Python_AddErrorMsg(const char* mesg)
 
 #ifdef __cplusplus
 extern "C" {
-#if 0
-} /* cc-mode */
-#endif
 #endif
 
 /* -----------------------------------------------------------------------------
@@ -1070,19 +1133,19 @@ typedef struct swig_const_info {
  * Wrapper of PyInstanceMethod_New() used in Python 3
  * It is exported to the generated module, used for -fastproxy
  * ----------------------------------------------------------------------------- */
-SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
-{
 #if PY_VERSION_HEX >= 0x03000000
+SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
+{
   return PyInstanceMethod_New(func);
+}
 #else
+SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
+{
   return NULL;
-#endif
 }
+#endif
 
 #ifdef __cplusplus
-#if 0
-{ /* cc-mode */
-#endif
 }
 #endif
 
@@ -1102,7 +1165,15 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
 #define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
-#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(ptr, type, flags)
+
+#ifdef SWIGPYTHON_BUILTIN
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
+#else
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
+#endif
+
+#define SWIG_InternalNewPointerObj(ptr, type, flags)	SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
+
 #define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
 #define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
 #define swig_owntype                                    int
@@ -1117,7 +1188,7 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
 
 /* for C or C++ function pointers */
 #define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
-#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(ptr, type, 0)
+#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
 
 /* for C++ member pointers, ie, member methods */
 #define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
@@ -1134,18 +1205,8 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
 #define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
 #define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
 #define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
-#define SWIG_fail                        		goto fail				
+#define SWIG_fail                        		goto fail					   
 
-/*
- * Python 2.7 and newer and Python 3.1 and newer should use Capsules API instead of
- * CObjects API.
- */
-#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
-     (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0))
-#define USE_CAPSULES
-#define TYPE_POINTER_NAME \
-    ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
-#endif
 
 /* Runtime API implementation */
 
@@ -1162,7 +1223,7 @@ SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
 SWIGINTERN void 
 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
   SWIG_PYTHON_THREAD_BEGIN_BLOCK;
-  PyErr_SetString(errtype, (char *) msg);
+  PyErr_SetString(errtype, msg);
   SWIG_PYTHON_THREAD_END_BLOCK;
 }
 
@@ -1170,12 +1231,41 @@ SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
 
 /* Set a constant value */
 
+#if defined(SWIGPYTHON_BUILTIN)
+
+SWIGINTERN void
+SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
+  PyObject *s = PyString_InternFromString(key);
+  PyList_Append(seq, s);
+  Py_DECREF(s);
+}
+
+SWIGINTERN void
+SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
+#if PY_VERSION_HEX < 0x02030000
+  PyDict_SetItemString(d, (char *)name, obj);
+#else
+  PyDict_SetItemString(d, name, obj);
+#endif
+  Py_DECREF(obj);
+  if (public_interface)
+    SwigPyBuiltin_AddPublicSymbol(public_interface, name);
+}
+
+#else
+
 SWIGINTERN void
 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
-  PyDict_SetItemString(d, (char*) name, obj);
+#if PY_VERSION_HEX < 0x02030000
+  PyDict_SetItemString(d, (char *)name, obj);
+#else
+  PyDict_SetItemString(d, name, obj);
+#endif
   Py_DECREF(obj);                            
 }
 
+#endif
+
 /* Append a value to the result obj */
 
 SWIGINTERN PyObject*
@@ -1236,6 +1326,14 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
     }
   }  
   if (!PyTuple_Check(args)) {
+    if (min <= 1 && max >= 1) {
+      register int i;
+      objs[0] = args;
+      for (i = 1; i < max; ++i) {
+	objs[i] = 0;
+      }
+      return 2;
+    }
     PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
     return 0;
   } else {
@@ -1288,11 +1386,11 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
 
 #define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
 
+#define SWIG_BUILTIN_TP_INIT	    (SWIG_POINTER_OWN << 2)
+#define SWIG_BUILTIN_INIT	    (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
+
 #ifdef __cplusplus
 extern "C" {
-#if 0
-} /* cc-mode */
-#endif
 #endif
 
 /*  How to access Py_None */
@@ -1343,6 +1441,7 @@ typedef struct {
   PyObject *destroy;
   int delargs;
   int implicitconv;
+  PyTypeObject *pytype;
 } SwigPyClientData;
 
 SWIGRUNTIMEINLINE int 
@@ -1409,13 +1508,13 @@ SwigPyClientData_New(PyObject* obj)
       data->delargs = 0;
     }
     data->implicitconv = 0;
+    data->pytype = 0;
     return data;
   }
 }
 
 SWIGRUNTIME void 
-SwigPyClientData_Del(SwigPyClientData* data)
-{
+SwigPyClientData_Del(SwigPyClientData *data) {
   Py_XDECREF(data->newraw);
   Py_XDECREF(data->newargs);
   Py_XDECREF(data->destroy);
@@ -1429,6 +1528,9 @@ typedef struct {
   swig_type_info *ty;
   int own;
   PyObject *next;
+#ifdef SWIGPYTHON_BUILTIN
+  PyObject *dict;
+#endif
 } SwigPyObject;
 
 SWIGRUNTIME PyObject *
@@ -1479,21 +1581,21 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
 #endif
 {
   const char *name = SWIG_TypePrettyName(v->ty);
-  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v);
+  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
   if (v->next) {
-#ifdef METH_NOARGS
+# ifdef METH_NOARGS
     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
-#else
+# else
     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
-#endif
-#if PY_VERSION_HEX >= 0x03000000
+# endif
+# if PY_VERSION_HEX >= 0x03000000
     PyObject *joined = PyUnicode_Concat(repr, nrep);
     Py_DecRef(repr);
     Py_DecRef(nrep);
     repr = joined;
-#else
+# else
     PyString_ConcatAndDel(&repr,nrep);
-#endif
+# endif
   }
   return repr;  
 }
@@ -1543,27 +1645,43 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
     Py_INCREF(Py_NotImplemented);
     return Py_NotImplemented;
   }
-  if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) )
-    res = Py_True;
-  else
-    res = Py_False;
-  Py_INCREF(res);
+  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
   return res;  
 }
 
 
-SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
+SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
 
+#ifdef SWIGPYTHON_BUILTIN
+static swig_type_info *SwigPyObject_stype = 0;
 SWIGRUNTIME PyTypeObject*
 SwigPyObject_type(void) {
-  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
+    SwigPyClientData *cd;
+    assert(SwigPyObject_stype);
+    cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
+    assert(cd);
+    assert(cd->pytype);
+    return cd->pytype;
+}
+#else
+SWIGRUNTIME PyTypeObject*
+SwigPyObject_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
   return type;
 }
+#endif
 
 SWIGRUNTIMEINLINE int
 SwigPyObject_Check(PyObject *op) {
+#ifdef SWIGPYTHON_BUILTIN
+  PyTypeObject *target_tp = SwigPyObject_type();
+  if (PyType_IsSubtype(op->ob_type, target_tp))
+    return 1;
+  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
+#else
   return (Py_TYPE(op) == SwigPyObject_type())
     || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
+#endif
 }
 
 SWIGRUNTIME PyObject *
@@ -1667,8 +1785,10 @@ SwigPyObject_own(PyObject *v, PyObject *args)
   PyObject *val = 0;
 #if (PY_VERSION_HEX < 0x02020000)
   if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
-#else
+#elif (PY_VERSION_HEX < 0x02050000)
   if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
+#else
+  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) 
 #endif
     {
       return NULL;
@@ -1729,9 +1849,9 @@ SwigPyObject_getattr(SwigPyObject *sobj,char *name)
 #endif
 
 SWIGRUNTIME PyTypeObject*
-_PySwigObject_type(void) {
+SwigPyObject_TypeOnce(void) {
   static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
-  
+
   static PyNumberMethods SwigPyObject_as_number = {
     (binaryfunc)0, /*nb_add*/
     (binaryfunc)0, /*nb_subtract*/
@@ -1778,85 +1898,89 @@ _PySwigObject_type(void) {
 #endif
   };
 
-  static PyTypeObject swigpyobject_type;  
+  static PyTypeObject swigpyobject_type;
   static int type_init = 0;
   if (!type_init) {
-    const PyTypeObject tmp
-      = {
-	/* PyObject header changed in Python 3 */
+    const PyTypeObject tmp = {
+      /* PyObject header changed in Python 3 */
 #if PY_VERSION_HEX >= 0x03000000
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-#else    
-	PyObject_HEAD_INIT(NULL)
-	0,				    /* ob_size */
+      PyVarObject_HEAD_INIT(NULL, 0)
+#else
+      PyObject_HEAD_INIT(NULL)
+      0,                                    /* ob_size */
 #endif
-	(char *)"SwigPyObject",		    /* tp_name */
-	sizeof(SwigPyObject),		    /* tp_basicsize */
-	0,			            /* tp_itemsize */
-	(destructor)SwigPyObject_dealloc,   /* tp_dealloc */
-	(printfunc)SwigPyObject_print,	    /* tp_print */
+      (char *)"SwigPyObject",               /* tp_name */
+      sizeof(SwigPyObject),                 /* tp_basicsize */
+      0,                                    /* tp_itemsize */
+      (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
+      (printfunc)SwigPyObject_print,        /* tp_print */
 #if PY_VERSION_HEX < 0x02020000
-	(getattrfunc)SwigPyObject_getattr,  /* tp_getattr */ 
+      (getattrfunc)SwigPyObject_getattr,    /* tp_getattr */
 #else
-	(getattrfunc)0,			    /* tp_getattr */ 
+      (getattrfunc)0,                       /* tp_getattr */
 #endif
-	(setattrfunc)0,			    /* tp_setattr */ 
+      (setattrfunc)0,                       /* tp_setattr */
 #if PY_VERSION_HEX >= 0x03000000
     0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
 #else
-	(cmpfunc)SwigPyObject_compare,	    /* tp_compare */
+      (cmpfunc)SwigPyObject_compare,        /* tp_compare */
 #endif
-	(reprfunc)SwigPyObject_repr,	    /* tp_repr */    
-	&SwigPyObject_as_number,	    /* tp_as_number */
-	0,				    /* tp_as_sequence */
-	0,				    /* tp_as_mapping */
-	(hashfunc)0,			    /* tp_hash */
-	(ternaryfunc)0,			    /* tp_call */
-	(reprfunc)SwigPyObject_str,	    /* tp_str */
-	PyObject_GenericGetAttr,            /* tp_getattro */
-	0,				    /* tp_setattro */
-	0,		                    /* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
-	swigobject_doc, 	            /* tp_doc */        
-	0,                                  /* tp_traverse */
-	0,                                  /* tp_clear */
-	(richcmpfunc)SwigPyObject_richcompare,           /* tp_richcompare */
-	0,                                  /* tp_weaklistoffset */
+      (reprfunc)SwigPyObject_repr,          /* tp_repr */
+      &SwigPyObject_as_number,              /* tp_as_number */
+      0,                                    /* tp_as_sequence */
+      0,                                    /* tp_as_mapping */
+      (hashfunc)0,                          /* tp_hash */
+      (ternaryfunc)0,                       /* tp_call */
+      (reprfunc)SwigPyObject_str,           /* tp_str */
+      PyObject_GenericGetAttr,              /* tp_getattro */
+      0,                                    /* tp_setattro */
+      0,                                    /* tp_as_buffer */
+      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
+      swigobject_doc,                       /* tp_doc */
+      0,                                    /* tp_traverse */
+      0,                                    /* tp_clear */
+      (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
+      0,                                    /* tp_weaklistoffset */
 #if PY_VERSION_HEX >= 0x02020000
-	0,                                  /* tp_iter */
-	0,                                  /* tp_iternext */
-	swigobject_methods,		    /* tp_methods */ 
-	0,			            /* tp_members */
-	0,				    /* tp_getset */	    	
-	0,			            /* tp_base */	        
-	0,				    /* tp_dict */	    	
-	0,				    /* tp_descr_get */  	
-	0,				    /* tp_descr_set */  	
-	0,				    /* tp_dictoffset */ 	
-	0,				    /* tp_init */	    	
-	0,				    /* tp_alloc */	    	
-	0,			            /* tp_new */	    	
-	0,	                            /* tp_free */	   
-	0,                                  /* tp_is_gc */  
-	0,				    /* tp_bases */   
-	0,				    /* tp_mro */
-	0,				    /* tp_cache */   
-	0,				    /* tp_subclasses */
-	0,				    /* tp_weaklist */
+      0,                                    /* tp_iter */
+      0,                                    /* tp_iternext */
+      swigobject_methods,                   /* tp_methods */
+      0,                                    /* tp_members */
+      0,                                    /* tp_getset */
+      0,                                    /* tp_base */
+      0,                                    /* tp_dict */
+      0,                                    /* tp_descr_get */
+      0,                                    /* tp_descr_set */
+      0,                                    /* tp_dictoffset */
+      0,                                    /* tp_init */
+      0,                                    /* tp_alloc */
+      0,                                    /* tp_new */
+      0,                                    /* tp_free */
+      0,                                    /* tp_is_gc */
+      0,                                    /* tp_bases */
+      0,                                    /* tp_mro */
+      0,                                    /* tp_cache */
+      0,                                    /* tp_subclasses */
+      0,                                    /* tp_weaklist */
 #endif
 #if PY_VERSION_HEX >= 0x02030000
-	0,                                  /* tp_del */
+      0,                                    /* tp_del */
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+      0,                                    /* tp_version */
 #endif
 #ifdef COUNT_ALLOCS
-	0,0,0,0                             /* tp_alloc -> tp_next */
+      0,0,0,0                               /* tp_alloc -> tp_next */
 #endif
-      };
+    };
     swigpyobject_type = tmp;
-    /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
-#if PY_VERSION_HEX < 0x03000000
+    type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
     swigpyobject_type.ob_type = &PyType_Type;
+#else
+    if (PyType_Ready(&swigpyobject_type) < 0)
+      return NULL;
 #endif
-    type_init = 1;
   }
   return &swigpyobject_type;
 }
@@ -1930,17 +2054,17 @@ SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
   return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
 }
 
-SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
+SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
 
 SWIGRUNTIME PyTypeObject*
 SwigPyPacked_type(void) {
-  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
   return type;
 }
 
 SWIGRUNTIMEINLINE int
 SwigPyPacked_Check(PyObject *op) {
-  return ((op)->ob_type == _PySwigPacked_type()) 
+  return ((op)->ob_type == SwigPyPacked_TypeOnce()) 
     || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
 }
 
@@ -1955,83 +2079,87 @@ SwigPyPacked_dealloc(PyObject *v)
 }
 
 SWIGRUNTIME PyTypeObject*
-_PySwigPacked_type(void) {
+SwigPyPacked_TypeOnce(void) {
   static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
   static PyTypeObject swigpypacked_type;
-  static int type_init = 0;  
+  static int type_init = 0;
   if (!type_init) {
-    const PyTypeObject tmp
-      = {
-    /* PyObject header changed in Python 3 */
+    const PyTypeObject tmp = {
+      /* PyObject header changed in Python 3 */
 #if PY_VERSION_HEX>=0x03000000
-    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+      PyVarObject_HEAD_INIT(NULL, 0)
 #else
-	PyObject_HEAD_INIT(NULL)
-    0,				    /* ob_size */	
+      PyObject_HEAD_INIT(NULL)
+      0,                                    /* ob_size */
 #endif
-	(char *)"SwigPyPacked",		    /* tp_name */	
-	sizeof(SwigPyPacked),		    /* tp_basicsize */	
-	0,				    /* tp_itemsize */	
-	(destructor)SwigPyPacked_dealloc,   /* tp_dealloc */	
-	(printfunc)SwigPyPacked_print,	    /* tp_print */   	
-	(getattrfunc)0,			    /* tp_getattr */ 	
-	(setattrfunc)0,			    /* tp_setattr */ 	
+      (char *)"SwigPyPacked",               /* tp_name */
+      sizeof(SwigPyPacked),                 /* tp_basicsize */
+      0,                                    /* tp_itemsize */
+      (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
+      (printfunc)SwigPyPacked_print,        /* tp_print */
+      (getattrfunc)0,                       /* tp_getattr */
+      (setattrfunc)0,                       /* tp_setattr */
 #if PY_VERSION_HEX>=0x03000000
-    0, /* tp_reserved in 3.0.1 */
+      0, /* tp_reserved in 3.0.1 */
 #else
-    (cmpfunc)SwigPyPacked_compare,	    /* tp_compare */
+      (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
 #endif
-	(reprfunc)SwigPyPacked_repr,	    /* tp_repr */
-	0,	                            /* tp_as_number */
-	0,				    /* tp_as_sequence */
-	0,				    /* tp_as_mapping */
-	(hashfunc)0,			    /* tp_hash */
-	(ternaryfunc)0,			    /* tp_call */
-	(reprfunc)SwigPyPacked_str,	    /* tp_str */
-	PyObject_GenericGetAttr,            /* tp_getattro */
-	0,				    /* tp_setattro */
-	0,		                    /* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
-	swigpacked_doc, 	            /* tp_doc */
-	0,                                  /* tp_traverse */
-	0,                                  /* tp_clear */
-	0,                                  /* tp_richcompare */
-	0,                                  /* tp_weaklistoffset */
+      (reprfunc)SwigPyPacked_repr,          /* tp_repr */
+      0,                                    /* tp_as_number */
+      0,                                    /* tp_as_sequence */
+      0,                                    /* tp_as_mapping */
+      (hashfunc)0,                          /* tp_hash */
+      (ternaryfunc)0,                       /* tp_call */
+      (reprfunc)SwigPyPacked_str,           /* tp_str */
+      PyObject_GenericGetAttr,              /* tp_getattro */
+      0,                                    /* tp_setattro */
+      0,                                    /* tp_as_buffer */
+      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
+      swigpacked_doc,                       /* tp_doc */
+      0,                                    /* tp_traverse */
+      0,                                    /* tp_clear */
+      0,                                    /* tp_richcompare */
+      0,                                    /* tp_weaklistoffset */
 #if PY_VERSION_HEX >= 0x02020000
-	0,                                  /* tp_iter */
-	0,                                  /* tp_iternext */
-	0,		                    /* tp_methods */ 
-	0,			            /* tp_members */
-	0,				    /* tp_getset */	    	
-	0,			            /* tp_base */	        
-	0,				    /* tp_dict */	    	
-	0,				    /* tp_descr_get */  	
-	0,				    /* tp_descr_set */  	
-	0,				    /* tp_dictoffset */ 	
-	0,				    /* tp_init */	    	
-	0,				    /* tp_alloc */	    	
-	0,			            /* tp_new */	    	
-	0, 	                            /* tp_free */	   
-        0,                                  /* tp_is_gc */  
-	0,				    /* tp_bases */   
-	0,				    /* tp_mro */
-	0,				    /* tp_cache */   
- 	0,				    /* tp_subclasses */
-	0,				    /* tp_weaklist */
+      0,                                    /* tp_iter */
+      0,                                    /* tp_iternext */
+      0,                                    /* tp_methods */
+      0,                                    /* tp_members */
+      0,                                    /* tp_getset */
+      0,                                    /* tp_base */
+      0,                                    /* tp_dict */
+      0,                                    /* tp_descr_get */
+      0,                                    /* tp_descr_set */
+      0,                                    /* tp_dictoffset */
+      0,                                    /* tp_init */
+      0,                                    /* tp_alloc */
+      0,                                    /* tp_new */
+      0,                                    /* tp_free */
+      0,                                    /* tp_is_gc */
+      0,                                    /* tp_bases */
+      0,                                    /* tp_mro */
+      0,                                    /* tp_cache */
+      0,                                    /* tp_subclasses */
+      0,                                    /* tp_weaklist */
 #endif
 #if PY_VERSION_HEX >= 0x02030000
-	0,                                  /* tp_del */
+      0,                                    /* tp_del */
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+      0,                                    /* tp_version */
 #endif
 #ifdef COUNT_ALLOCS
-	0,0,0,0                             /* tp_alloc -> tp_next */
+      0,0,0,0                               /* tp_alloc -> tp_next */
 #endif
-      };
+    };
     swigpypacked_type = tmp;
-    /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */
-#if PY_VERSION_HEX < 0x03000000
+    type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
     swigpypacked_type.ob_type = &PyType_Type;
+#else
+    if (PyType_Ready(&swigpypacked_type) < 0)
+      return NULL;
 #endif
-    type_init = 1;
   }
   return &swigpypacked_type;
 }
@@ -2098,50 +2226,65 @@ SWIG_This(void)
 SWIGRUNTIME SwigPyObject *
 SWIG_Python_GetSwigThis(PyObject *pyobj) 
 {
-  if (SwigPyObject_Check(pyobj)) {
+  PyObject *obj;
+
+  if (SwigPyObject_Check(pyobj))
     return (SwigPyObject *) pyobj;
-  } else {
-    PyObject *obj = 0;
+
+#ifdef SWIGPYTHON_BUILTIN
+  (void)obj;
+# ifdef PyWeakref_CheckProxy
+  if (PyWeakref_CheckProxy(pyobj)) {
+    pyobj = PyWeakref_GET_OBJECT(pyobj);
+    if (pyobj && SwigPyObject_Check(pyobj))
+      return (SwigPyObject*) pyobj;
+  }
+# endif
+  return NULL;
+#else
+
+  obj = 0;
+
 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
-    if (PyInstance_Check(pyobj)) {
-      obj = _PyInstance_Lookup(pyobj, SWIG_This());      
+  if (PyInstance_Check(pyobj)) {
+    obj = _PyInstance_Lookup(pyobj, SWIG_This());      
+  } else {
+    PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
+    if (dictptr != NULL) {
+      PyObject *dict = *dictptr;
+      obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
     } else {
-      PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
-      if (dictptr != NULL) {
-	PyObject *dict = *dictptr;
-	obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
-      } else {
 #ifdef PyWeakref_CheckProxy
-	if (PyWeakref_CheckProxy(pyobj)) {
-	  PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
-	  return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
-	}
+      if (PyWeakref_CheckProxy(pyobj)) {
+	PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
+	return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
+      }
 #endif
-	obj = PyObject_GetAttr(pyobj,SWIG_This());
-	if (obj) {
-	  Py_DECREF(obj);
-	} else {
-	  if (PyErr_Occurred()) PyErr_Clear();
-	  return 0;
-	}
+      obj = PyObject_GetAttr(pyobj,SWIG_This());
+      if (obj) {
+	Py_DECREF(obj);
+      } else {
+	if (PyErr_Occurred()) PyErr_Clear();
+	return 0;
       }
     }
+  }
 #else
-    obj = PyObject_GetAttr(pyobj,SWIG_This());
-    if (obj) {
-      Py_DECREF(obj);
-    } else {
-      if (PyErr_Occurred()) PyErr_Clear();
-      return 0;
-    }
+  obj = PyObject_GetAttr(pyobj,SWIG_This());
+  if (obj) {
+    Py_DECREF(obj);
+  } else {
+    if (PyErr_Occurred()) PyErr_Clear();
+    return 0;
+  }
 #endif
-    if (obj && !SwigPyObject_Check(obj)) {
-      /* a PyObject is called 'this', try to get the 'real this'
-	 SwigPyObject from it */ 
-      return SWIG_Python_GetSwigThis(obj);
-    }
-    return (SwigPyObject *)obj;
+  if (obj && !SwigPyObject_Check(obj)) {
+    /* a PyObject is called 'this', try to get the 'real this'
+       SwigPyObject from it */ 
+    return SWIG_Python_GetSwigThis(obj);
   }
+  return (SwigPyObject *)obj;
+#endif
 }
 
 /* Acquire a pointer value */
@@ -2163,91 +2306,97 @@ SWIG_Python_AcquirePtr(PyObject *obj, int own) {
 
 SWIGRUNTIME int
 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
-  if (!obj) return SWIG_ERROR;
+  int res;
+  SwigPyObject *sobj;
+
+  if (!obj)
+    return SWIG_ERROR;
   if (obj == Py_None) {
-    if (ptr) *ptr = 0;
+    if (ptr)
+      *ptr = 0;
     return SWIG_OK;
-  } else {
-    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
-    if (own)
-      *own = 0;
-    while (sobj) {
-      void *vptr = sobj->ptr;
-      if (ty) {
-	swig_type_info *to = sobj->ty;
-	if (to == ty) {
-	  /* no type cast needed */
-	  if (ptr) *ptr = vptr;
-	  break;
-	} else {
-	  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
-	  if (!tc) {
-	    sobj = (SwigPyObject *)sobj->next;
-	  } else {
-	    if (ptr) {
-              int newmemory = 0;
-              *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
-              if (newmemory == SWIG_CAST_NEW_MEMORY) {
-                assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
-                if (own)
-                  *own = *own | SWIG_CAST_NEW_MEMORY;
-              }
-            }
-	    break;
-	  }
-	}
+  }
+
+  res = SWIG_ERROR;
+
+  sobj = SWIG_Python_GetSwigThis(obj);
+  if (own)
+    *own = 0;
+  while (sobj) {
+    void *vptr = sobj->ptr;
+    if (ty) {
+      swig_type_info *to = sobj->ty;
+      if (to == ty) {
+        /* no type cast needed */
+        if (ptr) *ptr = vptr;
+        break;
       } else {
-	if (ptr) *ptr = vptr;
-	break;
-      }
-    }
-    if (sobj) {
-      if (own)
-        *own = *own | sobj->own;
-      if (flags & SWIG_POINTER_DISOWN) {
-	sobj->own = 0;
+        swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+        if (!tc) {
+          sobj = (SwigPyObject *)sobj->next;
+        } else {
+          if (ptr) {
+            int newmemory = 0;
+            *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+            if (newmemory == SWIG_CAST_NEW_MEMORY) {
+              assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
+              if (own)
+                *own = *own | SWIG_CAST_NEW_MEMORY;
+            }
+          }
+          break;
+        }
       }
-      return SWIG_OK;
     } else {
-      int res = SWIG_ERROR;
-      if (flags & SWIG_POINTER_IMPLICIT_CONV) {
-	SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
-	if (data && !data->implicitconv) {
-	  PyObject *klass = data->klass;
-	  if (klass) {
-	    PyObject *impconv;
-	    data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
-	    impconv = SWIG_Python_CallFunctor(klass, obj);
-	    data->implicitconv = 0;
-	    if (PyErr_Occurred()) {
-	      PyErr_Clear();
-	      impconv = 0;
-	    }
-	    if (impconv) {
-	      SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
-	      if (iobj) {
-		void *vptr;
-		res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
-		if (SWIG_IsOK(res)) {
-		  if (ptr) {
-		    *ptr = vptr;
-		    /* transfer the ownership to 'ptr' */
-		    iobj->own = 0;
-		    res = SWIG_AddCast(res);
-		    res = SWIG_AddNewMask(res);
-		  } else {
-		    res = SWIG_AddCast(res);		    
-		  }
-		}
-	      }
-	      Py_DECREF(impconv);
-	    }
-	  }
-	}
+      if (ptr) *ptr = vptr;
+      break;
+    }
+  }
+  if (sobj) {
+    if (own)
+      *own = *own | sobj->own;
+    if (flags & SWIG_POINTER_DISOWN) {
+      sobj->own = 0;
+    }
+    res = SWIG_OK;
+  } else {
+    if (flags & SWIG_POINTER_IMPLICIT_CONV) {
+      SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
+      if (data && !data->implicitconv) {
+        PyObject *klass = data->klass;
+        if (klass) {
+          PyObject *impconv;
+          data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
+          impconv = SWIG_Python_CallFunctor(klass, obj);
+          data->implicitconv = 0;
+          if (PyErr_Occurred()) {
+            PyErr_Clear();
+            impconv = 0;
+          }
+          if (impconv) {
+            SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
+            if (iobj) {
+              void *vptr;
+              res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
+              if (SWIG_IsOK(res)) {
+                if (ptr) {
+                  *ptr = vptr;
+                  /* transfer the ownership to 'ptr' */
+                  iobj->own = 0;
+                  res = SWIG_AddCast(res);
+                  res = SWIG_AddNewMask(res);
+                } else {
+                  res = SWIG_AddCast(res);		    
+                }
+              }
+            }
+            Py_DECREF(impconv);
+          }
+        }
       }
-      return res;
     }
   }
+  return res;
 }
 
 /* Convert a function ptr value */
@@ -2401,7 +2550,7 @@ SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
 SWIGINTERN PyObject *
 SWIG_Python_InitShadowInstance(PyObject *args) {
   PyObject *obj[2];
-  if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
+  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
     return NULL;
   } else {
     SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
@@ -2417,22 +2566,54 @@ SWIG_Python_InitShadowInstance(PyObject *args) {
 /* Create a new pointer object */
 
 SWIGRUNTIME PyObject *
-SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
-  if (!ptr) {
+SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
+  SwigPyClientData *clientdata;
+  PyObject * robj;
+  int own;
+
+  if (!ptr)
     return SWIG_Py_Void();
-  } else {
-    int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
-    PyObject *robj = SwigPyObject_New(ptr, type, own);
-    SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
-    if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
-      PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
-      if (inst) {
-	Py_DECREF(robj);
-	robj = inst;
+
+  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
+  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
+  if (clientdata && clientdata->pytype) {
+    SwigPyObject *newobj;
+    if (flags & SWIG_BUILTIN_TP_INIT) {
+      newobj = (SwigPyObject*) self;
+      if (newobj->ptr) {
+        PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
+        while (newobj->next)
+	  newobj = (SwigPyObject *) newobj->next;
+        newobj->next = next_self;
+        newobj = (SwigPyObject *)next_self;
       }
+    } else {
+      newobj = PyObject_New(SwigPyObject, clientdata->pytype);
+    }
+    if (newobj) {
+      newobj->ptr = ptr;
+      newobj->ty = type;
+      newobj->own = own;
+      newobj->next = 0;
+#ifdef SWIGPYTHON_BUILTIN
+      newobj->dict = 0;
+#endif
+      return (PyObject*) newobj;
     }
-    return robj;
+    return SWIG_Py_Void();
   }
+
+  assert(!(flags & SWIG_BUILTIN_TP_INIT));
+
+  robj = SwigPyObject_New(ptr, type, own);
+  if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
+    PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
+    if (inst) {
+      Py_DECREF(robj);
+      robj = inst;
+    }
+  }
+  return robj;
 }
 
 /* Create a new packed object */
@@ -2458,12 +2639,12 @@ SWIG_Python_GetModule(void) {
 #ifdef SWIG_LINK_RUNTIME
     type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
 #else
-#ifdef USE_CAPSULES
-    type_pointer = PyCapsule_Import(TYPE_POINTER_NAME, 0);
-#else
+# ifdef SWIGPY_USE_CAPSULE
+    type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
+# else
     type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
 				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
-#endif
+# endif
     if (PyErr_Occurred()) {
       PyErr_Clear();
       type_pointer = (void *)0;
@@ -2506,16 +2687,19 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o)
 #endif
 
 SWIGRUNTIME void
+#ifdef SWIGPY_USE_CAPSULE
+SWIG_Python_DestroyModule(PyObject *obj)
+#else
 SWIG_Python_DestroyModule(void *vptr)
+#endif
 {
-  size_t i;
-#ifdef USE_CAPSULES
-  swig_module_info *swig_module =
-    (swig_module_info *) PyCapsule_GetPointer((PyObject *)vptr, TYPE_POINTER_NAME);
+#ifdef SWIGPY_USE_CAPSULE
+  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
 #else
   swig_module_info *swig_module = (swig_module_info *) vptr;
 #endif
   swig_type_info **types = swig_module->types;
+  size_t i;
   for (i =0; i < swig_module->size; ++i) {
     swig_type_info *ty = types[i];
     if (ty->owndata) {
@@ -2529,30 +2713,28 @@ SWIG_Python_DestroyModule(void *vptr)
 
 SWIGRUNTIME void
 SWIG_Python_SetModule(swig_module_info *swig_module) {
-  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
-
 #if PY_VERSION_HEX >= 0x03000000
  /* Add a dummy module object into sys.modules */
   PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
 #else
-  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
-				   swig_empty_runtime_method_table);
-#endif
-#ifdef USE_CAPSULES
-  PyObject *pointer = PyCapsule_New((void *)swig_module, TYPE_POINTER_NAME,
-				    (PyCapsule_Destructor)SWIG_Python_DestroyModule);
-#else
-  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
+  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
 #endif
+#ifdef SWIGPY_USE_CAPSULE
+  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
   if (pointer && module) {
-#ifdef USE_CAPSULES
     PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
+  } else {
+    Py_XDECREF(pointer);
+  }
 #else
+  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+  if (pointer && module) {
     PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
-#endif
   } else {
     Py_XDECREF(pointer);
   }
+#endif
 }
 
 /* The python cached type query */
@@ -2570,8 +2752,8 @@ SWIG_Python_TypeQuery(const char *type)
   PyObject *obj = PyDict_GetItem(cache, key);
   swig_type_info *descriptor;
   if (obj) {
-#ifdef USE_CAPSULES
-    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, type);
+#ifdef SWIGPY_USE_CAPSULE
+    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
 #else
     descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
 #endif
@@ -2579,8 +2761,8 @@ SWIG_Python_TypeQuery(const char *type)
     swig_module_info *swig_module = SWIG_Python_GetModule();
     descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
     if (descriptor) {
-#ifdef USE_CAPSULES
-      obj = PyCapsule_New(descriptor, type, NULL);
+#ifdef SWIGPY_USE_CAPSULE
+      obj = PyCapsule_New((void*) descriptor, NULL, NULL);
 #else
       obj = PyCObject_FromVoidPtr(descriptor, NULL);
 #endif
@@ -2644,7 +2826,7 @@ SwigPyObject_GetDesc(PyObject *self)
 {
   SwigPyObject *v = (SwigPyObject *)self;
   swig_type_info *ty = v ? v->ty : 0;
-  return ty ? ty->str : (char*)"";
+  return ty ? ty->str : "";
 }
 
 SWIGRUNTIME void
@@ -2687,7 +2869,7 @@ SWIG_Python_TypeError(const char *type, PyObject *obj)
 
 /* Convert a pointer value, signal an exception on a type mismatch */
 SWIGRUNTIME void *
-SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
+SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
   void *result;
   if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
     PyErr_Clear();
@@ -2701,11 +2883,62 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags)
   return result;
 }
 
+#ifdef SWIGPYTHON_BUILTIN
+SWIGRUNTIME int
+SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
+  PyTypeObject *tp = obj->ob_type;
+  PyObject *descr;
+  PyObject *encoded_name;
+  descrsetfunc f;
+  int res;
 
-#ifdef __cplusplus
-#if 0
-{ /* cc-mode */
+# ifdef Py_USING_UNICODE
+  if (PyString_Check(name)) {
+    name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
+    if (!name)
+      return -1;
+  } else if (!PyUnicode_Check(name))
+# else
+  if (!PyString_Check(name))
+# endif
+  {
+    PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
+    return -1;
+  } else {
+    Py_INCREF(name);
+  }
+
+  if (!tp->tp_dict) {
+    if (PyType_Ready(tp) < 0)
+      goto done;
+  }
+
+  res = -1;
+  descr = _PyType_Lookup(tp, name);
+  f = NULL;
+  if (descr != NULL)
+    f = descr->ob_type->tp_descr_set;
+  if (!f) {
+    if (PyString_Check(name)) {
+      encoded_name = name;
+      Py_INCREF(name);
+    } else {
+      encoded_name = PyUnicode_AsUTF8String(name);
+    }
+    PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
+    Py_DECREF(encoded_name);
+  } else {
+    res = f(descr, obj, value);
+  }
+  
+  done:
+  Py_DECREF(name);
+  return res;
+}
 #endif
+
+
+#ifdef __cplusplus
 }
 #endif
 
@@ -2745,7 +2978,7 @@ static swig_module_info swig_module = {swig_types, 1, 0, 0, 0, 0};
 #endif
 #define SWIG_name    "_csc"
 
-#define SWIGVERSION 0x020001 
+#define SWIGVERSION 0x020007 
 #define SWIG_VERSION SWIGVERSION
 
 
@@ -4973,8 +5206,8 @@ SWIGINTERN PyObject *_wrap_csc_diagonal(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 6); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 6) {
@@ -5499,7 +5732,7 @@ fail:
     "    csc_diagonal< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper [])\n"
     "    csc_diagonal< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper [])\n"
     "    csc_diagonal< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -7273,8 +7506,8 @@ SWIGINTERN PyObject *_wrap_csc_tocsr(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 8); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 8) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 8) {
@@ -7939,7 +8172,7 @@ fail:
     "    csc_tocsr< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    csc_tocsr< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    csc_tocsr< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -10721,8 +10954,8 @@ SWIGINTERN PyObject *_wrap_csc_matmat_pass2(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 11); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 11) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 11) {
@@ -11597,7 +11830,7 @@ fail:
     "    csc_matmat_pass2< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    csc_matmat_pass2< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    csc_matmat_pass2< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -13483,8 +13716,8 @@ SWIGINTERN PyObject *_wrap_csc_matvec(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 7); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 7) {
@@ -14079,7 +14312,7 @@ fail:
     "    csc_matvec< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper [])\n"
     "    csc_matvec< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper [])\n"
     "    csc_matvec< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],npy_clongdouble_wrapper const [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -16091,8 +16324,8 @@ SWIGINTERN PyObject *_wrap_csc_matvecs(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 8); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 8) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 8) {
@@ -16771,7 +17004,7 @@ fail:
     "    csc_matvecs< int,npy_cfloat_wrapper >(int const,int const,int const,int const [],int const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper [])\n"
     "    csc_matvecs< int,npy_cdouble_wrapper >(int const,int const,int const,int const [],int const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper [])\n"
     "    csc_matvecs< int,npy_clongdouble_wrapper >(int const,int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],npy_clongdouble_wrapper const [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -19553,8 +19786,8 @@ SWIGINTERN PyObject *_wrap_csc_elmul_csc(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 11); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 11) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 11) {
@@ -20429,7 +20662,7 @@ fail:
     "    csc_elmul_csc< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    csc_elmul_csc< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    csc_elmul_csc< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -23211,8 +23444,8 @@ SWIGINTERN PyObject *_wrap_csc_eldiv_csc(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 11); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 11) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 11) {
@@ -24087,7 +24320,7 @@ fail:
     "    csc_eldiv_csc< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    csc_eldiv_csc< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    csc_eldiv_csc< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -26869,8 +27102,8 @@ SWIGINTERN PyObject *_wrap_csc_plus_csc(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 11); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 11) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 11) {
@@ -27745,7 +27978,7 @@ fail:
     "    csc_plus_csc< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    csc_plus_csc< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    csc_plus_csc< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -30527,8 +30760,8 @@ SWIGINTERN PyObject *_wrap_csc_minus_csc(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 11); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 11) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 11) {
@@ -31403,335 +31636,356 @@ fail:
     "    csc_minus_csc< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    csc_minus_csc< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    csc_minus_csc< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
 static PyMethodDef SwigMethods[] = {
 	 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
 	 { (char *)"csc_matmat_pass1", _wrap_csc_matmat_pass1, METH_VARARGS, (char *)"\n"
-		"csc_matmat_pass1(int n_row, int n_col, int Ap, int Ai, int Bp, int Bi, \n"
-		"    int Cp)\n"
+		"csc_matmat_pass1(int const n_row, int const n_col, int const [] Ap, int const [] Ai, int const [] Bp, \n"
+		"    int const [] Bi, int [] Cp)\n"
 		""},
 	 { (char *)"csc_diagonal", _wrap_csc_diagonal, METH_VARARGS, (char *)"\n"
-		"csc_diagonal(int n_row, int n_col, int Ap, int Aj, signed char Ax, \n"
-		"    signed char Yx)\n"
-		"csc_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, \n"
-		"    unsigned char Yx)\n"
-		"csc_diagonal(int n_row, int n_col, int Ap, int Aj, short Ax, short Yx)\n"
-		"csc_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, \n"
-		"    unsigned short Yx)\n"
-		"csc_diagonal(int n_row, int n_col, int Ap, int Aj, int Ax, int Yx)\n"
-		"csc_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, \n"
-		"    unsigned int Yx)\n"
-		"csc_diagonal(int n_row, int n_col, int Ap, int Aj, long long Ax, \n"
-		"    long long Yx)\n"
-		"csc_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, \n"
-		"    unsigned long long Yx)\n"
-		"csc_diagonal(int n_row, int n_col, int Ap, int Aj, float Ax, float Yx)\n"
-		"csc_diagonal(int n_row, int n_col, int Ap, int Aj, double Ax, double Yx)\n"
-		"csc_diagonal(int n_row, int n_col, int Ap, int Aj, long double Ax, \n"
-		"    long double Yx)\n"
-		"csc_diagonal(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
-		"    npy_cfloat_wrapper Yx)\n"
-		"csc_diagonal(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
-		"    npy_cdouble_wrapper Yx)\n"
-		"csc_diagonal(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, \n"
-		"    npy_clongdouble_wrapper Yx)\n"
+		"csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, \n"
+		"    signed char [] Yx)\n"
+		"csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, \n"
+		"    unsigned char [] Yx)\n"
+		"csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, \n"
+		"    short [] Yx)\n"
+		"csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, \n"
+		"    unsigned short [] Yx)\n"
+		"csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, \n"
+		"    int [] Yx)\n"
+		"csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, \n"
+		"    unsigned int [] Yx)\n"
+		"csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, \n"
+		"    long long [] Yx)\n"
+		"csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, \n"
+		"    unsigned long long [] Yx)\n"
+		"csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, \n"
+		"    float [] Yx)\n"
+		"csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, \n"
+		"    double [] Yx)\n"
+		"csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, \n"
+		"    long double [] Yx)\n"
+		"csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, \n"
+		"    npy_cfloat_wrapper [] Yx)\n"
+		"csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, \n"
+		"    npy_cdouble_wrapper [] Yx)\n"
+		"csc_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, \n"
+		"    npy_clongdouble_wrapper [] Yx)\n"
 		""},
 	 { (char *)"csc_tocsr", _wrap_csc_tocsr, METH_VARARGS, (char *)"\n"
-		"csc_tocsr(int n_row, int n_col, int Ap, int Ai, signed char Ax, \n"
-		"    int Bp, int Bj, signed char Bx)\n"
-		"csc_tocsr(int n_row, int n_col, int Ap, int Ai, unsigned char Ax, \n"
-		"    int Bp, int Bj, unsigned char Bx)\n"
-		"csc_tocsr(int n_row, int n_col, int Ap, int Ai, short Ax, int Bp, \n"
-		"    int Bj, short Bx)\n"
-		"csc_tocsr(int n_row, int n_col, int Ap, int Ai, unsigned short Ax, \n"
-		"    int Bp, int Bj, unsigned short Bx)\n"
-		"csc_tocsr(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp, \n"
-		"    int Bj, int Bx)\n"
-		"csc_tocsr(int n_row, int n_col, int Ap, int Ai, unsigned int Ax, \n"
-		"    int Bp, int Bj, unsigned int Bx)\n"
-		"csc_tocsr(int n_row, int n_col, int Ap, int Ai, long long Ax, \n"
-		"    int Bp, int Bj, long long Bx)\n"
-		"csc_tocsr(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax, \n"
-		"    int Bp, int Bj, unsigned long long Bx)\n"
-		"csc_tocsr(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp, \n"
-		"    int Bj, float Bx)\n"
-		"csc_tocsr(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, \n"
-		"    int Bj, double Bx)\n"
-		"csc_tocsr(int n_row, int n_col, int Ap, int Ai, long double Ax, \n"
-		"    int Bp, int Bj, long double Bx)\n"
-		"csc_tocsr(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_cfloat_wrapper Bx)\n"
-		"csc_tocsr(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_cdouble_wrapper Bx)\n"
-		"csc_tocsr(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_clongdouble_wrapper Bx)\n"
+		"csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, signed char const [] Ax, \n"
+		"    int [] Bp, int [] Bj, signed char [] Bx)\n"
+		"csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned char const [] Ax, \n"
+		"    int [] Bp, int [] Bj, unsigned char [] Bx)\n"
+		"csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, short const [] Ax, \n"
+		"    int [] Bp, int [] Bj, short [] Bx)\n"
+		"csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned short const [] Ax, \n"
+		"    int [] Bp, int [] Bj, unsigned short [] Bx)\n"
+		"csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, int const [] Ax, \n"
+		"    int [] Bp, int [] Bj, int [] Bx)\n"
+		"csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned int const [] Ax, \n"
+		"    int [] Bp, int [] Bj, unsigned int [] Bx)\n"
+		"csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long long const [] Ax, \n"
+		"    int [] Bp, int [] Bj, long long [] Bx)\n"
+		"csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned long long const [] Ax, \n"
+		"    int [] Bp, int [] Bj, unsigned long long [] Bx)\n"
+		"csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, float const [] Ax, \n"
+		"    int [] Bp, int [] Bj, float [] Bx)\n"
+		"csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, double const [] Ax, \n"
+		"    int [] Bp, int [] Bj, double [] Bx)\n"
+		"csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long double const [] Ax, \n"
+		"    int [] Bp, int [] Bj, long double [] Bx)\n"
+		"csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cfloat_wrapper const [] Ax, \n"
+		"    int [] Bp, int [] Bj, npy_cfloat_wrapper [] Bx)\n"
+		"csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cdouble_wrapper const [] Ax, \n"
+		"    int [] Bp, int [] Bj, npy_cdouble_wrapper [] Bx)\n"
+		"csc_tocsr(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_clongdouble_wrapper const [] Ax, \n"
+		"    int [] Bp, int [] Bj, npy_clongdouble_wrapper [] Bx)\n"
 		""},
 	 { (char *)"csc_matmat_pass2", _wrap_csc_matmat_pass2, METH_VARARGS, (char *)"\n"
-		"csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, signed char Ax, \n"
-		"    int Bp, int Bi, signed char Bx, int Cp, int Ci, \n"
-		"    signed char Cx)\n"
-		"csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, unsigned char Ax, \n"
-		"    int Bp, int Bi, unsigned char Bx, int Cp, \n"
-		"    int Ci, unsigned char Cx)\n"
-		"csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, short Ax, int Bp, \n"
-		"    int Bi, short Bx, int Cp, int Ci, short Cx)\n"
-		"csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, unsigned short Ax, \n"
-		"    int Bp, int Bi, unsigned short Bx, int Cp, \n"
-		"    int Ci, unsigned short Cx)\n"
-		"csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp, \n"
-		"    int Bi, int Bx, int Cp, int Ci, int Cx)\n"
-		"csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, unsigned int Ax, \n"
-		"    int Bp, int Bi, unsigned int Bx, int Cp, \n"
-		"    int Ci, unsigned int Cx)\n"
-		"csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, long long Ax, \n"
-		"    int Bp, int Bi, long long Bx, int Cp, int Ci, \n"
-		"    long long Cx)\n"
-		"csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax, \n"
-		"    int Bp, int Bi, unsigned long long Bx, \n"
-		"    int Cp, int Ci, unsigned long long Cx)\n"
-		"csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp, \n"
-		"    int Bi, float Bx, int Cp, int Ci, float Cx)\n"
-		"csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, \n"
-		"    int Bi, double Bx, int Cp, int Ci, double Cx)\n"
-		"csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, long double Ax, \n"
-		"    int Bp, int Bi, long double Bx, int Cp, int Ci, \n"
-		"    long double Cx)\n"
-		"csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_cfloat_wrapper Bx, \n"
-		"    int Cp, int Ci, npy_cfloat_wrapper Cx)\n"
-		"csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_cdouble_wrapper Bx, \n"
-		"    int Cp, int Ci, npy_cdouble_wrapper Cx)\n"
-		"csc_matmat_pass2(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_clongdouble_wrapper Bx, \n"
-		"    int Cp, int Ci, npy_clongdouble_wrapper Cx)\n"
+		"csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, signed char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, signed char const [] Bx, int [] Cp, \n"
+		"    int [] Ci, signed char [] Cx)\n"
+		"csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned char const [] Bx, \n"
+		"    int [] Cp, int [] Ci, unsigned char [] Cx)\n"
+		"csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, short const [] Bx, int [] Cp, int [] Ci, \n"
+		"    short [] Cx)\n"
+		"csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned short const [] Bx, \n"
+		"    int [] Cp, int [] Ci, unsigned short [] Cx)\n"
+		"csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, int const [] Bx, int [] Cp, int [] Ci, \n"
+		"    int [] Cx)\n"
+		"csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned int const [] Bx, int [] Cp, \n"
+		"    int [] Ci, unsigned int [] Cx)\n"
+		"csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, long long const [] Bx, int [] Cp, \n"
+		"    int [] Ci, long long [] Cx)\n"
+		"csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned long long const [] Bx, \n"
+		"    int [] Cp, int [] Ci, unsigned long long [] Cx)\n"
+		"csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, float const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, float const [] Bx, int [] Cp, int [] Ci, \n"
+		"    float [] Cx)\n"
+		"csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, double const [] Bx, int [] Cp, int [] Ci, \n"
+		"    double [] Cx)\n"
+		"csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, long double const [] Bx, int [] Cp, \n"
+		"    int [] Ci, long double [] Cx)\n"
+		"csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cfloat_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, npy_cfloat_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Ci, npy_cfloat_wrapper [] Cx)\n"
+		"csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, npy_cdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Ci, npy_cdouble_wrapper [] Cx)\n"
+		"csc_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_clongdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, npy_clongdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Ci, npy_clongdouble_wrapper [] Cx)\n"
 		""},
 	 { (char *)"csc_matvec", _wrap_csc_matvec, METH_VARARGS, (char *)"\n"
-		"csc_matvec(int n_row, int n_col, int Ap, int Ai, signed char Ax, \n"
-		"    signed char Xx, signed char Yx)\n"
-		"csc_matvec(int n_row, int n_col, int Ap, int Ai, unsigned char Ax, \n"
-		"    unsigned char Xx, unsigned char Yx)\n"
-		"csc_matvec(int n_row, int n_col, int Ap, int Ai, short Ax, short Xx, \n"
-		"    short Yx)\n"
-		"csc_matvec(int n_row, int n_col, int Ap, int Ai, unsigned short Ax, \n"
-		"    unsigned short Xx, unsigned short Yx)\n"
-		"csc_matvec(int n_row, int n_col, int Ap, int Ai, int Ax, int Xx, \n"
-		"    int Yx)\n"
-		"csc_matvec(int n_row, int n_col, int Ap, int Ai, unsigned int Ax, \n"
-		"    unsigned int Xx, unsigned int Yx)\n"
-		"csc_matvec(int n_row, int n_col, int Ap, int Ai, long long Ax, \n"
-		"    long long Xx, long long Yx)\n"
-		"csc_matvec(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax, \n"
-		"    unsigned long long Xx, unsigned long long Yx)\n"
-		"csc_matvec(int n_row, int n_col, int Ap, int Ai, float Ax, float Xx, \n"
-		"    float Yx)\n"
-		"csc_matvec(int n_row, int n_col, int Ap, int Ai, double Ax, double Xx, \n"
-		"    double Yx)\n"
-		"csc_matvec(int n_row, int n_col, int Ap, int Ai, long double Ax, \n"
-		"    long double Xx, long double Yx)\n"
-		"csc_matvec(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, \n"
-		"    npy_cfloat_wrapper Xx, npy_cfloat_wrapper Yx)\n"
-		"csc_matvec(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, \n"
-		"    npy_cdouble_wrapper Xx, npy_cdouble_wrapper Yx)\n"
-		"csc_matvec(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax, \n"
-		"    npy_clongdouble_wrapper Xx, npy_clongdouble_wrapper Yx)\n"
+		"csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, signed char const [] Ax, \n"
+		"    signed char const [] Xx, signed char [] Yx)\n"
+		"csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned char const [] Ax, \n"
+		"    unsigned char const [] Xx, unsigned char [] Yx)\n"
+		"csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, short const [] Ax, \n"
+		"    short const [] Xx, short [] Yx)\n"
+		"csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned short const [] Ax, \n"
+		"    unsigned short const [] Xx, unsigned short [] Yx)\n"
+		"csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, int const [] Ax, \n"
+		"    int const [] Xx, int [] Yx)\n"
+		"csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned int const [] Ax, \n"
+		"    unsigned int const [] Xx, unsigned int [] Yx)\n"
+		"csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long long const [] Ax, \n"
+		"    long long const [] Xx, long long [] Yx)\n"
+		"csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned long long const [] Ax, \n"
+		"    unsigned long long const [] Xx, unsigned long long [] Yx)\n"
+		"csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, float const [] Ax, \n"
+		"    float const [] Xx, float [] Yx)\n"
+		"csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, double const [] Ax, \n"
+		"    double const [] Xx, double [] Yx)\n"
+		"csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long double const [] Ax, \n"
+		"    long double const [] Xx, long double [] Yx)\n"
+		"csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cfloat_wrapper const [] Ax, \n"
+		"    npy_cfloat_wrapper const [] Xx, npy_cfloat_wrapper [] Yx)\n"
+		"csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cdouble_wrapper const [] Ax, \n"
+		"    npy_cdouble_wrapper const [] Xx, npy_cdouble_wrapper [] Yx)\n"
+		"csc_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_clongdouble_wrapper const [] Ax, \n"
+		"    npy_clongdouble_wrapper const [] Xx, npy_clongdouble_wrapper [] Yx)\n"
 		""},
 	 { (char *)"csc_matvecs", _wrap_csc_matvecs, METH_VARARGS, (char *)"\n"
-		"csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, signed char Ax, \n"
-		"    signed char Xx, signed char Yx)\n"
-		"csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, unsigned char Ax, \n"
-		"    unsigned char Xx, unsigned char Yx)\n"
-		"csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, short Ax, \n"
-		"    short Xx, short Yx)\n"
-		"csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, unsigned short Ax, \n"
-		"    unsigned short Xx, unsigned short Yx)\n"
-		"csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, int Ax, \n"
-		"    int Xx, int Yx)\n"
-		"csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, unsigned int Ax, \n"
-		"    unsigned int Xx, unsigned int Yx)\n"
-		"csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, long long Ax, \n"
-		"    long long Xx, long long Yx)\n"
-		"csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, unsigned long long Ax, \n"
-		"    unsigned long long Xx, \n"
-		"    unsigned long long Yx)\n"
-		"csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, float Ax, \n"
-		"    float Xx, float Yx)\n"
-		"csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, double Ax, \n"
-		"    double Xx, double Yx)\n"
-		"csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, long double Ax, \n"
-		"    long double Xx, long double Yx)\n"
-		"csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, npy_cfloat_wrapper Ax, \n"
-		"    npy_cfloat_wrapper Xx, \n"
-		"    npy_cfloat_wrapper Yx)\n"
-		"csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, npy_cdouble_wrapper Ax, \n"
-		"    npy_cdouble_wrapper Xx, \n"
-		"    npy_cdouble_wrapper Yx)\n"
-		"csc_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Ai, npy_clongdouble_wrapper Ax, \n"
-		"    npy_clongdouble_wrapper Xx, \n"
-		"    npy_clongdouble_wrapper Yx)\n"
+		"csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, \n"
+		"    signed char const [] Ax, signed char const [] Xx, signed char [] Yx)\n"
+		"csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, \n"
+		"    unsigned char const [] Ax, unsigned char const [] Xx, unsigned char [] Yx)\n"
+		"csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, \n"
+		"    short const [] Ax, short const [] Xx, short [] Yx)\n"
+		"csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, \n"
+		"    unsigned short const [] Ax, unsigned short const [] Xx, unsigned short [] Yx)\n"
+		"csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, \n"
+		"    int const [] Ax, int const [] Xx, int [] Yx)\n"
+		"csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, \n"
+		"    unsigned int const [] Ax, unsigned int const [] Xx, unsigned int [] Yx)\n"
+		"csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, \n"
+		"    long long const [] Ax, long long const [] Xx, long long [] Yx)\n"
+		"csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, \n"
+		"    unsigned long long const [] Ax, unsigned long long const [] Xx, unsigned long long [] Yx)\n"
+		"csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, \n"
+		"    float const [] Ax, float const [] Xx, float [] Yx)\n"
+		"csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, \n"
+		"    double const [] Ax, double const [] Xx, double [] Yx)\n"
+		"csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, \n"
+		"    long double const [] Ax, long double const [] Xx, long double [] Yx)\n"
+		"csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, \n"
+		"    npy_cfloat_wrapper const [] Ax, npy_cfloat_wrapper const [] Xx, npy_cfloat_wrapper [] Yx)\n"
+		"csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, \n"
+		"    npy_cdouble_wrapper const [] Ax, npy_cdouble_wrapper const [] Xx, npy_cdouble_wrapper [] Yx)\n"
+		"csc_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Ai, \n"
+		"    npy_clongdouble_wrapper const [] Ax, npy_clongdouble_wrapper const [] Xx, \n"
+		"    npy_clongdouble_wrapper [] Yx)\n"
 		""},
 	 { (char *)"csc_elmul_csc", _wrap_csc_elmul_csc, METH_VARARGS, (char *)"\n"
-		"csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, signed char Ax, \n"
-		"    int Bp, int Bi, signed char Bx, int Cp, int Ci, \n"
-		"    signed char Cx)\n"
-		"csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, unsigned char Ax, \n"
-		"    int Bp, int Bi, unsigned char Bx, int Cp, \n"
-		"    int Ci, unsigned char Cx)\n"
-		"csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, short Ax, int Bp, \n"
-		"    int Bi, short Bx, int Cp, int Ci, short Cx)\n"
-		"csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, unsigned short Ax, \n"
-		"    int Bp, int Bi, unsigned short Bx, int Cp, \n"
-		"    int Ci, unsigned short Cx)\n"
-		"csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp, \n"
-		"    int Bi, int Bx, int Cp, int Ci, int Cx)\n"
-		"csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, unsigned int Ax, \n"
-		"    int Bp, int Bi, unsigned int Bx, int Cp, \n"
-		"    int Ci, unsigned int Cx)\n"
-		"csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, long long Ax, \n"
-		"    int Bp, int Bi, long long Bx, int Cp, int Ci, \n"
-		"    long long Cx)\n"
-		"csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax, \n"
-		"    int Bp, int Bi, unsigned long long Bx, \n"
-		"    int Cp, int Ci, unsigned long long Cx)\n"
-		"csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp, \n"
-		"    int Bi, float Bx, int Cp, int Ci, float Cx)\n"
-		"csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, \n"
-		"    int Bi, double Bx, int Cp, int Ci, double Cx)\n"
-		"csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, long double Ax, \n"
-		"    int Bp, int Bi, long double Bx, int Cp, int Ci, \n"
-		"    long double Cx)\n"
-		"csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_cfloat_wrapper Bx, \n"
-		"    int Cp, int Ci, npy_cfloat_wrapper Cx)\n"
-		"csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_cdouble_wrapper Bx, \n"
-		"    int Cp, int Ci, npy_cdouble_wrapper Cx)\n"
-		"csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_clongdouble_wrapper Bx, \n"
-		"    int Cp, int Ci, npy_clongdouble_wrapper Cx)\n"
+		"csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, signed char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, signed char const [] Bx, int [] Cp, \n"
+		"    int [] Ci, signed char [] Cx)\n"
+		"csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned char const [] Bx, \n"
+		"    int [] Cp, int [] Ci, unsigned char [] Cx)\n"
+		"csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, short const [] Bx, int [] Cp, int [] Ci, \n"
+		"    short [] Cx)\n"
+		"csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned short const [] Bx, \n"
+		"    int [] Cp, int [] Ci, unsigned short [] Cx)\n"
+		"csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, int const [] Bx, int [] Cp, int [] Ci, \n"
+		"    int [] Cx)\n"
+		"csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned int const [] Bx, int [] Cp, \n"
+		"    int [] Ci, unsigned int [] Cx)\n"
+		"csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, long long const [] Bx, int [] Cp, \n"
+		"    int [] Ci, long long [] Cx)\n"
+		"csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned long long const [] Bx, \n"
+		"    int [] Cp, int [] Ci, unsigned long long [] Cx)\n"
+		"csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, float const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, float const [] Bx, int [] Cp, int [] Ci, \n"
+		"    float [] Cx)\n"
+		"csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, double const [] Bx, int [] Cp, int [] Ci, \n"
+		"    double [] Cx)\n"
+		"csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, long double const [] Bx, int [] Cp, \n"
+		"    int [] Ci, long double [] Cx)\n"
+		"csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cfloat_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, npy_cfloat_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Ci, npy_cfloat_wrapper [] Cx)\n"
+		"csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, npy_cdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Ci, npy_cdouble_wrapper [] Cx)\n"
+		"csc_elmul_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_clongdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, npy_clongdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Ci, npy_clongdouble_wrapper [] Cx)\n"
 		""},
 	 { (char *)"csc_eldiv_csc", _wrap_csc_eldiv_csc, METH_VARARGS, (char *)"\n"
-		"csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, signed char Ax, \n"
-		"    int Bp, int Bi, signed char Bx, int Cp, int Ci, \n"
-		"    signed char Cx)\n"
-		"csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, unsigned char Ax, \n"
-		"    int Bp, int Bi, unsigned char Bx, int Cp, \n"
-		"    int Ci, unsigned char Cx)\n"
-		"csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, short Ax, int Bp, \n"
-		"    int Bi, short Bx, int Cp, int Ci, short Cx)\n"
-		"csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, unsigned short Ax, \n"
-		"    int Bp, int Bi, unsigned short Bx, int Cp, \n"
-		"    int Ci, unsigned short Cx)\n"
-		"csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp, \n"
-		"    int Bi, int Bx, int Cp, int Ci, int Cx)\n"
-		"csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, unsigned int Ax, \n"
-		"    int Bp, int Bi, unsigned int Bx, int Cp, \n"
-		"    int Ci, unsigned int Cx)\n"
-		"csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, long long Ax, \n"
-		"    int Bp, int Bi, long long Bx, int Cp, int Ci, \n"
-		"    long long Cx)\n"
-		"csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax, \n"
-		"    int Bp, int Bi, unsigned long long Bx, \n"
-		"    int Cp, int Ci, unsigned long long Cx)\n"
-		"csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp, \n"
-		"    int Bi, float Bx, int Cp, int Ci, float Cx)\n"
-		"csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, \n"
-		"    int Bi, double Bx, int Cp, int Ci, double Cx)\n"
-		"csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, long double Ax, \n"
-		"    int Bp, int Bi, long double Bx, int Cp, int Ci, \n"
-		"    long double Cx)\n"
-		"csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_cfloat_wrapper Bx, \n"
-		"    int Cp, int Ci, npy_cfloat_wrapper Cx)\n"
-		"csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_cdouble_wrapper Bx, \n"
-		"    int Cp, int Ci, npy_cdouble_wrapper Cx)\n"
-		"csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_clongdouble_wrapper Bx, \n"
-		"    int Cp, int Ci, npy_clongdouble_wrapper Cx)\n"
+		"csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, signed char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, signed char const [] Bx, int [] Cp, \n"
+		"    int [] Ci, signed char [] Cx)\n"
+		"csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned char const [] Bx, \n"
+		"    int [] Cp, int [] Ci, unsigned char [] Cx)\n"
+		"csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, short const [] Bx, int [] Cp, int [] Ci, \n"
+		"    short [] Cx)\n"
+		"csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned short const [] Bx, \n"
+		"    int [] Cp, int [] Ci, unsigned short [] Cx)\n"
+		"csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, int const [] Bx, int [] Cp, int [] Ci, \n"
+		"    int [] Cx)\n"
+		"csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned int const [] Bx, int [] Cp, \n"
+		"    int [] Ci, unsigned int [] Cx)\n"
+		"csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, long long const [] Bx, int [] Cp, \n"
+		"    int [] Ci, long long [] Cx)\n"
+		"csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned long long const [] Bx, \n"
+		"    int [] Cp, int [] Ci, unsigned long long [] Cx)\n"
+		"csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, float const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, float const [] Bx, int [] Cp, int [] Ci, \n"
+		"    float [] Cx)\n"
+		"csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, double const [] Bx, int [] Cp, int [] Ci, \n"
+		"    double [] Cx)\n"
+		"csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, long double const [] Bx, int [] Cp, \n"
+		"    int [] Ci, long double [] Cx)\n"
+		"csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cfloat_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, npy_cfloat_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Ci, npy_cfloat_wrapper [] Cx)\n"
+		"csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, npy_cdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Ci, npy_cdouble_wrapper [] Cx)\n"
+		"csc_eldiv_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_clongdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, npy_clongdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Ci, npy_clongdouble_wrapper [] Cx)\n"
 		""},
 	 { (char *)"csc_plus_csc", _wrap_csc_plus_csc, METH_VARARGS, (char *)"\n"
-		"csc_plus_csc(int n_row, int n_col, int Ap, int Ai, signed char Ax, \n"
-		"    int Bp, int Bi, signed char Bx, int Cp, int Ci, \n"
-		"    signed char Cx)\n"
-		"csc_plus_csc(int n_row, int n_col, int Ap, int Ai, unsigned char Ax, \n"
-		"    int Bp, int Bi, unsigned char Bx, int Cp, \n"
-		"    int Ci, unsigned char Cx)\n"
-		"csc_plus_csc(int n_row, int n_col, int Ap, int Ai, short Ax, int Bp, \n"
-		"    int Bi, short Bx, int Cp, int Ci, short Cx)\n"
-		"csc_plus_csc(int n_row, int n_col, int Ap, int Ai, unsigned short Ax, \n"
-		"    int Bp, int Bi, unsigned short Bx, int Cp, \n"
-		"    int Ci, unsigned short Cx)\n"
-		"csc_plus_csc(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp, \n"
-		"    int Bi, int Bx, int Cp, int Ci, int Cx)\n"
-		"csc_plus_csc(int n_row, int n_col, int Ap, int Ai, unsigned int Ax, \n"
-		"    int Bp, int Bi, unsigned int Bx, int Cp, \n"
-		"    int Ci, unsigned int Cx)\n"
-		"csc_plus_csc(int n_row, int n_col, int Ap, int Ai, long long Ax, \n"
-		"    int Bp, int Bi, long long Bx, int Cp, int Ci, \n"
-		"    long long Cx)\n"
-		"csc_plus_csc(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax, \n"
-		"    int Bp, int Bi, unsigned long long Bx, \n"
-		"    int Cp, int Ci, unsigned long long Cx)\n"
-		"csc_plus_csc(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp, \n"
-		"    int Bi, float Bx, int Cp, int Ci, float Cx)\n"
-		"csc_plus_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, \n"
-		"    int Bi, double Bx, int Cp, int Ci, double Cx)\n"
-		"csc_plus_csc(int n_row, int n_col, int Ap, int Ai, long double Ax, \n"
-		"    int Bp, int Bi, long double Bx, int Cp, int Ci, \n"
-		"    long double Cx)\n"
-		"csc_plus_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_cfloat_wrapper Bx, \n"
-		"    int Cp, int Ci, npy_cfloat_wrapper Cx)\n"
-		"csc_plus_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_cdouble_wrapper Bx, \n"
-		"    int Cp, int Ci, npy_cdouble_wrapper Cx)\n"
-		"csc_plus_csc(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_clongdouble_wrapper Bx, \n"
-		"    int Cp, int Ci, npy_clongdouble_wrapper Cx)\n"
+		"csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, signed char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, signed char const [] Bx, int [] Cp, \n"
+		"    int [] Ci, signed char [] Cx)\n"
+		"csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned char const [] Bx, \n"
+		"    int [] Cp, int [] Ci, unsigned char [] Cx)\n"
+		"csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, short const [] Bx, int [] Cp, int [] Ci, \n"
+		"    short [] Cx)\n"
+		"csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned short const [] Bx, \n"
+		"    int [] Cp, int [] Ci, unsigned short [] Cx)\n"
+		"csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, int const [] Bx, int [] Cp, int [] Ci, \n"
+		"    int [] Cx)\n"
+		"csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned int const [] Bx, int [] Cp, \n"
+		"    int [] Ci, unsigned int [] Cx)\n"
+		"csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, long long const [] Bx, int [] Cp, \n"
+		"    int [] Ci, long long [] Cx)\n"
+		"csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned long long const [] Bx, \n"
+		"    int [] Cp, int [] Ci, unsigned long long [] Cx)\n"
+		"csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, float const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, float const [] Bx, int [] Cp, int [] Ci, \n"
+		"    float [] Cx)\n"
+		"csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, double const [] Bx, int [] Cp, int [] Ci, \n"
+		"    double [] Cx)\n"
+		"csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, long double const [] Bx, int [] Cp, \n"
+		"    int [] Ci, long double [] Cx)\n"
+		"csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cfloat_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, npy_cfloat_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Ci, npy_cfloat_wrapper [] Cx)\n"
+		"csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, npy_cdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Ci, npy_cdouble_wrapper [] Cx)\n"
+		"csc_plus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_clongdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, npy_clongdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Ci, npy_clongdouble_wrapper [] Cx)\n"
 		""},
 	 { (char *)"csc_minus_csc", _wrap_csc_minus_csc, METH_VARARGS, (char *)"\n"
-		"csc_minus_csc(int n_row, int n_col, int Ap, int Ai, signed char Ax, \n"
-		"    int Bp, int Bi, signed char Bx, int Cp, int Ci, \n"
-		"    signed char Cx)\n"
-		"csc_minus_csc(int n_row, int n_col, int Ap, int Ai, unsigned char Ax, \n"
-		"    int Bp, int Bi, unsigned char Bx, int Cp, \n"
-		"    int Ci, unsigned char Cx)\n"
-		"csc_minus_csc(int n_row, int n_col, int Ap, int Ai, short Ax, int Bp, \n"
-		"    int Bi, short Bx, int Cp, int Ci, short Cx)\n"
-		"csc_minus_csc(int n_row, int n_col, int Ap, int Ai, unsigned short Ax, \n"
-		"    int Bp, int Bi, unsigned short Bx, int Cp, \n"
-		"    int Ci, unsigned short Cx)\n"
-		"csc_minus_csc(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp, \n"
-		"    int Bi, int Bx, int Cp, int Ci, int Cx)\n"
-		"csc_minus_csc(int n_row, int n_col, int Ap, int Ai, unsigned int Ax, \n"
-		"    int Bp, int Bi, unsigned int Bx, int Cp, \n"
-		"    int Ci, unsigned int Cx)\n"
-		"csc_minus_csc(int n_row, int n_col, int Ap, int Ai, long long Ax, \n"
-		"    int Bp, int Bi, long long Bx, int Cp, int Ci, \n"
-		"    long long Cx)\n"
-		"csc_minus_csc(int n_row, int n_col, int Ap, int Ai, unsigned long long Ax, \n"
-		"    int Bp, int Bi, unsigned long long Bx, \n"
-		"    int Cp, int Ci, unsigned long long Cx)\n"
-		"csc_minus_csc(int n_row, int n_col, int Ap, int Ai, float Ax, int Bp, \n"
-		"    int Bi, float Bx, int Cp, int Ci, float Cx)\n"
-		"csc_minus_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, \n"
-		"    int Bi, double Bx, int Cp, int Ci, double Cx)\n"
-		"csc_minus_csc(int n_row, int n_col, int Ap, int Ai, long double Ax, \n"
-		"    int Bp, int Bi, long double Bx, int Cp, int Ci, \n"
-		"    long double Cx)\n"
-		"csc_minus_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_cfloat_wrapper Bx, \n"
-		"    int Cp, int Ci, npy_cfloat_wrapper Cx)\n"
-		"csc_minus_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_cdouble_wrapper Bx, \n"
-		"    int Cp, int Ci, npy_cdouble_wrapper Cx)\n"
-		"csc_minus_csc(int n_row, int n_col, int Ap, int Ai, npy_clongdouble_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_clongdouble_wrapper Bx, \n"
-		"    int Cp, int Ci, npy_clongdouble_wrapper Cx)\n"
+		"csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, signed char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, signed char const [] Bx, int [] Cp, \n"
+		"    int [] Ci, signed char [] Cx)\n"
+		"csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned char const [] Bx, \n"
+		"    int [] Cp, int [] Ci, unsigned char [] Cx)\n"
+		"csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, short const [] Bx, int [] Cp, int [] Ci, \n"
+		"    short [] Cx)\n"
+		"csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned short const [] Bx, \n"
+		"    int [] Cp, int [] Ci, unsigned short [] Cx)\n"
+		"csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, int const [] Bx, int [] Cp, int [] Ci, \n"
+		"    int [] Cx)\n"
+		"csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned int const [] Bx, int [] Cp, \n"
+		"    int [] Ci, unsigned int [] Cx)\n"
+		"csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, long long const [] Bx, int [] Cp, \n"
+		"    int [] Ci, long long [] Cx)\n"
+		"csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, unsigned long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, unsigned long long const [] Bx, \n"
+		"    int [] Cp, int [] Ci, unsigned long long [] Cx)\n"
+		"csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, float const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, float const [] Bx, int [] Cp, int [] Ci, \n"
+		"    float [] Cx)\n"
+		"csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, double const [] Bx, int [] Cp, int [] Ci, \n"
+		"    double [] Cx)\n"
+		"csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, long double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, long double const [] Bx, int [] Cp, \n"
+		"    int [] Ci, long double [] Cx)\n"
+		"csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cfloat_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, npy_cfloat_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Ci, npy_cfloat_wrapper [] Cx)\n"
+		"csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_cdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, npy_cdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Ci, npy_cdouble_wrapper [] Cx)\n"
+		"csc_minus_csc(int const n_row, int const n_col, int const [] Ap, int const [] Ai, npy_clongdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bi, npy_clongdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Ci, npy_clongdouble_wrapper [] Cx)\n"
 		""},
 	 { NULL, NULL, 0, NULL }
 };
@@ -32131,24 +32385,23 @@ extern "C" {
   swig_varlink_type(void) {
     static char varlink__doc__[] = "Swig var link object";
     static PyTypeObject varlink_type;
-    static int type_init = 0;  
+    static int type_init = 0;
     if (!type_init) {
-      const PyTypeObject tmp
-      = {
+      const PyTypeObject tmp = {
         /* PyObject header changed in Python 3 */
 #if PY_VERSION_HEX >= 0x03000000
-        PyVarObject_HEAD_INIT(&PyType_Type, 0)
+        PyVarObject_HEAD_INIT(NULL, 0)
 #else
         PyObject_HEAD_INIT(NULL)
-        0,                                  /* Number of items in variable part (ob_size) */
+        0,                                  /* ob_size */
 #endif
-        (char *)"swigvarlink",              /* Type name (tp_name) */
-        sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
-        0,                                  /* Itemsize (tp_itemsize) */
-        (destructor) swig_varlink_dealloc,  /* Deallocator (tp_dealloc) */ 
-        (printfunc) swig_varlink_print,     /* Print (tp_print) */
-        (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
-        (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
+        (char *)"swigvarlink",              /* tp_name */
+        sizeof(swig_varlinkobject),         /* tp_basicsize */
+        0,                                  /* tp_itemsize */
+        (destructor) swig_varlink_dealloc,  /* tp_dealloc */
+        (printfunc) swig_varlink_print,     /* tp_print */
+        (getattrfunc) swig_varlink_getattr, /* tp_getattr */
+        (setattrfunc) swig_varlink_setattr, /* tp_setattr */
         0,                                  /* tp_compare */
         (reprfunc) swig_varlink_repr,       /* tp_repr */
         0,                                  /* tp_as_number */
@@ -32172,16 +32425,21 @@ extern "C" {
 #if PY_VERSION_HEX >= 0x02030000
         0,                                  /* tp_del */
 #endif
+#if PY_VERSION_HEX >= 0x02060000
+        0,                                  /* tp_version */
+#endif
 #ifdef COUNT_ALLOCS
         0,0,0,0                             /* tp_alloc -> tp_next */
 #endif
       };
       varlink_type = tmp;
-      /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
-#if PY_VERSION_HEX < 0x03000000
+      type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
       varlink_type.ob_type = &PyType_Type;
+#else
+      if (PyType_Ready(&varlink_type) < 0)
+      return NULL;
 #endif
-      type_init = 1;
     }
     return &varlink_type;
   }
@@ -32232,7 +32490,7 @@ extern "C" {
     for (i = 0; constants[i].type; ++i) {
       switch(constants[i].type) {
       case SWIG_PY_POINTER:
-        obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
+        obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
         break;
       case SWIG_PY_BINARY:
         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
@@ -32313,10 +32571,19 @@ PyObject*
 void
 #endif
 SWIG_init(void) {
-  PyObject *m, *d;  
+  PyObject *m, *d, *md;
 #if PY_VERSION_HEX >= 0x03000000
   static struct PyModuleDef SWIG_module = {
+# if PY_VERSION_HEX >= 0x03020000
     PyModuleDef_HEAD_INIT,
+# else
+    {
+      PyObject_HEAD_INIT(NULL)
+      NULL, /* m_init */
+      0,    /* m_index */
+      NULL, /* m_copy */
+    },
+# endif
     (char *) SWIG_name,
     NULL,
     -1,
@@ -32328,6 +32595,49 @@ SWIG_init(void) {
   };
 #endif
   
+#if defined(SWIGPYTHON_BUILTIN)
+  static SwigPyClientData SwigPyObject_clientdata = {
+    0, 0, 0, 0, 0, 0, 0
+  };
+  static PyGetSetDef this_getset_def = {
+    (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
+  };
+  static SwigPyGetSet thisown_getset_closure = {
+    (PyCFunction) SwigPyObject_own,
+    (PyCFunction) SwigPyObject_own
+  };
+  static PyGetSetDef thisown_getset_def = {
+    (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
+  };
+  PyObject *metatype_args;
+  PyTypeObject *builtin_pytype;
+  int builtin_base_count;
+  swig_type_info *builtin_basetype;
+  PyObject *tuple;
+  PyGetSetDescrObject *static_getset;
+  PyTypeObject *metatype;
+  SwigPyClientData *cd;
+  PyObject *public_interface, *public_symbol;
+  PyObject *this_descr;
+  PyObject *thisown_descr;
+  int i;
+  
+  (void)builtin_pytype;
+  (void)builtin_base_count;
+  (void)builtin_basetype;
+  (void)tuple;
+  (void)static_getset;
+  
+  /* metatype is used to implement static member variables. */
+  metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
+  assert(metatype_args);
+  metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
+  assert(metatype);
+  Py_DECREF(metatype_args);
+  metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
+  assert(PyType_Ready(metatype) >= 0);
+#endif
+  
   /* Fix SwigMethods to carry the callback ptrs when needed */
   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
   
@@ -32336,11 +32646,47 @@ SWIG_init(void) {
 #else
   m = Py_InitModule((char *) SWIG_name, SwigMethods);
 #endif
-  d = PyModule_GetDict(m);
+  md = d = PyModule_GetDict(m);
   
   SWIG_InitializeModule(0);
-  SWIG_InstallConstants(d,swig_const_table);
   
+#ifdef SWIGPYTHON_BUILTIN
+  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
+  assert(SwigPyObject_stype);
+  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
+  if (!cd) {
+    SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
+    SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
+  } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
+    PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
+# if PY_VERSION_HEX >= 0x03000000
+    return NULL;
+# else
+    return;
+# endif
+  }
+  
+  /* All objects have a 'this' attribute */
+  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
+  (void)this_descr;
+  
+  /* All objects have a 'thisown' attribute */
+  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
+  (void)thisown_descr;
+  
+  public_interface = PyList_New(0);
+  public_symbol = 0;
+  (void)public_symbol;
+  
+  PyDict_SetItemString(md, "__all__", public_interface);
+  Py_DECREF(public_interface);
+  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
+  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
+  for (i = 0; swig_const_table[i].name != 0; ++i)
+  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
+#endif
+  
+  SWIG_InstallConstants(d,swig_const_table);
   
   
   import_array();
diff --git a/scipy/sparse/sparsetools/csgraph.py b/scipy/sparse/sparsetools/csgraph.py
index d4ce5db..1805577 100644
--- a/scipy/sparse/sparsetools/csgraph.py
+++ b/scipy/sparse/sparsetools/csgraph.py
@@ -1,9 +1,10 @@
 # This file was automatically generated by SWIG (http://www.swig.org).
-# Version 2.0.1+capsulehack
+# Version 2.0.7
 #
 # Do not make changes to this file unless you know what you are doing--modify
 # the SWIG interface file instead.
-# This file is compatible with both classic and new-style classes.
+
+
 
 from sys import version_info
 if version_info >= (2,6,0):
@@ -39,7 +40,7 @@ def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
             return
     method = class_type.__swig_setmethods__.get(name,None)
     if method: return method(self,value)
-    if (not static) or hasattr(self,name):
+    if (not static):
         self.__dict__[name] = value
     else:
         raise AttributeError("You cannot add attributes to %s" % self)
@@ -68,5 +69,8 @@ except AttributeError:
 
 
 def cs_graph_components(*args):
-    """cs_graph_components(int n_nod, int Ap, int Aj, int flag) -> int"""
-    return _csgraph.cs_graph_components(*args)
+  """cs_graph_components(int const n_nod, int const [] Ap, int const [] Aj, int [] flag) -> int"""
+  return _csgraph.cs_graph_components(*args)
+# This file is compatible with both classic and new-style classes.
+
+
diff --git a/scipy/sparse/sparsetools/csgraph_wrap.cxx b/scipy/sparse/sparsetools/csgraph_wrap.cxx
index bc9d517..d31e2db 100644
--- a/scipy/sparse/sparsetools/csgraph_wrap.cxx
+++ b/scipy/sparse/sparsetools/csgraph_wrap.cxx
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.1+capsulehack
+ * Version 2.0.7
  * 
  * This file is not intended to be easily readable and contains a number of 
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -756,7 +756,16 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
 #define PyInt_Check(x) PyLong_Check(x)
 #define PyInt_AsLong(x) PyLong_AsLong(x)
 #define PyInt_FromLong(x) PyLong_FromLong(x)
+#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
+#define PyString_Check(name) PyBytes_Check(name)
+#define PyString_FromString(x) PyUnicode_FromString(x)
 #define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
+#define PyString_AsString(str) PyBytes_AsString(str)
+#define PyString_Size(str) PyBytes_Size(str)	
+#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
+#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
+#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
+#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
 
 #endif
 
@@ -896,6 +905,63 @@ PyObject *PyBool_FromLong(long ok)
 typedef int Py_ssize_t;
 # define PY_SSIZE_T_MAX INT_MAX
 # define PY_SSIZE_T_MIN INT_MIN
+typedef inquiry lenfunc;
+typedef intargfunc ssizeargfunc;
+typedef intintargfunc ssizessizeargfunc;
+typedef intobjargproc ssizeobjargproc;
+typedef intintobjargproc ssizessizeobjargproc;
+typedef getreadbufferproc readbufferproc;
+typedef getwritebufferproc writebufferproc;
+typedef getsegcountproc segcountproc;
+typedef getcharbufferproc charbufferproc;
+static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
+{
+  long result = 0;
+  PyObject *i = PyNumber_Int(x);
+  if (i) {
+    result = PyInt_AsLong(i);
+    Py_DECREF(i);
+  }
+  return result;
+}
+#endif
+
+#if PY_VERSION_HEX < 0x02040000
+#define Py_VISIT(op)				\
+  do { 						\
+    if (op) {					\
+      int vret = visit((op), arg);		\
+      if (vret)					\
+        return vret;				\
+    }						\
+  } while (0)
+#endif
+
+#if PY_VERSION_HEX < 0x02030000
+typedef struct {
+  PyTypeObject type;
+  PyNumberMethods as_number;
+  PyMappingMethods as_mapping;
+  PySequenceMethods as_sequence;
+  PyBufferProcs as_buffer;
+  PyObject *name, *slots;
+} PyHeapTypeObject;
+#endif
+
+#if PY_VERSION_HEX < 0x02030000
+typedef destructor freefunc;
+#endif
+
+#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
+     (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
+     (PY_MAJOR_VERSION > 3))
+# define SWIGPY_USE_CAPSULE
+# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
+#endif
+
+#if PY_VERSION_HEX < 0x03020000
+#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
+#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
 #endif
 
 /* -----------------------------------------------------------------------------
@@ -1042,9 +1108,6 @@ SWIG_Python_AddErrorMsg(const char* mesg)
 
 #ifdef __cplusplus
 extern "C" {
-#if 0
-} /* cc-mode */
-#endif
 #endif
 
 /* -----------------------------------------------------------------------------
@@ -1070,19 +1133,19 @@ typedef struct swig_const_info {
  * Wrapper of PyInstanceMethod_New() used in Python 3
  * It is exported to the generated module, used for -fastproxy
  * ----------------------------------------------------------------------------- */
-SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
-{
 #if PY_VERSION_HEX >= 0x03000000
+SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
+{
   return PyInstanceMethod_New(func);
+}
 #else
+SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
+{
   return NULL;
-#endif
 }
+#endif
 
 #ifdef __cplusplus
-#if 0
-{ /* cc-mode */
-#endif
 }
 #endif
 
@@ -1102,7 +1165,15 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
 #define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
-#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(ptr, type, flags)
+
+#ifdef SWIGPYTHON_BUILTIN
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
+#else
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
+#endif
+
+#define SWIG_InternalNewPointerObj(ptr, type, flags)	SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
+
 #define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
 #define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
 #define swig_owntype                                    int
@@ -1117,7 +1188,7 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
 
 /* for C or C++ function pointers */
 #define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
-#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(ptr, type, 0)
+#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
 
 /* for C++ member pointers, ie, member methods */
 #define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
@@ -1134,18 +1205,8 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
 #define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
 #define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
 #define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
-#define SWIG_fail                        		goto fail				
+#define SWIG_fail                        		goto fail					   
 
-/*
- * Python 2.7 and newer and Python 3.1 and newer should use Capsules API instead of
- * CObjects API.
- */
-#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
-     (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0))
-#define USE_CAPSULES
-#define TYPE_POINTER_NAME \
-    ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
-#endif
 
 /* Runtime API implementation */
 
@@ -1162,7 +1223,7 @@ SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
 SWIGINTERN void 
 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
   SWIG_PYTHON_THREAD_BEGIN_BLOCK;
-  PyErr_SetString(errtype, (char *) msg);
+  PyErr_SetString(errtype, msg);
   SWIG_PYTHON_THREAD_END_BLOCK;
 }
 
@@ -1170,12 +1231,41 @@ SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
 
 /* Set a constant value */
 
+#if defined(SWIGPYTHON_BUILTIN)
+
+SWIGINTERN void
+SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
+  PyObject *s = PyString_InternFromString(key);
+  PyList_Append(seq, s);
+  Py_DECREF(s);
+}
+
+SWIGINTERN void
+SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
+#if PY_VERSION_HEX < 0x02030000
+  PyDict_SetItemString(d, (char *)name, obj);
+#else
+  PyDict_SetItemString(d, name, obj);
+#endif
+  Py_DECREF(obj);
+  if (public_interface)
+    SwigPyBuiltin_AddPublicSymbol(public_interface, name);
+}
+
+#else
+
 SWIGINTERN void
 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
-  PyDict_SetItemString(d, (char*) name, obj);
+#if PY_VERSION_HEX < 0x02030000
+  PyDict_SetItemString(d, (char *)name, obj);
+#else
+  PyDict_SetItemString(d, name, obj);
+#endif
   Py_DECREF(obj);                            
 }
 
+#endif
+
 /* Append a value to the result obj */
 
 SWIGINTERN PyObject*
@@ -1236,6 +1326,14 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
     }
   }  
   if (!PyTuple_Check(args)) {
+    if (min <= 1 && max >= 1) {
+      register int i;
+      objs[0] = args;
+      for (i = 1; i < max; ++i) {
+	objs[i] = 0;
+      }
+      return 2;
+    }
     PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
     return 0;
   } else {
@@ -1288,11 +1386,11 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
 
 #define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
 
+#define SWIG_BUILTIN_TP_INIT	    (SWIG_POINTER_OWN << 2)
+#define SWIG_BUILTIN_INIT	    (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
+
 #ifdef __cplusplus
 extern "C" {
-#if 0
-} /* cc-mode */
-#endif
 #endif
 
 /*  How to access Py_None */
@@ -1343,6 +1441,7 @@ typedef struct {
   PyObject *destroy;
   int delargs;
   int implicitconv;
+  PyTypeObject *pytype;
 } SwigPyClientData;
 
 SWIGRUNTIMEINLINE int 
@@ -1409,13 +1508,13 @@ SwigPyClientData_New(PyObject* obj)
       data->delargs = 0;
     }
     data->implicitconv = 0;
+    data->pytype = 0;
     return data;
   }
 }
 
 SWIGRUNTIME void 
-SwigPyClientData_Del(SwigPyClientData* data)
-{
+SwigPyClientData_Del(SwigPyClientData *data) {
   Py_XDECREF(data->newraw);
   Py_XDECREF(data->newargs);
   Py_XDECREF(data->destroy);
@@ -1429,6 +1528,9 @@ typedef struct {
   swig_type_info *ty;
   int own;
   PyObject *next;
+#ifdef SWIGPYTHON_BUILTIN
+  PyObject *dict;
+#endif
 } SwigPyObject;
 
 SWIGRUNTIME PyObject *
@@ -1479,21 +1581,21 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
 #endif
 {
   const char *name = SWIG_TypePrettyName(v->ty);
-  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v);
+  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
   if (v->next) {
-#ifdef METH_NOARGS
+# ifdef METH_NOARGS
     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
-#else
+# else
     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
-#endif
-#if PY_VERSION_HEX >= 0x03000000
+# endif
+# if PY_VERSION_HEX >= 0x03000000
     PyObject *joined = PyUnicode_Concat(repr, nrep);
     Py_DecRef(repr);
     Py_DecRef(nrep);
     repr = joined;
-#else
+# else
     PyString_ConcatAndDel(&repr,nrep);
-#endif
+# endif
   }
   return repr;  
 }
@@ -1543,27 +1645,43 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
     Py_INCREF(Py_NotImplemented);
     return Py_NotImplemented;
   }
-  if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) )
-    res = Py_True;
-  else
-    res = Py_False;
-  Py_INCREF(res);
+  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
   return res;  
 }
 
 
-SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
+SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
 
+#ifdef SWIGPYTHON_BUILTIN
+static swig_type_info *SwigPyObject_stype = 0;
 SWIGRUNTIME PyTypeObject*
 SwigPyObject_type(void) {
-  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
+    SwigPyClientData *cd;
+    assert(SwigPyObject_stype);
+    cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
+    assert(cd);
+    assert(cd->pytype);
+    return cd->pytype;
+}
+#else
+SWIGRUNTIME PyTypeObject*
+SwigPyObject_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
   return type;
 }
+#endif
 
 SWIGRUNTIMEINLINE int
 SwigPyObject_Check(PyObject *op) {
+#ifdef SWIGPYTHON_BUILTIN
+  PyTypeObject *target_tp = SwigPyObject_type();
+  if (PyType_IsSubtype(op->ob_type, target_tp))
+    return 1;
+  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
+#else
   return (Py_TYPE(op) == SwigPyObject_type())
     || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
+#endif
 }
 
 SWIGRUNTIME PyObject *
@@ -1667,8 +1785,10 @@ SwigPyObject_own(PyObject *v, PyObject *args)
   PyObject *val = 0;
 #if (PY_VERSION_HEX < 0x02020000)
   if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
-#else
+#elif (PY_VERSION_HEX < 0x02050000)
   if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
+#else
+  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) 
 #endif
     {
       return NULL;
@@ -1729,9 +1849,9 @@ SwigPyObject_getattr(SwigPyObject *sobj,char *name)
 #endif
 
 SWIGRUNTIME PyTypeObject*
-_PySwigObject_type(void) {
+SwigPyObject_TypeOnce(void) {
   static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
-  
+
   static PyNumberMethods SwigPyObject_as_number = {
     (binaryfunc)0, /*nb_add*/
     (binaryfunc)0, /*nb_subtract*/
@@ -1778,85 +1898,89 @@ _PySwigObject_type(void) {
 #endif
   };
 
-  static PyTypeObject swigpyobject_type;  
+  static PyTypeObject swigpyobject_type;
   static int type_init = 0;
   if (!type_init) {
-    const PyTypeObject tmp
-      = {
-	/* PyObject header changed in Python 3 */
+    const PyTypeObject tmp = {
+      /* PyObject header changed in Python 3 */
 #if PY_VERSION_HEX >= 0x03000000
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-#else    
-	PyObject_HEAD_INIT(NULL)
-	0,				    /* ob_size */
-#endif
-	(char *)"SwigPyObject",		    /* tp_name */
-	sizeof(SwigPyObject),		    /* tp_basicsize */
-	0,			            /* tp_itemsize */
-	(destructor)SwigPyObject_dealloc,   /* tp_dealloc */
-	(printfunc)SwigPyObject_print,	    /* tp_print */
+      PyVarObject_HEAD_INIT(NULL, 0)
+#else
+      PyObject_HEAD_INIT(NULL)
+      0,                                    /* ob_size */
+#endif
+      (char *)"SwigPyObject",               /* tp_name */
+      sizeof(SwigPyObject),                 /* tp_basicsize */
+      0,                                    /* tp_itemsize */
+      (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
+      (printfunc)SwigPyObject_print,        /* tp_print */
 #if PY_VERSION_HEX < 0x02020000
-	(getattrfunc)SwigPyObject_getattr,  /* tp_getattr */ 
+      (getattrfunc)SwigPyObject_getattr,    /* tp_getattr */
 #else
-	(getattrfunc)0,			    /* tp_getattr */ 
+      (getattrfunc)0,                       /* tp_getattr */
 #endif
-	(setattrfunc)0,			    /* tp_setattr */ 
+      (setattrfunc)0,                       /* tp_setattr */
 #if PY_VERSION_HEX >= 0x03000000
     0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
 #else
-	(cmpfunc)SwigPyObject_compare,	    /* tp_compare */
-#endif
-	(reprfunc)SwigPyObject_repr,	    /* tp_repr */    
-	&SwigPyObject_as_number,	    /* tp_as_number */
-	0,				    /* tp_as_sequence */
-	0,				    /* tp_as_mapping */
-	(hashfunc)0,			    /* tp_hash */
-	(ternaryfunc)0,			    /* tp_call */
-	(reprfunc)SwigPyObject_str,	    /* tp_str */
-	PyObject_GenericGetAttr,            /* tp_getattro */
-	0,				    /* tp_setattro */
-	0,		                    /* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
-	swigobject_doc, 	            /* tp_doc */        
-	0,                                  /* tp_traverse */
-	0,                                  /* tp_clear */
-	(richcmpfunc)SwigPyObject_richcompare,           /* tp_richcompare */
-	0,                                  /* tp_weaklistoffset */
+      (cmpfunc)SwigPyObject_compare,        /* tp_compare */
+#endif
+      (reprfunc)SwigPyObject_repr,          /* tp_repr */
+      &SwigPyObject_as_number,              /* tp_as_number */
+      0,                                    /* tp_as_sequence */
+      0,                                    /* tp_as_mapping */
+      (hashfunc)0,                          /* tp_hash */
+      (ternaryfunc)0,                       /* tp_call */
+      (reprfunc)SwigPyObject_str,           /* tp_str */
+      PyObject_GenericGetAttr,              /* tp_getattro */
+      0,                                    /* tp_setattro */
+      0,                                    /* tp_as_buffer */
+      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
+      swigobject_doc,                       /* tp_doc */
+      0,                                    /* tp_traverse */
+      0,                                    /* tp_clear */
+      (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
+      0,                                    /* tp_weaklistoffset */
 #if PY_VERSION_HEX >= 0x02020000
-	0,                                  /* tp_iter */
-	0,                                  /* tp_iternext */
-	swigobject_methods,		    /* tp_methods */ 
-	0,			            /* tp_members */
-	0,				    /* tp_getset */	    	
-	0,			            /* tp_base */	        
-	0,				    /* tp_dict */	    	
-	0,				    /* tp_descr_get */  	
-	0,				    /* tp_descr_set */  	
-	0,				    /* tp_dictoffset */ 	
-	0,				    /* tp_init */	    	
-	0,				    /* tp_alloc */	    	
-	0,			            /* tp_new */	    	
-	0,	                            /* tp_free */	   
-	0,                                  /* tp_is_gc */  
-	0,				    /* tp_bases */   
-	0,				    /* tp_mro */
-	0,				    /* tp_cache */   
-	0,				    /* tp_subclasses */
-	0,				    /* tp_weaklist */
+      0,                                    /* tp_iter */
+      0,                                    /* tp_iternext */
+      swigobject_methods,                   /* tp_methods */
+      0,                                    /* tp_members */
+      0,                                    /* tp_getset */
+      0,                                    /* tp_base */
+      0,                                    /* tp_dict */
+      0,                                    /* tp_descr_get */
+      0,                                    /* tp_descr_set */
+      0,                                    /* tp_dictoffset */
+      0,                                    /* tp_init */
+      0,                                    /* tp_alloc */
+      0,                                    /* tp_new */
+      0,                                    /* tp_free */
+      0,                                    /* tp_is_gc */
+      0,                                    /* tp_bases */
+      0,                                    /* tp_mro */
+      0,                                    /* tp_cache */
+      0,                                    /* tp_subclasses */
+      0,                                    /* tp_weaklist */
 #endif
 #if PY_VERSION_HEX >= 0x02030000
-	0,                                  /* tp_del */
+      0,                                    /* tp_del */
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+      0,                                    /* tp_version */
 #endif
 #ifdef COUNT_ALLOCS
-	0,0,0,0                             /* tp_alloc -> tp_next */
+      0,0,0,0                               /* tp_alloc -> tp_next */
 #endif
-      };
+    };
     swigpyobject_type = tmp;
-    /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
-#if PY_VERSION_HEX < 0x03000000
+    type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
     swigpyobject_type.ob_type = &PyType_Type;
+#else
+    if (PyType_Ready(&swigpyobject_type) < 0)
+      return NULL;
 #endif
-    type_init = 1;
   }
   return &swigpyobject_type;
 }
@@ -1930,17 +2054,17 @@ SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
   return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
 }
 
-SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
+SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
 
 SWIGRUNTIME PyTypeObject*
 SwigPyPacked_type(void) {
-  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
   return type;
 }
 
 SWIGRUNTIMEINLINE int
 SwigPyPacked_Check(PyObject *op) {
-  return ((op)->ob_type == _PySwigPacked_type()) 
+  return ((op)->ob_type == SwigPyPacked_TypeOnce()) 
     || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
 }
 
@@ -1955,83 +2079,87 @@ SwigPyPacked_dealloc(PyObject *v)
 }
 
 SWIGRUNTIME PyTypeObject*
-_PySwigPacked_type(void) {
+SwigPyPacked_TypeOnce(void) {
   static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
   static PyTypeObject swigpypacked_type;
-  static int type_init = 0;  
+  static int type_init = 0;
   if (!type_init) {
-    const PyTypeObject tmp
-      = {
-    /* PyObject header changed in Python 3 */
+    const PyTypeObject tmp = {
+      /* PyObject header changed in Python 3 */
 #if PY_VERSION_HEX>=0x03000000
-    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+      PyVarObject_HEAD_INIT(NULL, 0)
 #else
-	PyObject_HEAD_INIT(NULL)
-    0,				    /* ob_size */	
-#endif
-	(char *)"SwigPyPacked",		    /* tp_name */	
-	sizeof(SwigPyPacked),		    /* tp_basicsize */	
-	0,				    /* tp_itemsize */	
-	(destructor)SwigPyPacked_dealloc,   /* tp_dealloc */	
-	(printfunc)SwigPyPacked_print,	    /* tp_print */   	
-	(getattrfunc)0,			    /* tp_getattr */ 	
-	(setattrfunc)0,			    /* tp_setattr */ 	
+      PyObject_HEAD_INIT(NULL)
+      0,                                    /* ob_size */
+#endif
+      (char *)"SwigPyPacked",               /* tp_name */
+      sizeof(SwigPyPacked),                 /* tp_basicsize */
+      0,                                    /* tp_itemsize */
+      (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
+      (printfunc)SwigPyPacked_print,        /* tp_print */
+      (getattrfunc)0,                       /* tp_getattr */
+      (setattrfunc)0,                       /* tp_setattr */
 #if PY_VERSION_HEX>=0x03000000
-    0, /* tp_reserved in 3.0.1 */
+      0, /* tp_reserved in 3.0.1 */
 #else
-    (cmpfunc)SwigPyPacked_compare,	    /* tp_compare */
-#endif
-	(reprfunc)SwigPyPacked_repr,	    /* tp_repr */
-	0,	                            /* tp_as_number */
-	0,				    /* tp_as_sequence */
-	0,				    /* tp_as_mapping */
-	(hashfunc)0,			    /* tp_hash */
-	(ternaryfunc)0,			    /* tp_call */
-	(reprfunc)SwigPyPacked_str,	    /* tp_str */
-	PyObject_GenericGetAttr,            /* tp_getattro */
-	0,				    /* tp_setattro */
-	0,		                    /* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
-	swigpacked_doc, 	            /* tp_doc */
-	0,                                  /* tp_traverse */
-	0,                                  /* tp_clear */
-	0,                                  /* tp_richcompare */
-	0,                                  /* tp_weaklistoffset */
+      (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
+#endif
+      (reprfunc)SwigPyPacked_repr,          /* tp_repr */
+      0,                                    /* tp_as_number */
+      0,                                    /* tp_as_sequence */
+      0,                                    /* tp_as_mapping */
+      (hashfunc)0,                          /* tp_hash */
+      (ternaryfunc)0,                       /* tp_call */
+      (reprfunc)SwigPyPacked_str,           /* tp_str */
+      PyObject_GenericGetAttr,              /* tp_getattro */
+      0,                                    /* tp_setattro */
+      0,                                    /* tp_as_buffer */
+      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
+      swigpacked_doc,                       /* tp_doc */
+      0,                                    /* tp_traverse */
+      0,                                    /* tp_clear */
+      0,                                    /* tp_richcompare */
+      0,                                    /* tp_weaklistoffset */
 #if PY_VERSION_HEX >= 0x02020000
-	0,                                  /* tp_iter */
-	0,                                  /* tp_iternext */
-	0,		                    /* tp_methods */ 
-	0,			            /* tp_members */
-	0,				    /* tp_getset */	    	
-	0,			            /* tp_base */	        
-	0,				    /* tp_dict */	    	
-	0,				    /* tp_descr_get */  	
-	0,				    /* tp_descr_set */  	
-	0,				    /* tp_dictoffset */ 	
-	0,				    /* tp_init */	    	
-	0,				    /* tp_alloc */	    	
-	0,			            /* tp_new */	    	
-	0, 	                            /* tp_free */	   
-        0,                                  /* tp_is_gc */  
-	0,				    /* tp_bases */   
-	0,				    /* tp_mro */
-	0,				    /* tp_cache */   
- 	0,				    /* tp_subclasses */
-	0,				    /* tp_weaklist */
+      0,                                    /* tp_iter */
+      0,                                    /* tp_iternext */
+      0,                                    /* tp_methods */
+      0,                                    /* tp_members */
+      0,                                    /* tp_getset */
+      0,                                    /* tp_base */
+      0,                                    /* tp_dict */
+      0,                                    /* tp_descr_get */
+      0,                                    /* tp_descr_set */
+      0,                                    /* tp_dictoffset */
+      0,                                    /* tp_init */
+      0,                                    /* tp_alloc */
+      0,                                    /* tp_new */
+      0,                                    /* tp_free */
+      0,                                    /* tp_is_gc */
+      0,                                    /* tp_bases */
+      0,                                    /* tp_mro */
+      0,                                    /* tp_cache */
+      0,                                    /* tp_subclasses */
+      0,                                    /* tp_weaklist */
 #endif
 #if PY_VERSION_HEX >= 0x02030000
-	0,                                  /* tp_del */
+      0,                                    /* tp_del */
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+      0,                                    /* tp_version */
 #endif
 #ifdef COUNT_ALLOCS
-	0,0,0,0                             /* tp_alloc -> tp_next */
+      0,0,0,0                               /* tp_alloc -> tp_next */
 #endif
-      };
+    };
     swigpypacked_type = tmp;
-    /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */
-#if PY_VERSION_HEX < 0x03000000
+    type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
     swigpypacked_type.ob_type = &PyType_Type;
+#else
+    if (PyType_Ready(&swigpypacked_type) < 0)
+      return NULL;
 #endif
-    type_init = 1;
   }
   return &swigpypacked_type;
 }
@@ -2098,50 +2226,65 @@ SWIG_This(void)
 SWIGRUNTIME SwigPyObject *
 SWIG_Python_GetSwigThis(PyObject *pyobj) 
 {
-  if (SwigPyObject_Check(pyobj)) {
+  PyObject *obj;
+
+  if (SwigPyObject_Check(pyobj))
     return (SwigPyObject *) pyobj;
-  } else {
-    PyObject *obj = 0;
+
+#ifdef SWIGPYTHON_BUILTIN
+  (void)obj;
+# ifdef PyWeakref_CheckProxy
+  if (PyWeakref_CheckProxy(pyobj)) {
+    pyobj = PyWeakref_GET_OBJECT(pyobj);
+    if (pyobj && SwigPyObject_Check(pyobj))
+      return (SwigPyObject*) pyobj;
+  }
+# endif
+  return NULL;
+#else
+
+  obj = 0;
+
 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
-    if (PyInstance_Check(pyobj)) {
-      obj = _PyInstance_Lookup(pyobj, SWIG_This());      
+  if (PyInstance_Check(pyobj)) {
+    obj = _PyInstance_Lookup(pyobj, SWIG_This());      
+  } else {
+    PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
+    if (dictptr != NULL) {
+      PyObject *dict = *dictptr;
+      obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
     } else {
-      PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
-      if (dictptr != NULL) {
-	PyObject *dict = *dictptr;
-	obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
-      } else {
 #ifdef PyWeakref_CheckProxy
-	if (PyWeakref_CheckProxy(pyobj)) {
-	  PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
-	  return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
-	}
+      if (PyWeakref_CheckProxy(pyobj)) {
+	PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
+	return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
+      }
 #endif
-	obj = PyObject_GetAttr(pyobj,SWIG_This());
-	if (obj) {
-	  Py_DECREF(obj);
-	} else {
-	  if (PyErr_Occurred()) PyErr_Clear();
-	  return 0;
-	}
+      obj = PyObject_GetAttr(pyobj,SWIG_This());
+      if (obj) {
+	Py_DECREF(obj);
+      } else {
+	if (PyErr_Occurred()) PyErr_Clear();
+	return 0;
       }
     }
+  }
 #else
-    obj = PyObject_GetAttr(pyobj,SWIG_This());
-    if (obj) {
-      Py_DECREF(obj);
-    } else {
-      if (PyErr_Occurred()) PyErr_Clear();
-      return 0;
-    }
+  obj = PyObject_GetAttr(pyobj,SWIG_This());
+  if (obj) {
+    Py_DECREF(obj);
+  } else {
+    if (PyErr_Occurred()) PyErr_Clear();
+    return 0;
+  }
 #endif
-    if (obj && !SwigPyObject_Check(obj)) {
-      /* a PyObject is called 'this', try to get the 'real this'
-	 SwigPyObject from it */ 
-      return SWIG_Python_GetSwigThis(obj);
-    }
-    return (SwigPyObject *)obj;
+  if (obj && !SwigPyObject_Check(obj)) {
+    /* a PyObject is called 'this', try to get the 'real this'
+       SwigPyObject from it */ 
+    return SWIG_Python_GetSwigThis(obj);
   }
+  return (SwigPyObject *)obj;
+#endif
 }
 
 /* Acquire a pointer value */
@@ -2163,91 +2306,97 @@ SWIG_Python_AcquirePtr(PyObject *obj, int own) {
 
 SWIGRUNTIME int
 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
-  if (!obj) return SWIG_ERROR;
+  int res;
+  SwigPyObject *sobj;
+
+  if (!obj)
+    return SWIG_ERROR;
   if (obj == Py_None) {
-    if (ptr) *ptr = 0;
+    if (ptr)
+      *ptr = 0;
     return SWIG_OK;
-  } else {
-    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
-    if (own)
-      *own = 0;
-    while (sobj) {
-      void *vptr = sobj->ptr;
-      if (ty) {
-	swig_type_info *to = sobj->ty;
-	if (to == ty) {
-	  /* no type cast needed */
-	  if (ptr) *ptr = vptr;
-	  break;
-	} else {
-	  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
-	  if (!tc) {
-	    sobj = (SwigPyObject *)sobj->next;
-	  } else {
-	    if (ptr) {
-              int newmemory = 0;
-              *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
-              if (newmemory == SWIG_CAST_NEW_MEMORY) {
-                assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
-                if (own)
-                  *own = *own | SWIG_CAST_NEW_MEMORY;
-              }
-            }
-	    break;
-	  }
-	}
+  }
+
+  res = SWIG_ERROR;
+
+  sobj = SWIG_Python_GetSwigThis(obj);
+  if (own)
+    *own = 0;
+  while (sobj) {
+    void *vptr = sobj->ptr;
+    if (ty) {
+      swig_type_info *to = sobj->ty;
+      if (to == ty) {
+        /* no type cast needed */
+        if (ptr) *ptr = vptr;
+        break;
       } else {
-	if (ptr) *ptr = vptr;
-	break;
-      }
-    }
-    if (sobj) {
-      if (own)
-        *own = *own | sobj->own;
-      if (flags & SWIG_POINTER_DISOWN) {
-	sobj->own = 0;
+        swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+        if (!tc) {
+          sobj = (SwigPyObject *)sobj->next;
+        } else {
+          if (ptr) {
+            int newmemory = 0;
+            *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+            if (newmemory == SWIG_CAST_NEW_MEMORY) {
+              assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
+              if (own)
+                *own = *own | SWIG_CAST_NEW_MEMORY;
+            }
+          }
+          break;
+        }
       }
-      return SWIG_OK;
     } else {
-      int res = SWIG_ERROR;
-      if (flags & SWIG_POINTER_IMPLICIT_CONV) {
-	SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
-	if (data && !data->implicitconv) {
-	  PyObject *klass = data->klass;
-	  if (klass) {
-	    PyObject *impconv;
-	    data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
-	    impconv = SWIG_Python_CallFunctor(klass, obj);
-	    data->implicitconv = 0;
-	    if (PyErr_Occurred()) {
-	      PyErr_Clear();
-	      impconv = 0;
-	    }
-	    if (impconv) {
-	      SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
-	      if (iobj) {
-		void *vptr;
-		res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
-		if (SWIG_IsOK(res)) {
-		  if (ptr) {
-		    *ptr = vptr;
-		    /* transfer the ownership to 'ptr' */
-		    iobj->own = 0;
-		    res = SWIG_AddCast(res);
-		    res = SWIG_AddNewMask(res);
-		  } else {
-		    res = SWIG_AddCast(res);		    
-		  }
-		}
-	      }
-	      Py_DECREF(impconv);
-	    }
-	  }
-	}
+      if (ptr) *ptr = vptr;
+      break;
+    }
+  }
+  if (sobj) {
+    if (own)
+      *own = *own | sobj->own;
+    if (flags & SWIG_POINTER_DISOWN) {
+      sobj->own = 0;
+    }
+    res = SWIG_OK;
+  } else {
+    if (flags & SWIG_POINTER_IMPLICIT_CONV) {
+      SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
+      if (data && !data->implicitconv) {
+        PyObject *klass = data->klass;
+        if (klass) {
+          PyObject *impconv;
+          data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
+          impconv = SWIG_Python_CallFunctor(klass, obj);
+          data->implicitconv = 0;
+          if (PyErr_Occurred()) {
+            PyErr_Clear();
+            impconv = 0;
+          }
+          if (impconv) {
+            SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
+            if (iobj) {
+              void *vptr;
+              res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
+              if (SWIG_IsOK(res)) {
+                if (ptr) {
+                  *ptr = vptr;
+                  /* transfer the ownership to 'ptr' */
+                  iobj->own = 0;
+                  res = SWIG_AddCast(res);
+                  res = SWIG_AddNewMask(res);
+                } else {
+                  res = SWIG_AddCast(res);		    
+                }
+              }
+            }
+            Py_DECREF(impconv);
+          }
+        }
       }
-      return res;
     }
   }
+  return res;
 }
 
 /* Convert a function ptr value */
@@ -2401,7 +2550,7 @@ SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
 SWIGINTERN PyObject *
 SWIG_Python_InitShadowInstance(PyObject *args) {
   PyObject *obj[2];
-  if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
+  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
     return NULL;
   } else {
     SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
@@ -2417,22 +2566,54 @@ SWIG_Python_InitShadowInstance(PyObject *args) {
 /* Create a new pointer object */
 
 SWIGRUNTIME PyObject *
-SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
-  if (!ptr) {
+SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
+  SwigPyClientData *clientdata;
+  PyObject * robj;
+  int own;
+
+  if (!ptr)
     return SWIG_Py_Void();
-  } else {
-    int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
-    PyObject *robj = SwigPyObject_New(ptr, type, own);
-    SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
-    if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
-      PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
-      if (inst) {
-	Py_DECREF(robj);
-	robj = inst;
+
+  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
+  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
+  if (clientdata && clientdata->pytype) {
+    SwigPyObject *newobj;
+    if (flags & SWIG_BUILTIN_TP_INIT) {
+      newobj = (SwigPyObject*) self;
+      if (newobj->ptr) {
+        PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
+        while (newobj->next)
+	  newobj = (SwigPyObject *) newobj->next;
+        newobj->next = next_self;
+        newobj = (SwigPyObject *)next_self;
       }
+    } else {
+      newobj = PyObject_New(SwigPyObject, clientdata->pytype);
+    }
+    if (newobj) {
+      newobj->ptr = ptr;
+      newobj->ty = type;
+      newobj->own = own;
+      newobj->next = 0;
+#ifdef SWIGPYTHON_BUILTIN
+      newobj->dict = 0;
+#endif
+      return (PyObject*) newobj;
+    }
+    return SWIG_Py_Void();
+  }
+
+  assert(!(flags & SWIG_BUILTIN_TP_INIT));
+
+  robj = SwigPyObject_New(ptr, type, own);
+  if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
+    PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
+    if (inst) {
+      Py_DECREF(robj);
+      robj = inst;
     }
-    return robj;
   }
+  return robj;
 }
 
 /* Create a new packed object */
@@ -2458,12 +2639,12 @@ SWIG_Python_GetModule(void) {
 #ifdef SWIG_LINK_RUNTIME
     type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
 #else
-#ifdef USE_CAPSULES
-    type_pointer = PyCapsule_Import(TYPE_POINTER_NAME, 0);
-#else
+# ifdef SWIGPY_USE_CAPSULE
+    type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
+# else
     type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
 				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
-#endif
+# endif
     if (PyErr_Occurred()) {
       PyErr_Clear();
       type_pointer = (void *)0;
@@ -2506,16 +2687,19 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o)
 #endif
 
 SWIGRUNTIME void
+#ifdef SWIGPY_USE_CAPSULE
+SWIG_Python_DestroyModule(PyObject *obj)
+#else
 SWIG_Python_DestroyModule(void *vptr)
+#endif
 {
-  size_t i;
-#ifdef USE_CAPSULES
-  swig_module_info *swig_module =
-    (swig_module_info *) PyCapsule_GetPointer((PyObject *)vptr, TYPE_POINTER_NAME);
+#ifdef SWIGPY_USE_CAPSULE
+  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
 #else
   swig_module_info *swig_module = (swig_module_info *) vptr;
 #endif
   swig_type_info **types = swig_module->types;
+  size_t i;
   for (i =0; i < swig_module->size; ++i) {
     swig_type_info *ty = types[i];
     if (ty->owndata) {
@@ -2529,30 +2713,28 @@ SWIG_Python_DestroyModule(void *vptr)
 
 SWIGRUNTIME void
 SWIG_Python_SetModule(swig_module_info *swig_module) {
-  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
-
 #if PY_VERSION_HEX >= 0x03000000
  /* Add a dummy module object into sys.modules */
   PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
 #else
-  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
-				   swig_empty_runtime_method_table);
-#endif
-#ifdef USE_CAPSULES
-  PyObject *pointer = PyCapsule_New((void *)swig_module, TYPE_POINTER_NAME,
-				    (PyCapsule_Destructor)SWIG_Python_DestroyModule);
-#else
-  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
+  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
 #endif
+#ifdef SWIGPY_USE_CAPSULE
+  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
   if (pointer && module) {
-#ifdef USE_CAPSULES
     PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
+  } else {
+    Py_XDECREF(pointer);
+  }
 #else
+  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+  if (pointer && module) {
     PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
-#endif
   } else {
     Py_XDECREF(pointer);
   }
+#endif
 }
 
 /* The python cached type query */
@@ -2570,8 +2752,8 @@ SWIG_Python_TypeQuery(const char *type)
   PyObject *obj = PyDict_GetItem(cache, key);
   swig_type_info *descriptor;
   if (obj) {
-#ifdef USE_CAPSULES
-    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, type);
+#ifdef SWIGPY_USE_CAPSULE
+    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
 #else
     descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
 #endif
@@ -2579,8 +2761,8 @@ SWIG_Python_TypeQuery(const char *type)
     swig_module_info *swig_module = SWIG_Python_GetModule();
     descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
     if (descriptor) {
-#ifdef USE_CAPSULES
-      obj = PyCapsule_New(descriptor, type, NULL);
+#ifdef SWIGPY_USE_CAPSULE
+      obj = PyCapsule_New((void*) descriptor, NULL, NULL);
 #else
       obj = PyCObject_FromVoidPtr(descriptor, NULL);
 #endif
@@ -2644,7 +2826,7 @@ SwigPyObject_GetDesc(PyObject *self)
 {
   SwigPyObject *v = (SwigPyObject *)self;
   swig_type_info *ty = v ? v->ty : 0;
-  return ty ? ty->str : (char*)"";
+  return ty ? ty->str : "";
 }
 
 SWIGRUNTIME void
@@ -2687,7 +2869,7 @@ SWIG_Python_TypeError(const char *type, PyObject *obj)
 
 /* Convert a pointer value, signal an exception on a type mismatch */
 SWIGRUNTIME void *
-SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
+SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
   void *result;
   if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
     PyErr_Clear();
@@ -2701,11 +2883,62 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags)
   return result;
 }
 
+#ifdef SWIGPYTHON_BUILTIN
+SWIGRUNTIME int
+SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
+  PyTypeObject *tp = obj->ob_type;
+  PyObject *descr;
+  PyObject *encoded_name;
+  descrsetfunc f;
+  int res;
 
-#ifdef __cplusplus
-#if 0
-{ /* cc-mode */
+# ifdef Py_USING_UNICODE
+  if (PyString_Check(name)) {
+    name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
+    if (!name)
+      return -1;
+  } else if (!PyUnicode_Check(name))
+# else
+  if (!PyString_Check(name))
+# endif
+  {
+    PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
+    return -1;
+  } else {
+    Py_INCREF(name);
+  }
+
+  if (!tp->tp_dict) {
+    if (PyType_Ready(tp) < 0)
+      goto done;
+  }
+
+  res = -1;
+  descr = _PyType_Lookup(tp, name);
+  f = NULL;
+  if (descr != NULL)
+    f = descr->ob_type->tp_descr_set;
+  if (!f) {
+    if (PyString_Check(name)) {
+      encoded_name = name;
+      Py_INCREF(name);
+    } else {
+      encoded_name = PyUnicode_AsUTF8String(name);
+    }
+    PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
+    Py_DECREF(encoded_name);
+  } else {
+    res = f(descr, obj, value);
+  }
+  
+  done:
+  Py_DECREF(name);
+  return res;
+}
 #endif
+
+
+#ifdef __cplusplus
 }
 #endif
 
@@ -2745,7 +2978,7 @@ static swig_module_info swig_module = {swig_types, 1, 0, 0, 0, 0};
 #endif
 #define SWIG_name    "_csgraph"
 
-#define SWIGVERSION 0x020001 
+#define SWIGVERSION 0x020007 
 #define SWIG_VERSION SWIGVERSION
 
 
@@ -3291,13 +3524,10 @@ SWIG_AsVal_int (PyObject * obj, int *val)
 }
 
 
-  #define SWIG_From_long   PyInt_FromLong 
-
-
-SWIGINTERNINLINE PyObject *
-SWIG_From_int  (int value)
-{    
-  return SWIG_From_long  (value);
+SWIGINTERNINLINE PyObject*
+  SWIG_From_int  (int value)
+{
+  return PyInt_FromLong((long) value);
 }
 
 
@@ -3386,7 +3616,7 @@ fail:
 
 static PyMethodDef SwigMethods[] = {
 	 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
-	 { (char *)"cs_graph_components", _wrap_cs_graph_components, METH_VARARGS, (char *)"cs_graph_components(int n_nod, int Ap, int Aj, int flag) -> int"},
+	 { (char *)"cs_graph_components", _wrap_cs_graph_components, METH_VARARGS, (char *)"cs_graph_components(int const n_nod, int const [] Ap, int const [] Aj, int [] flag) -> int"},
 	 { NULL, NULL, 0, NULL }
 };
 
@@ -3785,24 +4015,23 @@ extern "C" {
   swig_varlink_type(void) {
     static char varlink__doc__[] = "Swig var link object";
     static PyTypeObject varlink_type;
-    static int type_init = 0;  
+    static int type_init = 0;
     if (!type_init) {
-      const PyTypeObject tmp
-      = {
+      const PyTypeObject tmp = {
         /* PyObject header changed in Python 3 */
 #if PY_VERSION_HEX >= 0x03000000
-        PyVarObject_HEAD_INIT(&PyType_Type, 0)
+        PyVarObject_HEAD_INIT(NULL, 0)
 #else
         PyObject_HEAD_INIT(NULL)
-        0,                                  /* Number of items in variable part (ob_size) */
-#endif
-        (char *)"swigvarlink",              /* Type name (tp_name) */
-        sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
-        0,                                  /* Itemsize (tp_itemsize) */
-        (destructor) swig_varlink_dealloc,  /* Deallocator (tp_dealloc) */ 
-        (printfunc) swig_varlink_print,     /* Print (tp_print) */
-        (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
-        (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
+        0,                                  /* ob_size */
+#endif
+        (char *)"swigvarlink",              /* tp_name */
+        sizeof(swig_varlinkobject),         /* tp_basicsize */
+        0,                                  /* tp_itemsize */
+        (destructor) swig_varlink_dealloc,  /* tp_dealloc */
+        (printfunc) swig_varlink_print,     /* tp_print */
+        (getattrfunc) swig_varlink_getattr, /* tp_getattr */
+        (setattrfunc) swig_varlink_setattr, /* tp_setattr */
         0,                                  /* tp_compare */
         (reprfunc) swig_varlink_repr,       /* tp_repr */
         0,                                  /* tp_as_number */
@@ -3826,16 +4055,21 @@ extern "C" {
 #if PY_VERSION_HEX >= 0x02030000
         0,                                  /* tp_del */
 #endif
+#if PY_VERSION_HEX >= 0x02060000
+        0,                                  /* tp_version */
+#endif
 #ifdef COUNT_ALLOCS
         0,0,0,0                             /* tp_alloc -> tp_next */
 #endif
       };
       varlink_type = tmp;
-      /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
-#if PY_VERSION_HEX < 0x03000000
+      type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
       varlink_type.ob_type = &PyType_Type;
+#else
+      if (PyType_Ready(&varlink_type) < 0)
+      return NULL;
 #endif
-      type_init = 1;
     }
     return &varlink_type;
   }
@@ -3886,7 +4120,7 @@ extern "C" {
     for (i = 0; constants[i].type; ++i) {
       switch(constants[i].type) {
       case SWIG_PY_POINTER:
-        obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
+        obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
         break;
       case SWIG_PY_BINARY:
         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
@@ -3967,10 +4201,19 @@ PyObject*
 void
 #endif
 SWIG_init(void) {
-  PyObject *m, *d;  
+  PyObject *m, *d, *md;
 #if PY_VERSION_HEX >= 0x03000000
   static struct PyModuleDef SWIG_module = {
+# if PY_VERSION_HEX >= 0x03020000
     PyModuleDef_HEAD_INIT,
+# else
+    {
+      PyObject_HEAD_INIT(NULL)
+      NULL, /* m_init */
+      0,    /* m_index */
+      NULL, /* m_copy */
+    },
+# endif
     (char *) SWIG_name,
     NULL,
     -1,
@@ -3982,6 +4225,49 @@ SWIG_init(void) {
   };
 #endif
   
+#if defined(SWIGPYTHON_BUILTIN)
+  static SwigPyClientData SwigPyObject_clientdata = {
+    0, 0, 0, 0, 0, 0, 0
+  };
+  static PyGetSetDef this_getset_def = {
+    (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
+  };
+  static SwigPyGetSet thisown_getset_closure = {
+    (PyCFunction) SwigPyObject_own,
+    (PyCFunction) SwigPyObject_own
+  };
+  static PyGetSetDef thisown_getset_def = {
+    (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
+  };
+  PyObject *metatype_args;
+  PyTypeObject *builtin_pytype;
+  int builtin_base_count;
+  swig_type_info *builtin_basetype;
+  PyObject *tuple;
+  PyGetSetDescrObject *static_getset;
+  PyTypeObject *metatype;
+  SwigPyClientData *cd;
+  PyObject *public_interface, *public_symbol;
+  PyObject *this_descr;
+  PyObject *thisown_descr;
+  int i;
+  
+  (void)builtin_pytype;
+  (void)builtin_base_count;
+  (void)builtin_basetype;
+  (void)tuple;
+  (void)static_getset;
+  
+  /* metatype is used to implement static member variables. */
+  metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
+  assert(metatype_args);
+  metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
+  assert(metatype);
+  Py_DECREF(metatype_args);
+  metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
+  assert(PyType_Ready(metatype) >= 0);
+#endif
+  
   /* Fix SwigMethods to carry the callback ptrs when needed */
   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
   
@@ -3990,11 +4276,47 @@ SWIG_init(void) {
 #else
   m = Py_InitModule((char *) SWIG_name, SwigMethods);
 #endif
-  d = PyModule_GetDict(m);
+  md = d = PyModule_GetDict(m);
   
   SWIG_InitializeModule(0);
-  SWIG_InstallConstants(d,swig_const_table);
   
+#ifdef SWIGPYTHON_BUILTIN
+  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
+  assert(SwigPyObject_stype);
+  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
+  if (!cd) {
+    SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
+    SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
+  } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
+    PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
+# if PY_VERSION_HEX >= 0x03000000
+    return NULL;
+# else
+    return;
+# endif
+  }
+  
+  /* All objects have a 'this' attribute */
+  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
+  (void)this_descr;
+  
+  /* All objects have a 'thisown' attribute */
+  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
+  (void)thisown_descr;
+  
+  public_interface = PyList_New(0);
+  public_symbol = 0;
+  (void)public_symbol;
+  
+  PyDict_SetItemString(md, "__all__", public_interface);
+  Py_DECREF(public_interface);
+  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
+  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
+  for (i = 0; swig_const_table[i].name != 0; ++i)
+  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
+#endif
+  
+  SWIG_InstallConstants(d,swig_const_table);
   
   
   import_array();
diff --git a/scipy/sparse/sparsetools/csr.py b/scipy/sparse/sparsetools/csr.py
index c7248d9..8e282fe 100644
--- a/scipy/sparse/sparsetools/csr.py
+++ b/scipy/sparse/sparsetools/csr.py
@@ -1,9 +1,10 @@
 # This file was automatically generated by SWIG (http://www.swig.org).
-# Version 2.0.1+capsulehack
+# Version 2.0.7
 #
 # Do not make changes to this file unless you know what you are doing--modify
 # the SWIG interface file instead.
-# This file is compatible with both classic and new-style classes.
+
+
 
 from sys import version_info
 if version_info >= (2,6,0):
@@ -39,7 +40,7 @@ def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
             return
     method = class_type.__swig_setmethods__.get(name,None)
     if method: return method(self,value)
-    if (not static) or hasattr(self,name):
+    if (not static):
         self.__dict__[name] = value
     else:
         raise AttributeError("You cannot add attributes to %s" % self)
@@ -68,584 +69,613 @@ except AttributeError:
 
 
 def expandptr(*args):
-    """expandptr(int n_row, int Ap, int Bi)"""
-    return _csr.expandptr(*args)
+  """expandptr(int const n_row, int const [] Ap, int [] Bi)"""
+  return _csr.expandptr(*args)
 
 def csr_matmat_pass1(*args):
+  """
+    csr_matmat_pass1(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Bp, 
+        int const [] 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 const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] 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 const n_row, int const [] Ap, int const [] 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)
-    """
-    return _csr.csr_diagonal(*args)
+  """
+    csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, 
+        signed char [] Yx)
+    csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, 
+        unsigned char [] Yx)
+    csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, 
+        short [] Yx)
+    csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, 
+        unsigned short [] Yx)
+    csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, 
+        int [] Yx)
+    csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, 
+        unsigned int [] Yx)
+    csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, 
+        long long [] Yx)
+    csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, 
+        unsigned long long [] Yx)
+    csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, 
+        float [] Yx)
+    csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, 
+        double [] Yx)
+    csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, 
+        long double [] Yx)
+    csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, 
+        npy_cfloat_wrapper [] Yx)
+    csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, 
+        npy_cdouble_wrapper [] Yx)
+    csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, 
+        npy_clongdouble_wrapper [] Yx)
+    """
+  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)
-    """
-    return _csr.csr_scale_rows(*args)
+  """
+    csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char [] Ax, 
+        signed char const [] Xx)
+    csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char [] Ax, 
+        unsigned char const [] Xx)
+    csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short [] Ax, 
+        short const [] Xx)
+    csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short [] Ax, 
+        unsigned short const [] Xx)
+    csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int [] Ax, int const [] Xx)
+    csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int [] Ax, 
+        unsigned int const [] Xx)
+    csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long [] Ax, 
+        long long const [] Xx)
+    csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long [] Ax, 
+        unsigned long long const [] Xx)
+    csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float [] Ax, 
+        float const [] Xx)
+    csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double [] Ax, 
+        double const [] Xx)
+    csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double [] Ax, 
+        long double const [] Xx)
+    csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper [] Ax, 
+        npy_cfloat_wrapper const [] Xx)
+    csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper [] Ax, 
+        npy_cdouble_wrapper const [] Xx)
+    csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper [] Ax, 
+        npy_clongdouble_wrapper const [] Xx)
+    """
+  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)
-    """
-    return _csr.csr_scale_columns(*args)
+  """
+    csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char [] Ax, 
+        signed char const [] Xx)
+    csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char [] Ax, 
+        unsigned char const [] Xx)
+    csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short [] Ax, 
+        short const [] Xx)
+    csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short [] Ax, 
+        unsigned short const [] Xx)
+    csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int [] Ax, int const [] Xx)
+    csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int [] Ax, 
+        unsigned int const [] Xx)
+    csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long [] Ax, 
+        long long const [] Xx)
+    csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long [] Ax, 
+        unsigned long long const [] Xx)
+    csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float [] Ax, 
+        float const [] Xx)
+    csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double [] Ax, 
+        double const [] Xx)
+    csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double [] Ax, 
+        long double const [] Xx)
+    csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper [] Ax, 
+        npy_cfloat_wrapper const [] Xx)
+    csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper [] Ax, 
+        npy_cdouble_wrapper const [] Xx)
+    csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper [] Ax, 
+        npy_clongdouble_wrapper const [] Xx)
+    """
+  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)
-    """
-    return _csr.csr_tocsc(*args)
+  """
+    csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, 
+        int [] Bp, int [] Bi, signed char [] Bx)
+    csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, 
+        int [] Bp, int [] Bi, unsigned char [] Bx)
+    csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, 
+        int [] Bp, int [] Bi, short [] Bx)
+    csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, 
+        int [] Bp, int [] Bi, unsigned short [] Bx)
+    csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, 
+        int [] Bp, int [] Bi, int [] Bx)
+    csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, 
+        int [] Bp, int [] Bi, unsigned int [] Bx)
+    csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, 
+        int [] Bp, int [] Bi, long long [] Bx)
+    csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, 
+        int [] Bp, int [] Bi, unsigned long long [] Bx)
+    csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, 
+        int [] Bp, int [] Bi, float [] Bx)
+    csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, 
+        int [] Bp, int [] Bi, double [] Bx)
+    csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, 
+        int [] Bp, int [] Bi, long double [] Bx)
+    csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, 
+        int [] Bp, int [] Bi, npy_cfloat_wrapper [] Bx)
+    csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, 
+        int [] Bp, int [] Bi, npy_cdouble_wrapper [] Bx)
+    csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, 
+        int [] Bp, int [] Bi, npy_clongdouble_wrapper [] Bx)
+    """
+  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)
-    """
-    return _csr.csr_tobsr(*args)
+  """
+    csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        signed char const [] Ax, int [] Bp, int [] Bj, signed char [] Bx)
+    csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned char const [] Ax, int [] Bp, int [] Bj, unsigned char [] Bx)
+    csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        short const [] Ax, int [] Bp, int [] Bj, short [] Bx)
+    csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned short const [] Ax, int [] Bp, int [] Bj, unsigned short [] Bx)
+    csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        int const [] Ax, int [] Bp, int [] Bj, int [] Bx)
+    csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned int const [] Ax, int [] Bp, int [] Bj, unsigned int [] Bx)
+    csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long long const [] Ax, int [] Bp, int [] Bj, long long [] Bx)
+    csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        unsigned long long const [] Ax, int [] Bp, int [] Bj, unsigned long long [] Bx)
+    csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        float const [] Ax, int [] Bp, int [] Bj, float [] Bx)
+    csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        double const [] Ax, int [] Bp, int [] Bj, double [] Bx)
+    csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        long double const [] Ax, int [] Bp, int [] Bj, long double [] Bx)
+    csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cfloat_wrapper const [] Ax, int [] Bp, int [] Bj, npy_cfloat_wrapper [] Bx)
+    csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_cdouble_wrapper const [] Ax, int [] Bp, int [] Bj, npy_cdouble_wrapper [] Bx)
+    csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, 
+        npy_clongdouble_wrapper const [] Ax, int [] Bp, int [] Bj, npy_clongdouble_wrapper [] Bx)
+    """
+  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)
-    """
-    return _csr.csr_matmat_pass2(*args)
+  """
+    csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, 
+        int const [] Bp, int const [] Bj, signed char const [] Bx, int [] Cp, 
+        int [] Cj, signed char [] Cx)
+    csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned char const [] Bx, 
+        int [] Cp, int [] Cj, unsigned char [] Cx)
+    csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, 
+        int const [] Bp, int const [] Bj, short const [] Bx, int [] Cp, int [] Cj, 
+        short [] Cx)
+    csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned short const [] Bx, 
+        int [] Cp, int [] Cj, unsigned short [] Cx)
+    csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, 
+        int const [] Bp, int const [] Bj, int const [] Bx, int [] Cp, int [] Cj, 
+        int [] Cx)
+    csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned int const [] Bx, int [] Cp, 
+        int [] Cj, unsigned int [] Cx)
+    csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, 
+        int const [] Bp, int const [] Bj, long long const [] Bx, int [] Cp, 
+        int [] Cj, long long [] Cx)
+    csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned long long const [] Bx, 
+        int [] Cp, int [] Cj, unsigned long long [] Cx)
+    csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, 
+        int const [] Bp, int const [] Bj, float const [] Bx, int [] Cp, int [] Cj, 
+        float [] Cx)
+    csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, 
+        int const [] Bp, int const [] Bj, double const [] Bx, int [] Cp, int [] Cj, 
+        double [] Cx)
+    csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, 
+        int const [] Bp, int const [] Bj, long double const [] Bx, int [] Cp, 
+        int [] Cj, long double [] Cx)
+    csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bj, npy_cfloat_wrapper const [] Bx, 
+        int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)
+    csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bj, npy_cdouble_wrapper const [] Bx, 
+        int [] Cp, int [] Cj, npy_cdouble_wrapper [] Cx)
+    csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bj, npy_clongdouble_wrapper const [] Bx, 
+        int [] Cp, int [] Cj, npy_clongdouble_wrapper [] Cx)
+    """
+  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)
-    """
-    return _csr.csr_matvec(*args)
+  """
+    csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, 
+        signed char const [] Xx, signed char [] Yx)
+    csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, 
+        unsigned char const [] Xx, unsigned char [] Yx)
+    csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, 
+        short const [] Xx, short [] Yx)
+    csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, 
+        unsigned short const [] Xx, unsigned short [] Yx)
+    csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, 
+        int const [] Xx, int [] Yx)
+    csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, 
+        unsigned int const [] Xx, unsigned int [] Yx)
+    csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, 
+        long long const [] Xx, long long [] Yx)
+    csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, 
+        unsigned long long const [] Xx, unsigned long long [] Yx)
+    csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, 
+        float const [] Xx, float [] Yx)
+    csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, 
+        double const [] Xx, double [] Yx)
+    csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, 
+        long double const [] Xx, long double [] Yx)
+    csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, 
+        npy_cfloat_wrapper const [] Xx, npy_cfloat_wrapper [] Yx)
+    csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, 
+        npy_cdouble_wrapper const [] Xx, npy_cdouble_wrapper [] Yx)
+    csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, 
+        npy_clongdouble_wrapper const [] Xx, npy_clongdouble_wrapper [] Yx)
+    """
+  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)
-    """
-    return _csr.csr_matvecs(*args)
+  """
+    csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, 
+        signed char const [] Ax, signed char const [] Xx, signed char [] Yx)
+    csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, 
+        unsigned char const [] Ax, unsigned char const [] Xx, unsigned char [] Yx)
+    csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, 
+        short const [] Ax, short const [] Xx, short [] Yx)
+    csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, 
+        unsigned short const [] Ax, unsigned short const [] Xx, unsigned short [] Yx)
+    csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, 
+        int const [] Ax, int const [] Xx, int [] Yx)
+    csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, 
+        unsigned int const [] Ax, unsigned int const [] Xx, unsigned int [] Yx)
+    csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, 
+        long long const [] Ax, long long const [] Xx, long long [] Yx)
+    csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, 
+        unsigned long long const [] Ax, unsigned long long const [] Xx, unsigned long long [] Yx)
+    csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, 
+        float const [] Ax, float const [] Xx, float [] Yx)
+    csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, 
+        double const [] Ax, double const [] Xx, double [] Yx)
+    csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, 
+        long double const [] Ax, long double const [] Xx, long double [] Yx)
+    csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, 
+        npy_cfloat_wrapper const [] Ax, npy_cfloat_wrapper const [] Xx, npy_cfloat_wrapper [] Yx)
+    csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, 
+        npy_cdouble_wrapper const [] Ax, npy_cdouble_wrapper const [] Xx, npy_cdouble_wrapper [] Yx)
+    csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, 
+        npy_clongdouble_wrapper const [] Ax, npy_clongdouble_wrapper const [] Xx, 
+        npy_clongdouble_wrapper [] Yx)
+    """
+  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)
-    """
-    return _csr.csr_elmul_csr(*args)
+  """
+    csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, 
+        int const [] Bp, int const [] Bj, signed char const [] Bx, int [] Cp, 
+        int [] Cj, signed char [] Cx)
+    csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned char const [] Bx, 
+        int [] Cp, int [] Cj, unsigned char [] Cx)
+    csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, 
+        int const [] Bp, int const [] Bj, short const [] Bx, int [] Cp, int [] Cj, 
+        short [] Cx)
+    csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned short const [] Bx, 
+        int [] Cp, int [] Cj, unsigned short [] Cx)
+    csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, 
+        int const [] Bp, int const [] Bj, int const [] Bx, int [] Cp, int [] Cj, 
+        int [] Cx)
+    csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned int const [] Bx, int [] Cp, 
+        int [] Cj, unsigned int [] Cx)
+    csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, 
+        int const [] Bp, int const [] Bj, long long const [] Bx, int [] Cp, 
+        int [] Cj, long long [] Cx)
+    csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned long long const [] Bx, 
+        int [] Cp, int [] Cj, unsigned long long [] Cx)
+    csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, 
+        int const [] Bp, int const [] Bj, float const [] Bx, int [] Cp, int [] Cj, 
+        float [] Cx)
+    csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, 
+        int const [] Bp, int const [] Bj, double const [] Bx, int [] Cp, int [] Cj, 
+        double [] Cx)
+    csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, 
+        int const [] Bp, int const [] Bj, long double const [] Bx, int [] Cp, 
+        int [] Cj, long double [] Cx)
+    csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bj, npy_cfloat_wrapper const [] Bx, 
+        int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)
+    csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bj, npy_cdouble_wrapper const [] Bx, 
+        int [] Cp, int [] Cj, npy_cdouble_wrapper [] Cx)
+    csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bj, npy_clongdouble_wrapper const [] Bx, 
+        int [] Cp, int [] Cj, npy_clongdouble_wrapper [] Cx)
+    """
+  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)
-    """
-    return _csr.csr_eldiv_csr(*args)
+  """
+    csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, 
+        int const [] Bp, int const [] Bj, signed char const [] Bx, int [] Cp, 
+        int [] Cj, signed char [] Cx)
+    csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned char const [] Bx, 
+        int [] Cp, int [] Cj, unsigned char [] Cx)
+    csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, 
+        int const [] Bp, int const [] Bj, short const [] Bx, int [] Cp, int [] Cj, 
+        short [] Cx)
+    csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned short const [] Bx, 
+        int [] Cp, int [] Cj, unsigned short [] Cx)
+    csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, 
+        int const [] Bp, int const [] Bj, int const [] Bx, int [] Cp, int [] Cj, 
+        int [] Cx)
+    csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned int const [] Bx, int [] Cp, 
+        int [] Cj, unsigned int [] Cx)
+    csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, 
+        int const [] Bp, int const [] Bj, long long const [] Bx, int [] Cp, 
+        int [] Cj, long long [] Cx)
+    csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned long long const [] Bx, 
+        int [] Cp, int [] Cj, unsigned long long [] Cx)
+    csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, 
+        int const [] Bp, int const [] Bj, float const [] Bx, int [] Cp, int [] Cj, 
+        float [] Cx)
+    csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, 
+        int const [] Bp, int const [] Bj, double const [] Bx, int [] Cp, int [] Cj, 
+        double [] Cx)
+    csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, 
+        int const [] Bp, int const [] Bj, long double const [] Bx, int [] Cp, 
+        int [] Cj, long double [] Cx)
+    csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bj, npy_cfloat_wrapper const [] Bx, 
+        int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)
+    csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bj, npy_cdouble_wrapper const [] Bx, 
+        int [] Cp, int [] Cj, npy_cdouble_wrapper [] Cx)
+    csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bj, npy_clongdouble_wrapper const [] Bx, 
+        int [] Cp, int [] Cj, npy_clongdouble_wrapper [] Cx)
+    """
+  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)
-    """
-    return _csr.csr_plus_csr(*args)
+  """
+    csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, 
+        int const [] Bp, int const [] Bj, signed char const [] Bx, int [] Cp, 
+        int [] Cj, signed char [] Cx)
+    csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned char const [] Bx, 
+        int [] Cp, int [] Cj, unsigned char [] Cx)
+    csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, 
+        int const [] Bp, int const [] Bj, short const [] Bx, int [] Cp, int [] Cj, 
+        short [] Cx)
+    csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned short const [] Bx, 
+        int [] Cp, int [] Cj, unsigned short [] Cx)
+    csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, 
+        int const [] Bp, int const [] Bj, int const [] Bx, int [] Cp, int [] Cj, 
+        int [] Cx)
+    csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned int const [] Bx, int [] Cp, 
+        int [] Cj, unsigned int [] Cx)
+    csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, 
+        int const [] Bp, int const [] Bj, long long const [] Bx, int [] Cp, 
+        int [] Cj, long long [] Cx)
+    csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned long long const [] Bx, 
+        int [] Cp, int [] Cj, unsigned long long [] Cx)
+    csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, 
+        int const [] Bp, int const [] Bj, float const [] Bx, int [] Cp, int [] Cj, 
+        float [] Cx)
+    csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, 
+        int const [] Bp, int const [] Bj, double const [] Bx, int [] Cp, int [] Cj, 
+        double [] Cx)
+    csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, 
+        int const [] Bp, int const [] Bj, long double const [] Bx, int [] Cp, 
+        int [] Cj, long double [] Cx)
+    csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bj, npy_cfloat_wrapper const [] Bx, 
+        int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)
+    csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bj, npy_cdouble_wrapper const [] Bx, 
+        int [] Cp, int [] Cj, npy_cdouble_wrapper [] Cx)
+    csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bj, npy_clongdouble_wrapper const [] Bx, 
+        int [] Cp, int [] Cj, npy_clongdouble_wrapper [] Cx)
+    """
+  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)
-    """
-    return _csr.csr_minus_csr(*args)
+  """
+    csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, 
+        int const [] Bp, int const [] Bj, signed char const [] Bx, int [] Cp, 
+        int [] Cj, signed char [] Cx)
+    csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned char const [] Bx, 
+        int [] Cp, int [] Cj, unsigned char [] Cx)
+    csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, 
+        int const [] Bp, int const [] Bj, short const [] Bx, int [] Cp, int [] Cj, 
+        short [] Cx)
+    csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned short const [] Bx, 
+        int [] Cp, int [] Cj, unsigned short [] Cx)
+    csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, 
+        int const [] Bp, int const [] Bj, int const [] Bx, int [] Cp, int [] Cj, 
+        int [] Cx)
+    csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned int const [] Bx, int [] Cp, 
+        int [] Cj, unsigned int [] Cx)
+    csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, 
+        int const [] Bp, int const [] Bj, long long const [] Bx, int [] Cp, 
+        int [] Cj, long long [] Cx)
+    csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, 
+        int const [] Bp, int const [] Bj, unsigned long long const [] Bx, 
+        int [] Cp, int [] Cj, unsigned long long [] Cx)
+    csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, 
+        int const [] Bp, int const [] Bj, float const [] Bx, int [] Cp, int [] Cj, 
+        float [] Cx)
+    csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, 
+        int const [] Bp, int const [] Bj, double const [] Bx, int [] Cp, int [] Cj, 
+        double [] Cx)
+    csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, 
+        int const [] Bp, int const [] Bj, long double const [] Bx, int [] Cp, 
+        int [] Cj, long double [] Cx)
+    csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bj, npy_cfloat_wrapper const [] Bx, 
+        int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)
+    csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bj, npy_cdouble_wrapper const [] Bx, 
+        int [] Cp, int [] Cj, npy_cdouble_wrapper [] Cx)
+    csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, 
+        int const [] Bp, int const [] Bj, npy_clongdouble_wrapper const [] Bx, 
+        int [] Cp, int [] Cj, npy_clongdouble_wrapper [] Cx)
+    """
+  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)
-    """
-    return _csr.csr_sort_indices(*args)
+  """
+    csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, signed char [] Ax)
+    csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, unsigned char [] Ax)
+    csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, short [] Ax)
+    csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, unsigned short [] Ax)
+    csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, int [] Ax)
+    csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, unsigned int [] Ax)
+    csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, long long [] Ax)
+    csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, unsigned long long [] Ax)
+    csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, float [] Ax)
+    csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, double [] Ax)
+    csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, long double [] Ax)
+    csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, npy_cfloat_wrapper [] Ax)
+    csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, npy_cdouble_wrapper [] Ax)
+    csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, npy_clongdouble_wrapper [] Ax)
+    """
+  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)
-    """
-    return _csr.csr_eliminate_zeros(*args)
+  """
+    csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, signed char [] Ax)
+    csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, unsigned char [] Ax)
+    csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, short [] Ax)
+    csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, unsigned short [] Ax)
+    csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, int [] Ax)
+    csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, unsigned int [] Ax)
+    csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, long long [] Ax)
+    csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, unsigned long long [] Ax)
+    csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, float [] Ax)
+    csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, double [] Ax)
+    csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, long double [] Ax)
+    csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, npy_cfloat_wrapper [] Ax)
+    csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, npy_cdouble_wrapper [] Ax)
+    csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, npy_clongdouble_wrapper [] Ax)
+    """
+  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)
-    """
-    return _csr.csr_sum_duplicates(*args)
+  """
+    csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, signed char [] Ax)
+    csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, unsigned char [] Ax)
+    csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, short [] Ax)
+    csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, unsigned short [] Ax)
+    csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, int [] Ax)
+    csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, unsigned int [] Ax)
+    csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, long long [] Ax)
+    csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, unsigned long long [] Ax)
+    csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, float [] Ax)
+    csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, double [] Ax)
+    csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, long double [] Ax)
+    csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, npy_cfloat_wrapper [] Ax)
+    csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, npy_cdouble_wrapper [] Ax)
+    csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, npy_clongdouble_wrapper [] Ax)
+    """
+  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)
-    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, unsigned char Ax,
-        int ir0, int ir1, int ic0, int ic1)
-    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, short Ax, int ir0,
-        int ir1, int ic0, int ic1)
-    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, unsigned short Ax,
-        int ir0, int ir1, int ic0, int ic1)
-    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, int Ax, int ir0,
-        int ir1, int ic0, int ic1)
-    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, unsigned int Ax,
-        int ir0, int ir1, int ic0, int ic1)
-    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, long long Ax,
-        int ir0, int ir1, int ic0, int ic1)
-    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)
-    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, float Ax, int ir0,
-        int ir1, int ic0, int ic1)
-    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, double Ax, int ir0,
-        int ir1, int ic0, int ic1)
-    get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, long double Ax,
-        int ir0, int ir1, int ic0, int ic1)
-    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)
-    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)
-    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)
-    """
-    return _csr.get_csr_submatrix(*args)
+  """
+    get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, 
+        int const ir0, int const ir1, int const ic0, int const ic1)
+    get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, 
+        int const ir0, int const ir1, int const ic0, int const ic1)
+    get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, 
+        int const ir0, int const ir1, int const ic0, int const ic1)
+    get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, 
+        int const ir0, int const ir1, int const ic0, int const ic1)
+    get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, 
+        int const ir0, int const ir1, int const ic0, int const ic1)
+    get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, 
+        int const ir0, int const ir1, int const ic0, int const ic1)
+    get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, 
+        int const ir0, int const ir1, int const ic0, int const ic1)
+    get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, 
+        int const ir0, int const ir1, int const ic0, int const ic1)
+    get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, 
+        int const ir0, int const ir1, int const ic0, int const ic1)
+    get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, 
+        int const ir0, int const ir1, int const ic0, int const ic1)
+    get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, 
+        int const ir0, int const ir1, int const ic0, int const ic1)
+    get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, 
+        int const ir0, int const ir1, int const ic0, int const ic1)
+    get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, 
+        int const ir0, int const ir1, int const ic0, int const ic1)
+    get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, 
+        int const ir0, int const ir1, int const ic0, int const ic1)
+    """
+  return _csr.get_csr_submatrix(*args)
 
 def csr_sample_values(*args):
-    """
-    csr_sample_values(int n_row, int n_col, int Ap, int Aj, signed char Ax,
-        int n_samples, int Bi, int Bj, signed char Bx)
-    csr_sample_values(int n_row, int n_col, int Ap, int Aj, unsigned char Ax,
-        int n_samples, int Bi, int Bj, unsigned char Bx)
-    csr_sample_values(int n_row, int n_col, int Ap, int Aj, short Ax, int n_samples,
-        int Bi, int Bj, short Bx)
-    csr_sample_values(int n_row, int n_col, int Ap, int Aj, unsigned short Ax,
-        int n_samples, int Bi, int Bj, unsigned short Bx)
-    csr_sample_values(int n_row, int n_col, int Ap, int Aj, int Ax, int n_samples,
-        int Bi, int Bj, int Bx)
-    csr_sample_values(int n_row, int n_col, int Ap, int Aj, unsigned int Ax,
-        int n_samples, int Bi, int Bj, unsigned int Bx)
-    csr_sample_values(int n_row, int n_col, int Ap, int Aj, long long Ax,
-        int n_samples, int Bi, int Bj, long long Bx)
-    csr_sample_values(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax,
-        int n_samples, int Bi, int Bj, unsigned long long Bx)
-    csr_sample_values(int n_row, int n_col, int Ap, int Aj, float Ax, int n_samples,
-        int Bi, int Bj, float Bx)
-    csr_sample_values(int n_row, int n_col, int Ap, int Aj, double Ax, int n_samples,
-        int Bi, int Bj, double Bx)
-    csr_sample_values(int n_row, int n_col, int Ap, int Aj, long double Ax,
-        int n_samples, int Bi, int Bj, long double Bx)
-    csr_sample_values(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax,
-        int n_samples, int Bi, int Bj, npy_cfloat_wrapper Bx)
-    csr_sample_values(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax,
-        int n_samples, int Bi, int Bj, npy_cdouble_wrapper Bx)
-    csr_sample_values(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax,
-        int n_samples, int Bi, int Bj,
-        npy_clongdouble_wrapper Bx)
-    """
-    return _csr.csr_sample_values(*args)
+  """
+    csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, 
+        int const n_samples, int const [] Bi, int const [] Bj, signed char [] Bx)
+    csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, 
+        int const n_samples, int const [] Bi, int const [] Bj, unsigned char [] Bx)
+    csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, 
+        int const n_samples, int const [] Bi, int const [] Bj, short [] Bx)
+    csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, 
+        int const n_samples, int const [] Bi, int const [] Bj, unsigned short [] Bx)
+    csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, 
+        int const n_samples, int const [] Bi, int const [] Bj, int [] Bx)
+    csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, 
+        int const n_samples, int const [] Bi, int const [] Bj, unsigned int [] Bx)
+    csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, 
+        int const n_samples, int const [] Bi, int const [] Bj, long long [] Bx)
+    csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, 
+        int const n_samples, int const [] Bi, int const [] Bj, unsigned long long [] Bx)
+    csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, 
+        int const n_samples, int const [] Bi, int const [] Bj, float [] Bx)
+    csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, 
+        int const n_samples, int const [] Bi, int const [] Bj, double [] Bx)
+    csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, 
+        int const n_samples, int const [] Bi, int const [] Bj, long double [] Bx)
+    csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, 
+        int const n_samples, int const [] Bi, int const [] Bj, npy_cfloat_wrapper [] Bx)
+    csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, 
+        int const n_samples, int const [] Bi, int const [] Bj, 
+        npy_cdouble_wrapper [] Bx)
+    csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, 
+        int const n_samples, int const [] Bi, int const [] Bj, 
+        npy_clongdouble_wrapper [] Bx)
+    """
+  return _csr.csr_sample_values(*args)
+# This file is compatible with both classic and new-style classes.
+
+
diff --git a/scipy/sparse/sparsetools/csr_wrap.cxx b/scipy/sparse/sparsetools/csr_wrap.cxx
index df8a1c9..783f055 100644
--- a/scipy/sparse/sparsetools/csr_wrap.cxx
+++ b/scipy/sparse/sparsetools/csr_wrap.cxx
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.1+capsulehack
+ * Version 2.0.7
  * 
  * This file is not intended to be easily readable and contains a number of 
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -756,7 +756,16 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
 #define PyInt_Check(x) PyLong_Check(x)
 #define PyInt_AsLong(x) PyLong_AsLong(x)
 #define PyInt_FromLong(x) PyLong_FromLong(x)
+#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
+#define PyString_Check(name) PyBytes_Check(name)
+#define PyString_FromString(x) PyUnicode_FromString(x)
 #define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
+#define PyString_AsString(str) PyBytes_AsString(str)
+#define PyString_Size(str) PyBytes_Size(str)	
+#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
+#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
+#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
+#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
 
 #endif
 
@@ -896,6 +905,63 @@ PyObject *PyBool_FromLong(long ok)
 typedef int Py_ssize_t;
 # define PY_SSIZE_T_MAX INT_MAX
 # define PY_SSIZE_T_MIN INT_MIN
+typedef inquiry lenfunc;
+typedef intargfunc ssizeargfunc;
+typedef intintargfunc ssizessizeargfunc;
+typedef intobjargproc ssizeobjargproc;
+typedef intintobjargproc ssizessizeobjargproc;
+typedef getreadbufferproc readbufferproc;
+typedef getwritebufferproc writebufferproc;
+typedef getsegcountproc segcountproc;
+typedef getcharbufferproc charbufferproc;
+static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
+{
+  long result = 0;
+  PyObject *i = PyNumber_Int(x);
+  if (i) {
+    result = PyInt_AsLong(i);
+    Py_DECREF(i);
+  }
+  return result;
+}
+#endif
+
+#if PY_VERSION_HEX < 0x02040000
+#define Py_VISIT(op)				\
+  do { 						\
+    if (op) {					\
+      int vret = visit((op), arg);		\
+      if (vret)					\
+        return vret;				\
+    }						\
+  } while (0)
+#endif
+
+#if PY_VERSION_HEX < 0x02030000
+typedef struct {
+  PyTypeObject type;
+  PyNumberMethods as_number;
+  PyMappingMethods as_mapping;
+  PySequenceMethods as_sequence;
+  PyBufferProcs as_buffer;
+  PyObject *name, *slots;
+} PyHeapTypeObject;
+#endif
+
+#if PY_VERSION_HEX < 0x02030000
+typedef destructor freefunc;
+#endif
+
+#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
+     (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
+     (PY_MAJOR_VERSION > 3))
+# define SWIGPY_USE_CAPSULE
+# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
+#endif
+
+#if PY_VERSION_HEX < 0x03020000
+#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
+#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
 #endif
 
 /* -----------------------------------------------------------------------------
@@ -1042,9 +1108,6 @@ SWIG_Python_AddErrorMsg(const char* mesg)
 
 #ifdef __cplusplus
 extern "C" {
-#if 0
-} /* cc-mode */
-#endif
 #endif
 
 /* -----------------------------------------------------------------------------
@@ -1070,19 +1133,19 @@ typedef struct swig_const_info {
  * Wrapper of PyInstanceMethod_New() used in Python 3
  * It is exported to the generated module, used for -fastproxy
  * ----------------------------------------------------------------------------- */
-SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
-{
 #if PY_VERSION_HEX >= 0x03000000
+SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
+{
   return PyInstanceMethod_New(func);
+}
 #else
+SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
+{
   return NULL;
-#endif
 }
+#endif
 
 #ifdef __cplusplus
-#if 0
-{ /* cc-mode */
-#endif
 }
 #endif
 
@@ -1102,7 +1165,15 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
 #define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
-#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(ptr, type, flags)
+
+#ifdef SWIGPYTHON_BUILTIN
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
+#else
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
+#endif
+
+#define SWIG_InternalNewPointerObj(ptr, type, flags)	SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
+
 #define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
 #define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
 #define swig_owntype                                    int
@@ -1117,7 +1188,7 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
 
 /* for C or C++ function pointers */
 #define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
-#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(ptr, type, 0)
+#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
 
 /* for C++ member pointers, ie, member methods */
 #define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
@@ -1134,18 +1205,8 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
 #define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
 #define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
 #define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
-#define SWIG_fail                        		goto fail				
+#define SWIG_fail                        		goto fail					   
 
-/*
- * Python 2.7 and newer and Python 3.1 and newer should use Capsules API instead of
- * CObjects API.
- */
-#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
-     (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0))
-#define USE_CAPSULES
-#define TYPE_POINTER_NAME \
-    ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
-#endif
 
 /* Runtime API implementation */
 
@@ -1162,7 +1223,7 @@ SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
 SWIGINTERN void 
 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
   SWIG_PYTHON_THREAD_BEGIN_BLOCK;
-  PyErr_SetString(errtype, (char *) msg);
+  PyErr_SetString(errtype, msg);
   SWIG_PYTHON_THREAD_END_BLOCK;
 }
 
@@ -1170,12 +1231,41 @@ SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
 
 /* Set a constant value */
 
+#if defined(SWIGPYTHON_BUILTIN)
+
+SWIGINTERN void
+SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
+  PyObject *s = PyString_InternFromString(key);
+  PyList_Append(seq, s);
+  Py_DECREF(s);
+}
+
+SWIGINTERN void
+SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
+#if PY_VERSION_HEX < 0x02030000
+  PyDict_SetItemString(d, (char *)name, obj);
+#else
+  PyDict_SetItemString(d, name, obj);
+#endif
+  Py_DECREF(obj);
+  if (public_interface)
+    SwigPyBuiltin_AddPublicSymbol(public_interface, name);
+}
+
+#else
+
 SWIGINTERN void
 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
-  PyDict_SetItemString(d, (char*) name, obj);
+#if PY_VERSION_HEX < 0x02030000
+  PyDict_SetItemString(d, (char *)name, obj);
+#else
+  PyDict_SetItemString(d, name, obj);
+#endif
   Py_DECREF(obj);                            
 }
 
+#endif
+
 /* Append a value to the result obj */
 
 SWIGINTERN PyObject*
@@ -1236,6 +1326,14 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
     }
   }  
   if (!PyTuple_Check(args)) {
+    if (min <= 1 && max >= 1) {
+      register int i;
+      objs[0] = args;
+      for (i = 1; i < max; ++i) {
+	objs[i] = 0;
+      }
+      return 2;
+    }
     PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
     return 0;
   } else {
@@ -1288,11 +1386,11 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
 
 #define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
 
+#define SWIG_BUILTIN_TP_INIT	    (SWIG_POINTER_OWN << 2)
+#define SWIG_BUILTIN_INIT	    (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
+
 #ifdef __cplusplus
 extern "C" {
-#if 0
-} /* cc-mode */
-#endif
 #endif
 
 /*  How to access Py_None */
@@ -1343,6 +1441,7 @@ typedef struct {
   PyObject *destroy;
   int delargs;
   int implicitconv;
+  PyTypeObject *pytype;
 } SwigPyClientData;
 
 SWIGRUNTIMEINLINE int 
@@ -1409,13 +1508,13 @@ SwigPyClientData_New(PyObject* obj)
       data->delargs = 0;
     }
     data->implicitconv = 0;
+    data->pytype = 0;
     return data;
   }
 }
 
 SWIGRUNTIME void 
-SwigPyClientData_Del(SwigPyClientData* data)
-{
+SwigPyClientData_Del(SwigPyClientData *data) {
   Py_XDECREF(data->newraw);
   Py_XDECREF(data->newargs);
   Py_XDECREF(data->destroy);
@@ -1429,6 +1528,9 @@ typedef struct {
   swig_type_info *ty;
   int own;
   PyObject *next;
+#ifdef SWIGPYTHON_BUILTIN
+  PyObject *dict;
+#endif
 } SwigPyObject;
 
 SWIGRUNTIME PyObject *
@@ -1479,21 +1581,21 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
 #endif
 {
   const char *name = SWIG_TypePrettyName(v->ty);
-  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v);
+  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
   if (v->next) {
-#ifdef METH_NOARGS
+# ifdef METH_NOARGS
     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
-#else
+# else
     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
-#endif
-#if PY_VERSION_HEX >= 0x03000000
+# endif
+# if PY_VERSION_HEX >= 0x03000000
     PyObject *joined = PyUnicode_Concat(repr, nrep);
     Py_DecRef(repr);
     Py_DecRef(nrep);
     repr = joined;
-#else
+# else
     PyString_ConcatAndDel(&repr,nrep);
-#endif
+# endif
   }
   return repr;  
 }
@@ -1543,27 +1645,43 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
     Py_INCREF(Py_NotImplemented);
     return Py_NotImplemented;
   }
-  if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) )
-    res = Py_True;
-  else
-    res = Py_False;
-  Py_INCREF(res);
+  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
   return res;  
 }
 
 
-SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
+SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
 
+#ifdef SWIGPYTHON_BUILTIN
+static swig_type_info *SwigPyObject_stype = 0;
 SWIGRUNTIME PyTypeObject*
 SwigPyObject_type(void) {
-  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
+    SwigPyClientData *cd;
+    assert(SwigPyObject_stype);
+    cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
+    assert(cd);
+    assert(cd->pytype);
+    return cd->pytype;
+}
+#else
+SWIGRUNTIME PyTypeObject*
+SwigPyObject_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
   return type;
 }
+#endif
 
 SWIGRUNTIMEINLINE int
 SwigPyObject_Check(PyObject *op) {
+#ifdef SWIGPYTHON_BUILTIN
+  PyTypeObject *target_tp = SwigPyObject_type();
+  if (PyType_IsSubtype(op->ob_type, target_tp))
+    return 1;
+  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
+#else
   return (Py_TYPE(op) == SwigPyObject_type())
     || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
+#endif
 }
 
 SWIGRUNTIME PyObject *
@@ -1667,8 +1785,10 @@ SwigPyObject_own(PyObject *v, PyObject *args)
   PyObject *val = 0;
 #if (PY_VERSION_HEX < 0x02020000)
   if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
-#else
+#elif (PY_VERSION_HEX < 0x02050000)
   if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
+#else
+  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) 
 #endif
     {
       return NULL;
@@ -1729,9 +1849,9 @@ SwigPyObject_getattr(SwigPyObject *sobj,char *name)
 #endif
 
 SWIGRUNTIME PyTypeObject*
-_PySwigObject_type(void) {
+SwigPyObject_TypeOnce(void) {
   static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
-  
+
   static PyNumberMethods SwigPyObject_as_number = {
     (binaryfunc)0, /*nb_add*/
     (binaryfunc)0, /*nb_subtract*/
@@ -1778,85 +1898,89 @@ _PySwigObject_type(void) {
 #endif
   };
 
-  static PyTypeObject swigpyobject_type;  
+  static PyTypeObject swigpyobject_type;
   static int type_init = 0;
   if (!type_init) {
-    const PyTypeObject tmp
-      = {
-	/* PyObject header changed in Python 3 */
+    const PyTypeObject tmp = {
+      /* PyObject header changed in Python 3 */
 #if PY_VERSION_HEX >= 0x03000000
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-#else    
-	PyObject_HEAD_INIT(NULL)
-	0,				    /* ob_size */
+      PyVarObject_HEAD_INIT(NULL, 0)
+#else
+      PyObject_HEAD_INIT(NULL)
+      0,                                    /* ob_size */
 #endif
-	(char *)"SwigPyObject",		    /* tp_name */
-	sizeof(SwigPyObject),		    /* tp_basicsize */
-	0,			            /* tp_itemsize */
-	(destructor)SwigPyObject_dealloc,   /* tp_dealloc */
-	(printfunc)SwigPyObject_print,	    /* tp_print */
+      (char *)"SwigPyObject",               /* tp_name */
+      sizeof(SwigPyObject),                 /* tp_basicsize */
+      0,                                    /* tp_itemsize */
+      (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
+      (printfunc)SwigPyObject_print,        /* tp_print */
 #if PY_VERSION_HEX < 0x02020000
-	(getattrfunc)SwigPyObject_getattr,  /* tp_getattr */ 
+      (getattrfunc)SwigPyObject_getattr,    /* tp_getattr */
 #else
-	(getattrfunc)0,			    /* tp_getattr */ 
+      (getattrfunc)0,                       /* tp_getattr */
 #endif
-	(setattrfunc)0,			    /* tp_setattr */ 
+      (setattrfunc)0,                       /* tp_setattr */
 #if PY_VERSION_HEX >= 0x03000000
     0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
 #else
-	(cmpfunc)SwigPyObject_compare,	    /* tp_compare */
+      (cmpfunc)SwigPyObject_compare,        /* tp_compare */
 #endif
-	(reprfunc)SwigPyObject_repr,	    /* tp_repr */    
-	&SwigPyObject_as_number,	    /* tp_as_number */
-	0,				    /* tp_as_sequence */
-	0,				    /* tp_as_mapping */
-	(hashfunc)0,			    /* tp_hash */
-	(ternaryfunc)0,			    /* tp_call */
-	(reprfunc)SwigPyObject_str,	    /* tp_str */
-	PyObject_GenericGetAttr,            /* tp_getattro */
-	0,				    /* tp_setattro */
-	0,		                    /* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
-	swigobject_doc, 	            /* tp_doc */        
-	0,                                  /* tp_traverse */
-	0,                                  /* tp_clear */
-	(richcmpfunc)SwigPyObject_richcompare,           /* tp_richcompare */
-	0,                                  /* tp_weaklistoffset */
+      (reprfunc)SwigPyObject_repr,          /* tp_repr */
+      &SwigPyObject_as_number,              /* tp_as_number */
+      0,                                    /* tp_as_sequence */
+      0,                                    /* tp_as_mapping */
+      (hashfunc)0,                          /* tp_hash */
+      (ternaryfunc)0,                       /* tp_call */
+      (reprfunc)SwigPyObject_str,           /* tp_str */
+      PyObject_GenericGetAttr,              /* tp_getattro */
+      0,                                    /* tp_setattro */
+      0,                                    /* tp_as_buffer */
+      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
+      swigobject_doc,                       /* tp_doc */
+      0,                                    /* tp_traverse */
+      0,                                    /* tp_clear */
+      (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
+      0,                                    /* tp_weaklistoffset */
 #if PY_VERSION_HEX >= 0x02020000
-	0,                                  /* tp_iter */
-	0,                                  /* tp_iternext */
-	swigobject_methods,		    /* tp_methods */ 
-	0,			            /* tp_members */
-	0,				    /* tp_getset */	    	
-	0,			            /* tp_base */	        
-	0,				    /* tp_dict */	    	
-	0,				    /* tp_descr_get */  	
-	0,				    /* tp_descr_set */  	
-	0,				    /* tp_dictoffset */ 	
-	0,				    /* tp_init */	    	
-	0,				    /* tp_alloc */	    	
-	0,			            /* tp_new */	    	
-	0,	                            /* tp_free */	   
-	0,                                  /* tp_is_gc */  
-	0,				    /* tp_bases */   
-	0,				    /* tp_mro */
-	0,				    /* tp_cache */   
-	0,				    /* tp_subclasses */
-	0,				    /* tp_weaklist */
+      0,                                    /* tp_iter */
+      0,                                    /* tp_iternext */
+      swigobject_methods,                   /* tp_methods */
+      0,                                    /* tp_members */
+      0,                                    /* tp_getset */
+      0,                                    /* tp_base */
+      0,                                    /* tp_dict */
+      0,                                    /* tp_descr_get */
+      0,                                    /* tp_descr_set */
+      0,                                    /* tp_dictoffset */
+      0,                                    /* tp_init */
+      0,                                    /* tp_alloc */
+      0,                                    /* tp_new */
+      0,                                    /* tp_free */
+      0,                                    /* tp_is_gc */
+      0,                                    /* tp_bases */
+      0,                                    /* tp_mro */
+      0,                                    /* tp_cache */
+      0,                                    /* tp_subclasses */
+      0,                                    /* tp_weaklist */
 #endif
 #if PY_VERSION_HEX >= 0x02030000
-	0,                                  /* tp_del */
+      0,                                    /* tp_del */
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+      0,                                    /* tp_version */
 #endif
 #ifdef COUNT_ALLOCS
-	0,0,0,0                             /* tp_alloc -> tp_next */
+      0,0,0,0                               /* tp_alloc -> tp_next */
 #endif
-      };
+    };
     swigpyobject_type = tmp;
-    /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
-#if PY_VERSION_HEX < 0x03000000
+    type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
     swigpyobject_type.ob_type = &PyType_Type;
+#else
+    if (PyType_Ready(&swigpyobject_type) < 0)
+      return NULL;
 #endif
-    type_init = 1;
   }
   return &swigpyobject_type;
 }
@@ -1930,17 +2054,17 @@ SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
   return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
 }
 
-SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
+SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
 
 SWIGRUNTIME PyTypeObject*
 SwigPyPacked_type(void) {
-  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
   return type;
 }
 
 SWIGRUNTIMEINLINE int
 SwigPyPacked_Check(PyObject *op) {
-  return ((op)->ob_type == _PySwigPacked_type()) 
+  return ((op)->ob_type == SwigPyPacked_TypeOnce()) 
     || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
 }
 
@@ -1955,83 +2079,87 @@ SwigPyPacked_dealloc(PyObject *v)
 }
 
 SWIGRUNTIME PyTypeObject*
-_PySwigPacked_type(void) {
+SwigPyPacked_TypeOnce(void) {
   static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
   static PyTypeObject swigpypacked_type;
-  static int type_init = 0;  
+  static int type_init = 0;
   if (!type_init) {
-    const PyTypeObject tmp
-      = {
-    /* PyObject header changed in Python 3 */
+    const PyTypeObject tmp = {
+      /* PyObject header changed in Python 3 */
 #if PY_VERSION_HEX>=0x03000000
-    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+      PyVarObject_HEAD_INIT(NULL, 0)
 #else
-	PyObject_HEAD_INIT(NULL)
-    0,				    /* ob_size */	
+      PyObject_HEAD_INIT(NULL)
+      0,                                    /* ob_size */
 #endif
-	(char *)"SwigPyPacked",		    /* tp_name */	
-	sizeof(SwigPyPacked),		    /* tp_basicsize */	
-	0,				    /* tp_itemsize */	
-	(destructor)SwigPyPacked_dealloc,   /* tp_dealloc */	
-	(printfunc)SwigPyPacked_print,	    /* tp_print */   	
-	(getattrfunc)0,			    /* tp_getattr */ 	
-	(setattrfunc)0,			    /* tp_setattr */ 	
+      (char *)"SwigPyPacked",               /* tp_name */
+      sizeof(SwigPyPacked),                 /* tp_basicsize */
+      0,                                    /* tp_itemsize */
+      (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
+      (printfunc)SwigPyPacked_print,        /* tp_print */
+      (getattrfunc)0,                       /* tp_getattr */
+      (setattrfunc)0,                       /* tp_setattr */
 #if PY_VERSION_HEX>=0x03000000
-    0, /* tp_reserved in 3.0.1 */
+      0, /* tp_reserved in 3.0.1 */
 #else
-    (cmpfunc)SwigPyPacked_compare,	    /* tp_compare */
+      (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
 #endif
-	(reprfunc)SwigPyPacked_repr,	    /* tp_repr */
-	0,	                            /* tp_as_number */
-	0,				    /* tp_as_sequence */
-	0,				    /* tp_as_mapping */
-	(hashfunc)0,			    /* tp_hash */
-	(ternaryfunc)0,			    /* tp_call */
-	(reprfunc)SwigPyPacked_str,	    /* tp_str */
-	PyObject_GenericGetAttr,            /* tp_getattro */
-	0,				    /* tp_setattro */
-	0,		                    /* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
-	swigpacked_doc, 	            /* tp_doc */
-	0,                                  /* tp_traverse */
-	0,                                  /* tp_clear */
-	0,                                  /* tp_richcompare */
-	0,                                  /* tp_weaklistoffset */
+      (reprfunc)SwigPyPacked_repr,          /* tp_repr */
+      0,                                    /* tp_as_number */
+      0,                                    /* tp_as_sequence */
+      0,                                    /* tp_as_mapping */
+      (hashfunc)0,                          /* tp_hash */
+      (ternaryfunc)0,                       /* tp_call */
+      (reprfunc)SwigPyPacked_str,           /* tp_str */
+      PyObject_GenericGetAttr,              /* tp_getattro */
+      0,                                    /* tp_setattro */
+      0,                                    /* tp_as_buffer */
+      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
+      swigpacked_doc,                       /* tp_doc */
+      0,                                    /* tp_traverse */
+      0,                                    /* tp_clear */
+      0,                                    /* tp_richcompare */
+      0,                                    /* tp_weaklistoffset */
 #if PY_VERSION_HEX >= 0x02020000
-	0,                                  /* tp_iter */
-	0,                                  /* tp_iternext */
-	0,		                    /* tp_methods */ 
-	0,			            /* tp_members */
-	0,				    /* tp_getset */	    	
-	0,			            /* tp_base */	        
-	0,				    /* tp_dict */	    	
-	0,				    /* tp_descr_get */  	
-	0,				    /* tp_descr_set */  	
-	0,				    /* tp_dictoffset */ 	
-	0,				    /* tp_init */	    	
-	0,				    /* tp_alloc */	    	
-	0,			            /* tp_new */	    	
-	0, 	                            /* tp_free */	   
-        0,                                  /* tp_is_gc */  
-	0,				    /* tp_bases */   
-	0,				    /* tp_mro */
-	0,				    /* tp_cache */   
- 	0,				    /* tp_subclasses */
-	0,				    /* tp_weaklist */
+      0,                                    /* tp_iter */
+      0,                                    /* tp_iternext */
+      0,                                    /* tp_methods */
+      0,                                    /* tp_members */
+      0,                                    /* tp_getset */
+      0,                                    /* tp_base */
+      0,                                    /* tp_dict */
+      0,                                    /* tp_descr_get */
+      0,                                    /* tp_descr_set */
+      0,                                    /* tp_dictoffset */
+      0,                                    /* tp_init */
+      0,                                    /* tp_alloc */
+      0,                                    /* tp_new */
+      0,                                    /* tp_free */
+      0,                                    /* tp_is_gc */
+      0,                                    /* tp_bases */
+      0,                                    /* tp_mro */
+      0,                                    /* tp_cache */
+      0,                                    /* tp_subclasses */
+      0,                                    /* tp_weaklist */
 #endif
 #if PY_VERSION_HEX >= 0x02030000
-	0,                                  /* tp_del */
+      0,                                    /* tp_del */
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+      0,                                    /* tp_version */
 #endif
 #ifdef COUNT_ALLOCS
-	0,0,0,0                             /* tp_alloc -> tp_next */
+      0,0,0,0                               /* tp_alloc -> tp_next */
 #endif
-      };
+    };
     swigpypacked_type = tmp;
-    /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */
-#if PY_VERSION_HEX < 0x03000000
+    type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
     swigpypacked_type.ob_type = &PyType_Type;
+#else
+    if (PyType_Ready(&swigpypacked_type) < 0)
+      return NULL;
 #endif
-    type_init = 1;
   }
   return &swigpypacked_type;
 }
@@ -2098,50 +2226,65 @@ SWIG_This(void)
 SWIGRUNTIME SwigPyObject *
 SWIG_Python_GetSwigThis(PyObject *pyobj) 
 {
-  if (SwigPyObject_Check(pyobj)) {
+  PyObject *obj;
+
+  if (SwigPyObject_Check(pyobj))
     return (SwigPyObject *) pyobj;
-  } else {
-    PyObject *obj = 0;
+
+#ifdef SWIGPYTHON_BUILTIN
+  (void)obj;
+# ifdef PyWeakref_CheckProxy
+  if (PyWeakref_CheckProxy(pyobj)) {
+    pyobj = PyWeakref_GET_OBJECT(pyobj);
+    if (pyobj && SwigPyObject_Check(pyobj))
+      return (SwigPyObject*) pyobj;
+  }
+# endif
+  return NULL;
+#else
+
+  obj = 0;
+
 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
-    if (PyInstance_Check(pyobj)) {
-      obj = _PyInstance_Lookup(pyobj, SWIG_This());      
+  if (PyInstance_Check(pyobj)) {
+    obj = _PyInstance_Lookup(pyobj, SWIG_This());      
+  } else {
+    PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
+    if (dictptr != NULL) {
+      PyObject *dict = *dictptr;
+      obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
     } else {
-      PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
-      if (dictptr != NULL) {
-	PyObject *dict = *dictptr;
-	obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
-      } else {
 #ifdef PyWeakref_CheckProxy
-	if (PyWeakref_CheckProxy(pyobj)) {
-	  PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
-	  return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
-	}
+      if (PyWeakref_CheckProxy(pyobj)) {
+	PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
+	return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
+      }
 #endif
-	obj = PyObject_GetAttr(pyobj,SWIG_This());
-	if (obj) {
-	  Py_DECREF(obj);
-	} else {
-	  if (PyErr_Occurred()) PyErr_Clear();
-	  return 0;
-	}
+      obj = PyObject_GetAttr(pyobj,SWIG_This());
+      if (obj) {
+	Py_DECREF(obj);
+      } else {
+	if (PyErr_Occurred()) PyErr_Clear();
+	return 0;
       }
     }
+  }
 #else
-    obj = PyObject_GetAttr(pyobj,SWIG_This());
-    if (obj) {
-      Py_DECREF(obj);
-    } else {
-      if (PyErr_Occurred()) PyErr_Clear();
-      return 0;
-    }
+  obj = PyObject_GetAttr(pyobj,SWIG_This());
+  if (obj) {
+    Py_DECREF(obj);
+  } else {
+    if (PyErr_Occurred()) PyErr_Clear();
+    return 0;
+  }
 #endif
-    if (obj && !SwigPyObject_Check(obj)) {
-      /* a PyObject is called 'this', try to get the 'real this'
-	 SwigPyObject from it */ 
-      return SWIG_Python_GetSwigThis(obj);
-    }
-    return (SwigPyObject *)obj;
+  if (obj && !SwigPyObject_Check(obj)) {
+    /* a PyObject is called 'this', try to get the 'real this'
+       SwigPyObject from it */ 
+    return SWIG_Python_GetSwigThis(obj);
   }
+  return (SwigPyObject *)obj;
+#endif
 }
 
 /* Acquire a pointer value */
@@ -2163,91 +2306,97 @@ SWIG_Python_AcquirePtr(PyObject *obj, int own) {
 
 SWIGRUNTIME int
 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
-  if (!obj) return SWIG_ERROR;
+  int res;
+  SwigPyObject *sobj;
+
+  if (!obj)
+    return SWIG_ERROR;
   if (obj == Py_None) {
-    if (ptr) *ptr = 0;
+    if (ptr)
+      *ptr = 0;
     return SWIG_OK;
-  } else {
-    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
-    if (own)
-      *own = 0;
-    while (sobj) {
-      void *vptr = sobj->ptr;
-      if (ty) {
-	swig_type_info *to = sobj->ty;
-	if (to == ty) {
-	  /* no type cast needed */
-	  if (ptr) *ptr = vptr;
-	  break;
-	} else {
-	  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
-	  if (!tc) {
-	    sobj = (SwigPyObject *)sobj->next;
-	  } else {
-	    if (ptr) {
-              int newmemory = 0;
-              *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
-              if (newmemory == SWIG_CAST_NEW_MEMORY) {
-                assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
-                if (own)
-                  *own = *own | SWIG_CAST_NEW_MEMORY;
-              }
-            }
-	    break;
-	  }
-	}
+  }
+
+  res = SWIG_ERROR;
+
+  sobj = SWIG_Python_GetSwigThis(obj);
+  if (own)
+    *own = 0;
+  while (sobj) {
+    void *vptr = sobj->ptr;
+    if (ty) {
+      swig_type_info *to = sobj->ty;
+      if (to == ty) {
+        /* no type cast needed */
+        if (ptr) *ptr = vptr;
+        break;
       } else {
-	if (ptr) *ptr = vptr;
-	break;
-      }
-    }
-    if (sobj) {
-      if (own)
-        *own = *own | sobj->own;
-      if (flags & SWIG_POINTER_DISOWN) {
-	sobj->own = 0;
+        swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+        if (!tc) {
+          sobj = (SwigPyObject *)sobj->next;
+        } else {
+          if (ptr) {
+            int newmemory = 0;
+            *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+            if (newmemory == SWIG_CAST_NEW_MEMORY) {
+              assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
+              if (own)
+                *own = *own | SWIG_CAST_NEW_MEMORY;
+            }
+          }
+          break;
+        }
       }
-      return SWIG_OK;
     } else {
-      int res = SWIG_ERROR;
-      if (flags & SWIG_POINTER_IMPLICIT_CONV) {
-	SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
-	if (data && !data->implicitconv) {
-	  PyObject *klass = data->klass;
-	  if (klass) {
-	    PyObject *impconv;
-	    data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
-	    impconv = SWIG_Python_CallFunctor(klass, obj);
-	    data->implicitconv = 0;
-	    if (PyErr_Occurred()) {
-	      PyErr_Clear();
-	      impconv = 0;
-	    }
-	    if (impconv) {
-	      SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
-	      if (iobj) {
-		void *vptr;
-		res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
-		if (SWIG_IsOK(res)) {
-		  if (ptr) {
-		    *ptr = vptr;
-		    /* transfer the ownership to 'ptr' */
-		    iobj->own = 0;
-		    res = SWIG_AddCast(res);
-		    res = SWIG_AddNewMask(res);
-		  } else {
-		    res = SWIG_AddCast(res);		    
-		  }
-		}
-	      }
-	      Py_DECREF(impconv);
-	    }
-	  }
-	}
+      if (ptr) *ptr = vptr;
+      break;
+    }
+  }
+  if (sobj) {
+    if (own)
+      *own = *own | sobj->own;
+    if (flags & SWIG_POINTER_DISOWN) {
+      sobj->own = 0;
+    }
+    res = SWIG_OK;
+  } else {
+    if (flags & SWIG_POINTER_IMPLICIT_CONV) {
+      SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
+      if (data && !data->implicitconv) {
+        PyObject *klass = data->klass;
+        if (klass) {
+          PyObject *impconv;
+          data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
+          impconv = SWIG_Python_CallFunctor(klass, obj);
+          data->implicitconv = 0;
+          if (PyErr_Occurred()) {
+            PyErr_Clear();
+            impconv = 0;
+          }
+          if (impconv) {
+            SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
+            if (iobj) {
+              void *vptr;
+              res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
+              if (SWIG_IsOK(res)) {
+                if (ptr) {
+                  *ptr = vptr;
+                  /* transfer the ownership to 'ptr' */
+                  iobj->own = 0;
+                  res = SWIG_AddCast(res);
+                  res = SWIG_AddNewMask(res);
+                } else {
+                  res = SWIG_AddCast(res);		    
+                }
+              }
+            }
+            Py_DECREF(impconv);
+          }
+        }
       }
-      return res;
     }
   }
+  return res;
 }
 
 /* Convert a function ptr value */
@@ -2401,7 +2550,7 @@ SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
 SWIGINTERN PyObject *
 SWIG_Python_InitShadowInstance(PyObject *args) {
   PyObject *obj[2];
-  if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
+  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
     return NULL;
   } else {
     SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
@@ -2417,22 +2566,54 @@ SWIG_Python_InitShadowInstance(PyObject *args) {
 /* Create a new pointer object */
 
 SWIGRUNTIME PyObject *
-SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
-  if (!ptr) {
+SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
+  SwigPyClientData *clientdata;
+  PyObject * robj;
+  int own;
+
+  if (!ptr)
     return SWIG_Py_Void();
-  } else {
-    int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
-    PyObject *robj = SwigPyObject_New(ptr, type, own);
-    SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
-    if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
-      PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
-      if (inst) {
-	Py_DECREF(robj);
-	robj = inst;
+
+  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
+  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
+  if (clientdata && clientdata->pytype) {
+    SwigPyObject *newobj;
+    if (flags & SWIG_BUILTIN_TP_INIT) {
+      newobj = (SwigPyObject*) self;
+      if (newobj->ptr) {
+        PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
+        while (newobj->next)
+	  newobj = (SwigPyObject *) newobj->next;
+        newobj->next = next_self;
+        newobj = (SwigPyObject *)next_self;
       }
+    } else {
+      newobj = PyObject_New(SwigPyObject, clientdata->pytype);
+    }
+    if (newobj) {
+      newobj->ptr = ptr;
+      newobj->ty = type;
+      newobj->own = own;
+      newobj->next = 0;
+#ifdef SWIGPYTHON_BUILTIN
+      newobj->dict = 0;
+#endif
+      return (PyObject*) newobj;
     }
-    return robj;
+    return SWIG_Py_Void();
   }
+
+  assert(!(flags & SWIG_BUILTIN_TP_INIT));
+
+  robj = SwigPyObject_New(ptr, type, own);
+  if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
+    PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
+    if (inst) {
+      Py_DECREF(robj);
+      robj = inst;
+    }
+  }
+  return robj;
 }
 
 /* Create a new packed object */
@@ -2458,12 +2639,12 @@ SWIG_Python_GetModule(void) {
 #ifdef SWIG_LINK_RUNTIME
     type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
 #else
-#ifdef USE_CAPSULES
-    type_pointer = PyCapsule_Import(TYPE_POINTER_NAME, 0);
-#else
+# ifdef SWIGPY_USE_CAPSULE
+    type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
+# else
     type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
 				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
-#endif
+# endif
     if (PyErr_Occurred()) {
       PyErr_Clear();
       type_pointer = (void *)0;
@@ -2506,16 +2687,19 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o)
 #endif
 
 SWIGRUNTIME void
+#ifdef SWIGPY_USE_CAPSULE
+SWIG_Python_DestroyModule(PyObject *obj)
+#else
 SWIG_Python_DestroyModule(void *vptr)
+#endif
 {
-  size_t i;
-#ifdef USE_CAPSULES
-  swig_module_info *swig_module =
-    (swig_module_info *) PyCapsule_GetPointer((PyObject *)vptr, TYPE_POINTER_NAME);
+#ifdef SWIGPY_USE_CAPSULE
+  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
 #else
   swig_module_info *swig_module = (swig_module_info *) vptr;
 #endif
   swig_type_info **types = swig_module->types;
+  size_t i;
   for (i =0; i < swig_module->size; ++i) {
     swig_type_info *ty = types[i];
     if (ty->owndata) {
@@ -2529,30 +2713,28 @@ SWIG_Python_DestroyModule(void *vptr)
 
 SWIGRUNTIME void
 SWIG_Python_SetModule(swig_module_info *swig_module) {
-  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
-
 #if PY_VERSION_HEX >= 0x03000000
  /* Add a dummy module object into sys.modules */
   PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
 #else
-  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
-				   swig_empty_runtime_method_table);
-#endif
-#ifdef USE_CAPSULES
-  PyObject *pointer = PyCapsule_New((void *)swig_module, TYPE_POINTER_NAME,
-				    (PyCapsule_Destructor)SWIG_Python_DestroyModule);
-#else
-  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
+  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
 #endif
+#ifdef SWIGPY_USE_CAPSULE
+  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
   if (pointer && module) {
-#ifdef USE_CAPSULES
     PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
+  } else {
+    Py_XDECREF(pointer);
+  }
 #else
+  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+  if (pointer && module) {
     PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
-#endif
   } else {
     Py_XDECREF(pointer);
   }
+#endif
 }
 
 /* The python cached type query */
@@ -2570,8 +2752,8 @@ SWIG_Python_TypeQuery(const char *type)
   PyObject *obj = PyDict_GetItem(cache, key);
   swig_type_info *descriptor;
   if (obj) {
-#ifdef USE_CAPSULES
-    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, type);
+#ifdef SWIGPY_USE_CAPSULE
+    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
 #else
     descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
 #endif
@@ -2579,8 +2761,8 @@ SWIG_Python_TypeQuery(const char *type)
     swig_module_info *swig_module = SWIG_Python_GetModule();
     descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
     if (descriptor) {
-#ifdef USE_CAPSULES
-      obj = PyCapsule_New(descriptor, type, NULL);
+#ifdef SWIGPY_USE_CAPSULE
+      obj = PyCapsule_New((void*) descriptor, NULL, NULL);
 #else
       obj = PyCObject_FromVoidPtr(descriptor, NULL);
 #endif
@@ -2644,7 +2826,7 @@ SwigPyObject_GetDesc(PyObject *self)
 {
   SwigPyObject *v = (SwigPyObject *)self;
   swig_type_info *ty = v ? v->ty : 0;
-  return ty ? ty->str : (char*)"";
+  return ty ? ty->str : "";
 }
 
 SWIGRUNTIME void
@@ -2687,7 +2869,7 @@ SWIG_Python_TypeError(const char *type, PyObject *obj)
 
 /* Convert a pointer value, signal an exception on a type mismatch */
 SWIGRUNTIME void *
-SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
+SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
   void *result;
   if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
     PyErr_Clear();
@@ -2701,11 +2883,62 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags)
   return result;
 }
 
+#ifdef SWIGPYTHON_BUILTIN
+SWIGRUNTIME int
+SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
+  PyTypeObject *tp = obj->ob_type;
+  PyObject *descr;
+  PyObject *encoded_name;
+  descrsetfunc f;
+  int res;
 
-#ifdef __cplusplus
-#if 0
-{ /* cc-mode */
+# ifdef Py_USING_UNICODE
+  if (PyString_Check(name)) {
+    name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
+    if (!name)
+      return -1;
+  } else if (!PyUnicode_Check(name))
+# else
+  if (!PyString_Check(name))
+# endif
+  {
+    PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
+    return -1;
+  } else {
+    Py_INCREF(name);
+  }
+
+  if (!tp->tp_dict) {
+    if (PyType_Ready(tp) < 0)
+      goto done;
+  }
+
+  res = -1;
+  descr = _PyType_Lookup(tp, name);
+  f = NULL;
+  if (descr != NULL)
+    f = descr->ob_type->tp_descr_set;
+  if (!f) {
+    if (PyString_Check(name)) {
+      encoded_name = name;
+      Py_INCREF(name);
+    } else {
+      encoded_name = PyUnicode_AsUTF8String(name);
+    }
+    PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
+    Py_DECREF(encoded_name);
+  } else {
+    res = f(descr, obj, value);
+  }
+  
+  done:
+  Py_DECREF(name);
+  return res;
+}
 #endif
+
+
+#ifdef __cplusplus
 }
 #endif
 
@@ -2759,7 +2992,7 @@ static swig_module_info swig_module = {swig_types, 15, 0, 0, 0, 0};
 #endif
 #define SWIG_name    "_csr"
 
-#define SWIGVERSION 0x020001 
+#define SWIGVERSION 0x020007 
 #define SWIG_VERSION SWIGVERSION
 
 
@@ -3305,13 +3538,10 @@ SWIG_AsVal_int (PyObject * obj, int *val)
 }
 
 
-  #define SWIG_From_long   PyInt_FromLong 
-
-
-SWIGINTERNINLINE PyObject *
-SWIG_From_int  (int value)
-{    
-  return SWIG_From_long  (value);
+SWIGINTERNINLINE PyObject*
+  SWIG_From_int  (int value)
+{
+  return PyInt_FromLong((long) value);
 }
 
 
@@ -5224,8 +5454,8 @@ SWIGINTERN PyObject *_wrap_csr_diagonal(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 6); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 6) {
@@ -5750,7 +5980,7 @@ fail:
     "    csr_diagonal< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper [])\n"
     "    csr_diagonal< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper [])\n"
     "    csr_diagonal< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -7300,8 +7530,8 @@ SWIGINTERN PyObject *_wrap_csr_scale_rows(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 6); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 6) {
@@ -7826,7 +8056,7 @@ fail:
     "    csr_scale_rows< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper [],npy_cfloat_wrapper const [])\n"
     "    csr_scale_rows< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper [],npy_cdouble_wrapper const [])\n"
     "    csr_scale_rows< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper [],npy_clongdouble_wrapper const [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -9376,8 +9606,8 @@ SWIGINTERN PyObject *_wrap_csr_scale_columns(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 6); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 6) {
@@ -9902,7 +10132,7 @@ fail:
     "    csr_scale_columns< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper [],npy_cfloat_wrapper const [])\n"
     "    csr_scale_columns< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper [],npy_cdouble_wrapper const [])\n"
     "    csr_scale_columns< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper [],npy_clongdouble_wrapper const [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -11676,8 +11906,8 @@ SWIGINTERN PyObject *_wrap_csr_tocsc(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 8); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 8) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 8) {
@@ -12342,7 +12572,7 @@ fail:
     "    csr_tocsc< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    csr_tocsc< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    csr_tocsc< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -14368,8 +14598,8 @@ SWIGINTERN PyObject *_wrap_csr_tobsr(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 10); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 10) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 10) {
@@ -15202,7 +15432,7 @@ fail:
     "    csr_tobsr< int,npy_cfloat_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    csr_tobsr< int,npy_cdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    csr_tobsr< int,npy_clongdouble_wrapper >(int const,int const,int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -17984,8 +18214,8 @@ SWIGINTERN PyObject *_wrap_csr_matmat_pass2(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 11); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 11) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 11) {
@@ -18860,7 +19090,7 @@ fail:
     "    csr_matmat_pass2< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    csr_matmat_pass2< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    csr_matmat_pass2< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -20746,8 +20976,8 @@ SWIGINTERN PyObject *_wrap_csr_matvec(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 7); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 7) {
@@ -21342,7 +21572,7 @@ fail:
     "    csr_matvec< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper [])\n"
     "    csr_matvec< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper [])\n"
     "    csr_matvec< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],npy_clongdouble_wrapper const [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -23354,8 +23584,8 @@ SWIGINTERN PyObject *_wrap_csr_matvecs(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 8); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 8) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 8) {
@@ -24034,7 +24264,7 @@ fail:
     "    csr_matvecs< int,npy_cfloat_wrapper >(int const,int const,int const,int const [],int const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper [])\n"
     "    csr_matvecs< int,npy_cdouble_wrapper >(int const,int const,int const,int const [],int const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper [])\n"
     "    csr_matvecs< int,npy_clongdouble_wrapper >(int const,int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],npy_clongdouble_wrapper const [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -26816,8 +27046,8 @@ SWIGINTERN PyObject *_wrap_csr_elmul_csr(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 11); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 11) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 11) {
@@ -27692,7 +27922,7 @@ fail:
     "    csr_elmul_csr< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    csr_elmul_csr< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    csr_elmul_csr< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -30474,8 +30704,8 @@ SWIGINTERN PyObject *_wrap_csr_eldiv_csr(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 11); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 11) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 11) {
@@ -31350,7 +31580,7 @@ fail:
     "    csr_eldiv_csr< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    csr_eldiv_csr< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    csr_eldiv_csr< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -34132,8 +34362,8 @@ SWIGINTERN PyObject *_wrap_csr_plus_csr(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 11); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 11) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 11) {
@@ -35008,7 +35238,7 @@ fail:
     "    csr_plus_csr< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    csr_plus_csr< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    csr_plus_csr< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -37790,8 +38020,8 @@ SWIGINTERN PyObject *_wrap_csr_minus_csr(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 11); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 11) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 11) {
@@ -38666,7 +38896,7 @@ fail:
     "    csr_minus_csr< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const [],int const [],npy_cfloat_wrapper const [],int [],int [],npy_cfloat_wrapper [])\n"
     "    csr_minus_csr< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const [],int const [],npy_cdouble_wrapper const [],int [],int [],npy_cdouble_wrapper [])\n"
     "    csr_minus_csr< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int const [],int const [],npy_clongdouble_wrapper const [],int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -39530,8 +39760,8 @@ SWIGINTERN PyObject *_wrap_csr_sort_indices(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 4); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 4) {
@@ -39902,7 +40132,7 @@ fail:
     "    csr_sort_indices< int,npy_cfloat_wrapper >(int const,int const [],int [],npy_cfloat_wrapper [])\n"
     "    csr_sort_indices< int,npy_cdouble_wrapper >(int const,int const [],int [],npy_cdouble_wrapper [])\n"
     "    csr_sort_indices< int,npy_clongdouble_wrapper >(int const,int const [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -40668,8 +40898,8 @@ SWIGINTERN PyObject *_wrap_csr_eliminate_zeros(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 5); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 5) {
@@ -41124,7 +41354,7 @@ fail:
     "    csr_eliminate_zeros< int,npy_cfloat_wrapper >(int const,int const,int [],int [],npy_cfloat_wrapper [])\n"
     "    csr_eliminate_zeros< int,npy_cdouble_wrapper >(int const,int const,int [],int [],npy_cdouble_wrapper [])\n"
     "    csr_eliminate_zeros< int,npy_clongdouble_wrapper >(int const,int const,int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -41890,8 +42120,8 @@ SWIGINTERN PyObject *_wrap_csr_sum_duplicates(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 5); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 5) {
@@ -42346,7 +42576,7 @@ fail:
     "    csr_sum_duplicates< int,npy_cfloat_wrapper >(int const,int const,int [],int [],npy_cfloat_wrapper [])\n"
     "    csr_sum_duplicates< int,npy_cdouble_wrapper >(int const,int const,int [],int [],npy_cdouble_wrapper [])\n"
     "    csr_sum_duplicates< int,npy_clongdouble_wrapper >(int const,int const,int [],int [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -44918,8 +45148,8 @@ SWIGINTERN PyObject *_wrap_get_csr_submatrix(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 9); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 9) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 9) {
@@ -45710,7 +45940,7 @@ fail:
     "    get_csr_submatrix< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const,int const,int const,int const,std::vector< int > *,std::vector< int > *,std::vector< npy_cfloat_wrapper > *)\n"
     "    get_csr_submatrix< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const,int const,int const,int const,std::vector< int > *,std::vector< int > *,std::vector< npy_cdouble_wrapper > *)\n"
     "    get_csr_submatrix< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int const,int const,int const,int const,std::vector< int > *,std::vector< int > *,std::vector< npy_clongdouble_wrapper > *)\n");
-  return NULL;
+  return 0;
 }
 
 
@@ -48058,8 +48288,8 @@ SWIGINTERN PyObject *_wrap_csr_sample_values(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 9); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 9) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 9) {
@@ -48808,530 +49038,557 @@ fail:
     "    csr_sample_values< int,npy_cfloat_wrapper >(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const,int const [],int const [],npy_cfloat_wrapper [])\n"
     "    csr_sample_values< int,npy_cdouble_wrapper >(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const,int const [],int const [],npy_cdouble_wrapper [])\n"
     "    csr_sample_values< int,npy_clongdouble_wrapper >(int const,int const,int const [],int const [],npy_clongdouble_wrapper const [],int const,int const [],int const [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
 static PyMethodDef SwigMethods[] = {
 	 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
-	 { (char *)"expandptr", _wrap_expandptr, METH_VARARGS, (char *)"expandptr(int n_row, int Ap, int Bi)"},
+	 { (char *)"expandptr", _wrap_expandptr, METH_VARARGS, (char *)"expandptr(int const n_row, int const [] Ap, int [] Bi)"},
 	 { (char *)"csr_matmat_pass1", _wrap_csr_matmat_pass1, METH_VARARGS, (char *)"\n"
-		"csr_matmat_pass1(int n_row, int n_col, int Ap, int Aj, int Bp, int Bj, \n"
-		"    int Cp)\n"
+		"csr_matmat_pass1(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Bp, \n"
+		"    int const [] Bj, int [] Cp)\n"
 		""},
-	 { (char *)"csr_count_blocks", _wrap_csr_count_blocks, METH_VARARGS, (char *)"csr_count_blocks(int n_row, int n_col, int R, int C, int Ap, int Aj) -> int"},
-	 { (char *)"csr_has_sorted_indices", _wrap_csr_has_sorted_indices, METH_VARARGS, (char *)"csr_has_sorted_indices(int n_row, int Ap, int Aj) -> bool"},
+	 { (char *)"csr_count_blocks", _wrap_csr_count_blocks, METH_VARARGS, (char *)"csr_count_blocks(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj) -> int"},
+	 { (char *)"csr_has_sorted_indices", _wrap_csr_has_sorted_indices, METH_VARARGS, (char *)"csr_has_sorted_indices(int const n_row, int const [] Ap, int const [] Aj) -> bool"},
 	 { (char *)"csr_diagonal", _wrap_csr_diagonal, METH_VARARGS, (char *)"\n"
-		"csr_diagonal(int n_row, int n_col, int Ap, int Aj, signed char Ax, \n"
-		"    signed char Yx)\n"
-		"csr_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, \n"
-		"    unsigned char Yx)\n"
-		"csr_diagonal(int n_row, int n_col, int Ap, int Aj, short Ax, short Yx)\n"
-		"csr_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, \n"
-		"    unsigned short Yx)\n"
-		"csr_diagonal(int n_row, int n_col, int Ap, int Aj, int Ax, int Yx)\n"
-		"csr_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, \n"
-		"    unsigned int Yx)\n"
-		"csr_diagonal(int n_row, int n_col, int Ap, int Aj, long long Ax, \n"
-		"    long long Yx)\n"
-		"csr_diagonal(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, \n"
-		"    unsigned long long Yx)\n"
-		"csr_diagonal(int n_row, int n_col, int Ap, int Aj, float Ax, float Yx)\n"
-		"csr_diagonal(int n_row, int n_col, int Ap, int Aj, double Ax, double Yx)\n"
-		"csr_diagonal(int n_row, int n_col, int Ap, int Aj, long double Ax, \n"
-		"    long double Yx)\n"
-		"csr_diagonal(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
-		"    npy_cfloat_wrapper Yx)\n"
-		"csr_diagonal(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
-		"    npy_cdouble_wrapper Yx)\n"
-		"csr_diagonal(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, \n"
-		"    npy_clongdouble_wrapper Yx)\n"
+		"csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, \n"
+		"    signed char [] Yx)\n"
+		"csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, \n"
+		"    unsigned char [] Yx)\n"
+		"csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, \n"
+		"    short [] Yx)\n"
+		"csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, \n"
+		"    unsigned short [] Yx)\n"
+		"csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, \n"
+		"    int [] Yx)\n"
+		"csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, \n"
+		"    unsigned int [] Yx)\n"
+		"csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, \n"
+		"    long long [] Yx)\n"
+		"csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, \n"
+		"    unsigned long long [] Yx)\n"
+		"csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, \n"
+		"    float [] Yx)\n"
+		"csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, \n"
+		"    double [] Yx)\n"
+		"csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, \n"
+		"    long double [] Yx)\n"
+		"csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, \n"
+		"    npy_cfloat_wrapper [] Yx)\n"
+		"csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, \n"
+		"    npy_cdouble_wrapper [] Yx)\n"
+		"csr_diagonal(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, \n"
+		"    npy_clongdouble_wrapper [] Yx)\n"
 		""},
 	 { (char *)"csr_scale_rows", _wrap_csr_scale_rows, METH_VARARGS, (char *)"\n"
-		"csr_scale_rows(int n_row, int n_col, int Ap, int Aj, signed char Ax, \n"
-		"    signed char Xx)\n"
-		"csr_scale_rows(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, \n"
-		"    unsigned char Xx)\n"
-		"csr_scale_rows(int n_row, int n_col, int Ap, int Aj, short Ax, short Xx)\n"
-		"csr_scale_rows(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, \n"
-		"    unsigned short Xx)\n"
-		"csr_scale_rows(int n_row, int n_col, int Ap, int Aj, int Ax, int Xx)\n"
-		"csr_scale_rows(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, \n"
-		"    unsigned int Xx)\n"
-		"csr_scale_rows(int n_row, int n_col, int Ap, int Aj, long long Ax, \n"
-		"    long long Xx)\n"
-		"csr_scale_rows(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, \n"
-		"    unsigned long long Xx)\n"
-		"csr_scale_rows(int n_row, int n_col, int Ap, int Aj, float Ax, float Xx)\n"
-		"csr_scale_rows(int n_row, int n_col, int Ap, int Aj, double Ax, double Xx)\n"
-		"csr_scale_rows(int n_row, int n_col, int Ap, int Aj, long double Ax, \n"
-		"    long double Xx)\n"
-		"csr_scale_rows(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
-		"    npy_cfloat_wrapper Xx)\n"
-		"csr_scale_rows(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
-		"    npy_cdouble_wrapper Xx)\n"
-		"csr_scale_rows(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, \n"
-		"    npy_clongdouble_wrapper Xx)\n"
+		"csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char [] Ax, \n"
+		"    signed char const [] Xx)\n"
+		"csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char [] Ax, \n"
+		"    unsigned char const [] Xx)\n"
+		"csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short [] Ax, \n"
+		"    short const [] Xx)\n"
+		"csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short [] Ax, \n"
+		"    unsigned short const [] Xx)\n"
+		"csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int [] Ax, int const [] Xx)\n"
+		"csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int [] Ax, \n"
+		"    unsigned int const [] Xx)\n"
+		"csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long [] Ax, \n"
+		"    long long const [] Xx)\n"
+		"csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long [] Ax, \n"
+		"    unsigned long long const [] Xx)\n"
+		"csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float [] Ax, \n"
+		"    float const [] Xx)\n"
+		"csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double [] Ax, \n"
+		"    double const [] Xx)\n"
+		"csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double [] Ax, \n"
+		"    long double const [] Xx)\n"
+		"csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper [] Ax, \n"
+		"    npy_cfloat_wrapper const [] Xx)\n"
+		"csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper [] Ax, \n"
+		"    npy_cdouble_wrapper const [] Xx)\n"
+		"csr_scale_rows(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper [] Ax, \n"
+		"    npy_clongdouble_wrapper const [] Xx)\n"
 		""},
 	 { (char *)"csr_scale_columns", _wrap_csr_scale_columns, METH_VARARGS, (char *)"\n"
-		"csr_scale_columns(int n_row, int n_col, int Ap, int Aj, signed char Ax, \n"
-		"    signed char Xx)\n"
-		"csr_scale_columns(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, \n"
-		"    unsigned char Xx)\n"
-		"csr_scale_columns(int n_row, int n_col, int Ap, int Aj, short Ax, short Xx)\n"
-		"csr_scale_columns(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, \n"
-		"    unsigned short Xx)\n"
-		"csr_scale_columns(int n_row, int n_col, int Ap, int Aj, int Ax, int Xx)\n"
-		"csr_scale_columns(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, \n"
-		"    unsigned int Xx)\n"
-		"csr_scale_columns(int n_row, int n_col, int Ap, int Aj, long long Ax, \n"
-		"    long long Xx)\n"
-		"csr_scale_columns(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, \n"
-		"    unsigned long long Xx)\n"
-		"csr_scale_columns(int n_row, int n_col, int Ap, int Aj, float Ax, float Xx)\n"
-		"csr_scale_columns(int n_row, int n_col, int Ap, int Aj, double Ax, double Xx)\n"
-		"csr_scale_columns(int n_row, int n_col, int Ap, int Aj, long double Ax, \n"
-		"    long double Xx)\n"
-		"csr_scale_columns(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
-		"    npy_cfloat_wrapper Xx)\n"
-		"csr_scale_columns(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
-		"    npy_cdouble_wrapper Xx)\n"
-		"csr_scale_columns(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, \n"
-		"    npy_clongdouble_wrapper Xx)\n"
+		"csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char [] Ax, \n"
+		"    signed char const [] Xx)\n"
+		"csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char [] Ax, \n"
+		"    unsigned char const [] Xx)\n"
+		"csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short [] Ax, \n"
+		"    short const [] Xx)\n"
+		"csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short [] Ax, \n"
+		"    unsigned short const [] Xx)\n"
+		"csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int [] Ax, int const [] Xx)\n"
+		"csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int [] Ax, \n"
+		"    unsigned int const [] Xx)\n"
+		"csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long [] Ax, \n"
+		"    long long const [] Xx)\n"
+		"csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long [] Ax, \n"
+		"    unsigned long long const [] Xx)\n"
+		"csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float [] Ax, \n"
+		"    float const [] Xx)\n"
+		"csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double [] Ax, \n"
+		"    double const [] Xx)\n"
+		"csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double [] Ax, \n"
+		"    long double const [] Xx)\n"
+		"csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper [] Ax, \n"
+		"    npy_cfloat_wrapper const [] Xx)\n"
+		"csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper [] Ax, \n"
+		"    npy_cdouble_wrapper const [] Xx)\n"
+		"csr_scale_columns(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper [] Ax, \n"
+		"    npy_clongdouble_wrapper const [] Xx)\n"
 		""},
 	 { (char *)"csr_tocsc", _wrap_csr_tocsc, METH_VARARGS, (char *)"\n"
-		"csr_tocsc(int n_row, int n_col, int Ap, int Aj, signed char Ax, \n"
-		"    int Bp, int Bi, signed char Bx)\n"
-		"csr_tocsc(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, \n"
-		"    int Bp, int Bi, unsigned char Bx)\n"
-		"csr_tocsc(int n_row, int n_col, int Ap, int Aj, short Ax, int Bp, \n"
-		"    int Bi, short Bx)\n"
-		"csr_tocsc(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, \n"
-		"    int Bp, int Bi, unsigned short Bx)\n"
-		"csr_tocsc(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp, \n"
-		"    int Bi, int Bx)\n"
-		"csr_tocsc(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, \n"
-		"    int Bp, int Bi, unsigned int Bx)\n"
-		"csr_tocsc(int n_row, int n_col, int Ap, int Aj, long long Ax, \n"
-		"    int Bp, int Bi, long long Bx)\n"
-		"csr_tocsc(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, \n"
-		"    int Bp, int Bi, unsigned long long Bx)\n"
-		"csr_tocsc(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp, \n"
-		"    int Bi, float Bx)\n"
-		"csr_tocsc(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, \n"
-		"    int Bi, double Bx)\n"
-		"csr_tocsc(int n_row, int n_col, int Ap, int Aj, long double Ax, \n"
-		"    int Bp, int Bi, long double Bx)\n"
-		"csr_tocsc(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_cfloat_wrapper Bx)\n"
-		"csr_tocsc(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_cdouble_wrapper Bx)\n"
-		"csr_tocsc(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, \n"
-		"    int Bp, int Bi, npy_clongdouble_wrapper Bx)\n"
+		"csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, \n"
+		"    int [] Bp, int [] Bi, signed char [] Bx)\n"
+		"csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, \n"
+		"    int [] Bp, int [] Bi, unsigned char [] Bx)\n"
+		"csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, \n"
+		"    int [] Bp, int [] Bi, short [] Bx)\n"
+		"csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, \n"
+		"    int [] Bp, int [] Bi, unsigned short [] Bx)\n"
+		"csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, \n"
+		"    int [] Bp, int [] Bi, int [] Bx)\n"
+		"csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, \n"
+		"    int [] Bp, int [] Bi, unsigned int [] Bx)\n"
+		"csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, \n"
+		"    int [] Bp, int [] Bi, long long [] Bx)\n"
+		"csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, \n"
+		"    int [] Bp, int [] Bi, unsigned long long [] Bx)\n"
+		"csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, \n"
+		"    int [] Bp, int [] Bi, float [] Bx)\n"
+		"csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, \n"
+		"    int [] Bp, int [] Bi, double [] Bx)\n"
+		"csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, \n"
+		"    int [] Bp, int [] Bi, long double [] Bx)\n"
+		"csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, \n"
+		"    int [] Bp, int [] Bi, npy_cfloat_wrapper [] Bx)\n"
+		"csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, \n"
+		"    int [] Bp, int [] Bi, npy_cdouble_wrapper [] Bx)\n"
+		"csr_tocsc(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, \n"
+		"    int [] Bp, int [] Bi, npy_clongdouble_wrapper [] Bx)\n"
 		""},
 	 { (char *)"csr_tobsr", _wrap_csr_tobsr, METH_VARARGS, (char *)"\n"
-		"csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    signed char Ax, int Bp, int Bj, signed char Bx)\n"
-		"csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned char Ax, int Bp, int Bj, unsigned char Bx)\n"
-		"csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    short Ax, int Bp, int Bj, short Bx)\n"
-		"csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned short Ax, int Bp, int Bj, unsigned short Bx)\n"
-		"csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    int Ax, int Bp, int Bj, int Bx)\n"
-		"csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned int Ax, int Bp, int Bj, unsigned int Bx)\n"
-		"csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    long long Ax, int Bp, int Bj, long long Bx)\n"
-		"csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    unsigned long long Ax, int Bp, int Bj, unsigned long long Bx)\n"
-		"csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    float Ax, int Bp, int Bj, float Bx)\n"
-		"csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    double Ax, int Bp, int Bj, double Bx)\n"
-		"csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    long double Ax, int Bp, int Bj, long double Bx)\n"
-		"csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    npy_cfloat_wrapper Ax, int Bp, int Bj, npy_cfloat_wrapper Bx)\n"
-		"csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    npy_cdouble_wrapper Ax, int Bp, int Bj, npy_cdouble_wrapper Bx)\n"
-		"csr_tobsr(int n_row, int n_col, int R, int C, int Ap, int Aj, \n"
-		"    npy_clongdouble_wrapper Ax, int Bp, int Bj, \n"
-		"    npy_clongdouble_wrapper Bx)\n"
+		"csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    signed char const [] Ax, int [] Bp, int [] Bj, signed char [] Bx)\n"
+		"csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned char const [] Ax, int [] Bp, int [] Bj, unsigned char [] Bx)\n"
+		"csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    short const [] Ax, int [] Bp, int [] Bj, short [] Bx)\n"
+		"csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned short const [] Ax, int [] Bp, int [] Bj, unsigned short [] Bx)\n"
+		"csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    int const [] Ax, int [] Bp, int [] Bj, int [] Bx)\n"
+		"csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned int const [] Ax, int [] Bp, int [] Bj, unsigned int [] Bx)\n"
+		"csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long long const [] Ax, int [] Bp, int [] Bj, long long [] Bx)\n"
+		"csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    unsigned long long const [] Ax, int [] Bp, int [] Bj, unsigned long long [] Bx)\n"
+		"csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    float const [] Ax, int [] Bp, int [] Bj, float [] Bx)\n"
+		"csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    double const [] Ax, int [] Bp, int [] Bj, double [] Bx)\n"
+		"csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    long double const [] Ax, int [] Bp, int [] Bj, long double [] Bx)\n"
+		"csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cfloat_wrapper const [] Ax, int [] Bp, int [] Bj, npy_cfloat_wrapper [] Bx)\n"
+		"csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_cdouble_wrapper const [] Ax, int [] Bp, int [] Bj, npy_cdouble_wrapper [] Bx)\n"
+		"csr_tobsr(int const n_row, int const n_col, int const R, int const C, int const [] Ap, int const [] Aj, \n"
+		"    npy_clongdouble_wrapper const [] Ax, int [] Bp, int [] Bj, npy_clongdouble_wrapper [] Bx)\n"
 		""},
 	 { (char *)"csr_matmat_pass2", _wrap_csr_matmat_pass2, METH_VARARGS, (char *)"\n"
-		"csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, signed char Ax, \n"
-		"    int Bp, int Bj, signed char Bx, int Cp, int Cj, \n"
-		"    signed char Cx)\n"
-		"csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, \n"
-		"    int Bp, int Bj, unsigned char Bx, int Cp, \n"
-		"    int Cj, unsigned char Cx)\n"
-		"csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, short Ax, int Bp, \n"
-		"    int Bj, short Bx, int Cp, int Cj, short Cx)\n"
-		"csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, \n"
-		"    int Bp, int Bj, unsigned short Bx, int Cp, \n"
-		"    int Cj, unsigned short Cx)\n"
-		"csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp, \n"
-		"    int Bj, int Bx, int Cp, int Cj, int Cx)\n"
-		"csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, \n"
-		"    int Bp, int Bj, unsigned int Bx, int Cp, \n"
-		"    int Cj, unsigned int Cx)\n"
-		"csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, long long Ax, \n"
-		"    int Bp, int Bj, long long Bx, int Cp, int Cj, \n"
-		"    long long Cx)\n"
-		"csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, \n"
-		"    int Bp, int Bj, unsigned long long Bx, \n"
-		"    int Cp, int Cj, unsigned long long Cx)\n"
-		"csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp, \n"
-		"    int Bj, float Bx, int Cp, int Cj, float Cx)\n"
-		"csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, \n"
-		"    int Bj, double Bx, int Cp, int Cj, double Cx)\n"
-		"csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, long double Ax, \n"
-		"    int Bp, int Bj, long double Bx, int Cp, int Cj, \n"
-		"    long double Cx)\n"
-		"csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_cfloat_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_cfloat_wrapper Cx)\n"
-		"csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_cdouble_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_cdouble_wrapper Cx)\n"
-		"csr_matmat_pass2(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_clongdouble_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_clongdouble_wrapper Cx)\n"
+		"csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, signed char const [] Bx, int [] Cp, \n"
+		"    int [] Cj, signed char [] Cx)\n"
+		"csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned char const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned char [] Cx)\n"
+		"csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, short const [] Bx, int [] Cp, int [] Cj, \n"
+		"    short [] Cx)\n"
+		"csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned short const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned short [] Cx)\n"
+		"csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, int const [] Bx, int [] Cp, int [] Cj, \n"
+		"    int [] Cx)\n"
+		"csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned int const [] Bx, int [] Cp, \n"
+		"    int [] Cj, unsigned int [] Cx)\n"
+		"csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, long long const [] Bx, int [] Cp, \n"
+		"    int [] Cj, long long [] Cx)\n"
+		"csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned long long const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned long long [] Cx)\n"
+		"csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, float const [] Bx, int [] Cp, int [] Cj, \n"
+		"    float [] Cx)\n"
+		"csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, double const [] Bx, int [] Cp, int [] Cj, \n"
+		"    double [] Cx)\n"
+		"csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, long double const [] Bx, int [] Cp, \n"
+		"    int [] Cj, long double [] Cx)\n"
+		"csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, npy_cfloat_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)\n"
+		"csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, npy_cdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Cj, npy_cdouble_wrapper [] Cx)\n"
+		"csr_matmat_pass2(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, npy_clongdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Cj, npy_clongdouble_wrapper [] Cx)\n"
 		""},
 	 { (char *)"csr_matvec", _wrap_csr_matvec, METH_VARARGS, (char *)"\n"
-		"csr_matvec(int n_row, int n_col, int Ap, int Aj, signed char Ax, \n"
-		"    signed char Xx, signed char Yx)\n"
-		"csr_matvec(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, \n"
-		"    unsigned char Xx, unsigned char Yx)\n"
-		"csr_matvec(int n_row, int n_col, int Ap, int Aj, short Ax, short Xx, \n"
-		"    short Yx)\n"
-		"csr_matvec(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, \n"
-		"    unsigned short Xx, unsigned short Yx)\n"
-		"csr_matvec(int n_row, int n_col, int Ap, int Aj, int Ax, int Xx, \n"
-		"    int Yx)\n"
-		"csr_matvec(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, \n"
-		"    unsigned int Xx, unsigned int Yx)\n"
-		"csr_matvec(int n_row, int n_col, int Ap, int Aj, long long Ax, \n"
-		"    long long Xx, long long Yx)\n"
-		"csr_matvec(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, \n"
-		"    unsigned long long Xx, unsigned long long Yx)\n"
-		"csr_matvec(int n_row, int n_col, int Ap, int Aj, float Ax, float Xx, \n"
-		"    float Yx)\n"
-		"csr_matvec(int n_row, int n_col, int Ap, int Aj, double Ax, double Xx, \n"
-		"    double Yx)\n"
-		"csr_matvec(int n_row, int n_col, int Ap, int Aj, long double Ax, \n"
-		"    long double Xx, long double Yx)\n"
-		"csr_matvec(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
-		"    npy_cfloat_wrapper Xx, npy_cfloat_wrapper Yx)\n"
-		"csr_matvec(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
-		"    npy_cdouble_wrapper Xx, npy_cdouble_wrapper Yx)\n"
-		"csr_matvec(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, \n"
-		"    npy_clongdouble_wrapper Xx, npy_clongdouble_wrapper Yx)\n"
+		"csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, \n"
+		"    signed char const [] Xx, signed char [] Yx)\n"
+		"csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, \n"
+		"    unsigned char const [] Xx, unsigned char [] Yx)\n"
+		"csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, \n"
+		"    short const [] Xx, short [] Yx)\n"
+		"csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, \n"
+		"    unsigned short const [] Xx, unsigned short [] Yx)\n"
+		"csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, \n"
+		"    int const [] Xx, int [] Yx)\n"
+		"csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, \n"
+		"    unsigned int const [] Xx, unsigned int [] Yx)\n"
+		"csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, \n"
+		"    long long const [] Xx, long long [] Yx)\n"
+		"csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, \n"
+		"    unsigned long long const [] Xx, unsigned long long [] Yx)\n"
+		"csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, \n"
+		"    float const [] Xx, float [] Yx)\n"
+		"csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, \n"
+		"    double const [] Xx, double [] Yx)\n"
+		"csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, \n"
+		"    long double const [] Xx, long double [] Yx)\n"
+		"csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, \n"
+		"    npy_cfloat_wrapper const [] Xx, npy_cfloat_wrapper [] Yx)\n"
+		"csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, \n"
+		"    npy_cdouble_wrapper const [] Xx, npy_cdouble_wrapper [] Yx)\n"
+		"csr_matvec(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, \n"
+		"    npy_clongdouble_wrapper const [] Xx, npy_clongdouble_wrapper [] Yx)\n"
 		""},
 	 { (char *)"csr_matvecs", _wrap_csr_matvecs, METH_VARARGS, (char *)"\n"
-		"csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, signed char Ax, \n"
-		"    signed char Xx, signed char Yx)\n"
-		"csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, unsigned char Ax, \n"
-		"    unsigned char Xx, unsigned char Yx)\n"
-		"csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, short Ax, \n"
-		"    short Xx, short Yx)\n"
-		"csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, unsigned short Ax, \n"
-		"    unsigned short Xx, unsigned short Yx)\n"
-		"csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, int Ax, \n"
-		"    int Xx, int Yx)\n"
-		"csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, unsigned int Ax, \n"
-		"    unsigned int Xx, unsigned int Yx)\n"
-		"csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, long long Ax, \n"
-		"    long long Xx, long long Yx)\n"
-		"csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, unsigned long long Ax, \n"
-		"    unsigned long long Xx, \n"
-		"    unsigned long long Yx)\n"
-		"csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, float Ax, \n"
-		"    float Xx, float Yx)\n"
-		"csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, double Ax, \n"
-		"    double Xx, double Yx)\n"
-		"csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, long double Ax, \n"
-		"    long double Xx, long double Yx)\n"
-		"csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
-		"    npy_cfloat_wrapper Xx, \n"
-		"    npy_cfloat_wrapper Yx)\n"
-		"csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
-		"    npy_cdouble_wrapper Xx, \n"
-		"    npy_cdouble_wrapper Yx)\n"
-		"csr_matvecs(int n_row, int n_col, int n_vecs, int Ap, int Aj, npy_clongdouble_wrapper Ax, \n"
-		"    npy_clongdouble_wrapper Xx, \n"
-		"    npy_clongdouble_wrapper Yx)\n"
+		"csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, \n"
+		"    signed char const [] Ax, signed char const [] Xx, signed char [] Yx)\n"
+		"csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, \n"
+		"    unsigned char const [] Ax, unsigned char const [] Xx, unsigned char [] Yx)\n"
+		"csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, \n"
+		"    short const [] Ax, short const [] Xx, short [] Yx)\n"
+		"csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, \n"
+		"    unsigned short const [] Ax, unsigned short const [] Xx, unsigned short [] Yx)\n"
+		"csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, \n"
+		"    int const [] Ax, int const [] Xx, int [] Yx)\n"
+		"csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, \n"
+		"    unsigned int const [] Ax, unsigned int const [] Xx, unsigned int [] Yx)\n"
+		"csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, \n"
+		"    long long const [] Ax, long long const [] Xx, long long [] Yx)\n"
+		"csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, \n"
+		"    unsigned long long const [] Ax, unsigned long long const [] Xx, unsigned long long [] Yx)\n"
+		"csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, \n"
+		"    float const [] Ax, float const [] Xx, float [] Yx)\n"
+		"csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, \n"
+		"    double const [] Ax, double const [] Xx, double [] Yx)\n"
+		"csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, \n"
+		"    long double const [] Ax, long double const [] Xx, long double [] Yx)\n"
+		"csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, \n"
+		"    npy_cfloat_wrapper const [] Ax, npy_cfloat_wrapper const [] Xx, npy_cfloat_wrapper [] Yx)\n"
+		"csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, \n"
+		"    npy_cdouble_wrapper const [] Ax, npy_cdouble_wrapper const [] Xx, npy_cdouble_wrapper [] Yx)\n"
+		"csr_matvecs(int const n_row, int const n_col, int const n_vecs, int const [] Ap, int const [] Aj, \n"
+		"    npy_clongdouble_wrapper const [] Ax, npy_clongdouble_wrapper const [] Xx, \n"
+		"    npy_clongdouble_wrapper [] Yx)\n"
 		""},
 	 { (char *)"csr_elmul_csr", _wrap_csr_elmul_csr, METH_VARARGS, (char *)"\n"
-		"csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, signed char Ax, \n"
-		"    int Bp, int Bj, signed char Bx, int Cp, int Cj, \n"
-		"    signed char Cx)\n"
-		"csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, \n"
-		"    int Bp, int Bj, unsigned char Bx, int Cp, \n"
-		"    int Cj, unsigned char Cx)\n"
-		"csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, short Ax, int Bp, \n"
-		"    int Bj, short Bx, int Cp, int Cj, short Cx)\n"
-		"csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, \n"
-		"    int Bp, int Bj, unsigned short Bx, int Cp, \n"
-		"    int Cj, unsigned short Cx)\n"
-		"csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp, \n"
-		"    int Bj, int Bx, int Cp, int Cj, int Cx)\n"
-		"csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, \n"
-		"    int Bp, int Bj, unsigned int Bx, int Cp, \n"
-		"    int Cj, unsigned int Cx)\n"
-		"csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, long long Ax, \n"
-		"    int Bp, int Bj, long long Bx, int Cp, int Cj, \n"
-		"    long long Cx)\n"
-		"csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, \n"
-		"    int Bp, int Bj, unsigned long long Bx, \n"
-		"    int Cp, int Cj, unsigned long long Cx)\n"
-		"csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp, \n"
-		"    int Bj, float Bx, int Cp, int Cj, float Cx)\n"
-		"csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, \n"
-		"    int Bj, double Bx, int Cp, int Cj, double Cx)\n"
-		"csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, long double Ax, \n"
-		"    int Bp, int Bj, long double Bx, int Cp, int Cj, \n"
-		"    long double Cx)\n"
-		"csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_cfloat_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_cfloat_wrapper Cx)\n"
-		"csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_cdouble_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_cdouble_wrapper Cx)\n"
-		"csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_clongdouble_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_clongdouble_wrapper Cx)\n"
+		"csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, signed char const [] Bx, int [] Cp, \n"
+		"    int [] Cj, signed char [] Cx)\n"
+		"csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned char const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned char [] Cx)\n"
+		"csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, short const [] Bx, int [] Cp, int [] Cj, \n"
+		"    short [] Cx)\n"
+		"csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned short const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned short [] Cx)\n"
+		"csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, int const [] Bx, int [] Cp, int [] Cj, \n"
+		"    int [] Cx)\n"
+		"csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned int const [] Bx, int [] Cp, \n"
+		"    int [] Cj, unsigned int [] Cx)\n"
+		"csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, long long const [] Bx, int [] Cp, \n"
+		"    int [] Cj, long long [] Cx)\n"
+		"csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned long long const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned long long [] Cx)\n"
+		"csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, float const [] Bx, int [] Cp, int [] Cj, \n"
+		"    float [] Cx)\n"
+		"csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, double const [] Bx, int [] Cp, int [] Cj, \n"
+		"    double [] Cx)\n"
+		"csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, long double const [] Bx, int [] Cp, \n"
+		"    int [] Cj, long double [] Cx)\n"
+		"csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, npy_cfloat_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)\n"
+		"csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, npy_cdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Cj, npy_cdouble_wrapper [] Cx)\n"
+		"csr_elmul_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, npy_clongdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Cj, npy_clongdouble_wrapper [] Cx)\n"
 		""},
 	 { (char *)"csr_eldiv_csr", _wrap_csr_eldiv_csr, METH_VARARGS, (char *)"\n"
-		"csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, signed char Ax, \n"
-		"    int Bp, int Bj, signed char Bx, int Cp, int Cj, \n"
-		"    signed char Cx)\n"
-		"csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, \n"
-		"    int Bp, int Bj, unsigned char Bx, int Cp, \n"
-		"    int Cj, unsigned char Cx)\n"
-		"csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, short Ax, int Bp, \n"
-		"    int Bj, short Bx, int Cp, int Cj, short Cx)\n"
-		"csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, \n"
-		"    int Bp, int Bj, unsigned short Bx, int Cp, \n"
-		"    int Cj, unsigned short Cx)\n"
-		"csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp, \n"
-		"    int Bj, int Bx, int Cp, int Cj, int Cx)\n"
-		"csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, \n"
-		"    int Bp, int Bj, unsigned int Bx, int Cp, \n"
-		"    int Cj, unsigned int Cx)\n"
-		"csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, long long Ax, \n"
-		"    int Bp, int Bj, long long Bx, int Cp, int Cj, \n"
-		"    long long Cx)\n"
-		"csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, \n"
-		"    int Bp, int Bj, unsigned long long Bx, \n"
-		"    int Cp, int Cj, unsigned long long Cx)\n"
-		"csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp, \n"
-		"    int Bj, float Bx, int Cp, int Cj, float Cx)\n"
-		"csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, \n"
-		"    int Bj, double Bx, int Cp, int Cj, double Cx)\n"
-		"csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, long double Ax, \n"
-		"    int Bp, int Bj, long double Bx, int Cp, int Cj, \n"
-		"    long double Cx)\n"
-		"csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_cfloat_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_cfloat_wrapper Cx)\n"
-		"csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_cdouble_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_cdouble_wrapper Cx)\n"
-		"csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_clongdouble_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_clongdouble_wrapper Cx)\n"
+		"csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, signed char const [] Bx, int [] Cp, \n"
+		"    int [] Cj, signed char [] Cx)\n"
+		"csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned char const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned char [] Cx)\n"
+		"csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, short const [] Bx, int [] Cp, int [] Cj, \n"
+		"    short [] Cx)\n"
+		"csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned short const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned short [] Cx)\n"
+		"csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, int const [] Bx, int [] Cp, int [] Cj, \n"
+		"    int [] Cx)\n"
+		"csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned int const [] Bx, int [] Cp, \n"
+		"    int [] Cj, unsigned int [] Cx)\n"
+		"csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, long long const [] Bx, int [] Cp, \n"
+		"    int [] Cj, long long [] Cx)\n"
+		"csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned long long const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned long long [] Cx)\n"
+		"csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, float const [] Bx, int [] Cp, int [] Cj, \n"
+		"    float [] Cx)\n"
+		"csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, double const [] Bx, int [] Cp, int [] Cj, \n"
+		"    double [] Cx)\n"
+		"csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, long double const [] Bx, int [] Cp, \n"
+		"    int [] Cj, long double [] Cx)\n"
+		"csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, npy_cfloat_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)\n"
+		"csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, npy_cdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Cj, npy_cdouble_wrapper [] Cx)\n"
+		"csr_eldiv_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, npy_clongdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Cj, npy_clongdouble_wrapper [] Cx)\n"
 		""},
 	 { (char *)"csr_plus_csr", _wrap_csr_plus_csr, METH_VARARGS, (char *)"\n"
-		"csr_plus_csr(int n_row, int n_col, int Ap, int Aj, signed char Ax, \n"
-		"    int Bp, int Bj, signed char Bx, int Cp, int Cj, \n"
-		"    signed char Cx)\n"
-		"csr_plus_csr(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, \n"
-		"    int Bp, int Bj, unsigned char Bx, int Cp, \n"
-		"    int Cj, unsigned char Cx)\n"
-		"csr_plus_csr(int n_row, int n_col, int Ap, int Aj, short Ax, int Bp, \n"
-		"    int Bj, short Bx, int Cp, int Cj, short Cx)\n"
-		"csr_plus_csr(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, \n"
-		"    int Bp, int Bj, unsigned short Bx, int Cp, \n"
-		"    int Cj, unsigned short Cx)\n"
-		"csr_plus_csr(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp, \n"
-		"    int Bj, int Bx, int Cp, int Cj, int Cx)\n"
-		"csr_plus_csr(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, \n"
-		"    int Bp, int Bj, unsigned int Bx, int Cp, \n"
-		"    int Cj, unsigned int Cx)\n"
-		"csr_plus_csr(int n_row, int n_col, int Ap, int Aj, long long Ax, \n"
-		"    int Bp, int Bj, long long Bx, int Cp, int Cj, \n"
-		"    long long Cx)\n"
-		"csr_plus_csr(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, \n"
-		"    int Bp, int Bj, unsigned long long Bx, \n"
-		"    int Cp, int Cj, unsigned long long Cx)\n"
-		"csr_plus_csr(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp, \n"
-		"    int Bj, float Bx, int Cp, int Cj, float Cx)\n"
-		"csr_plus_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, \n"
-		"    int Bj, double Bx, int Cp, int Cj, double Cx)\n"
-		"csr_plus_csr(int n_row, int n_col, int Ap, int Aj, long double Ax, \n"
-		"    int Bp, int Bj, long double Bx, int Cp, int Cj, \n"
-		"    long double Cx)\n"
-		"csr_plus_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_cfloat_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_cfloat_wrapper Cx)\n"
-		"csr_plus_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_cdouble_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_cdouble_wrapper Cx)\n"
-		"csr_plus_csr(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_clongdouble_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_clongdouble_wrapper Cx)\n"
+		"csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, signed char const [] Bx, int [] Cp, \n"
+		"    int [] Cj, signed char [] Cx)\n"
+		"csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned char const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned char [] Cx)\n"
+		"csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, short const [] Bx, int [] Cp, int [] Cj, \n"
+		"    short [] Cx)\n"
+		"csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned short const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned short [] Cx)\n"
+		"csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, int const [] Bx, int [] Cp, int [] Cj, \n"
+		"    int [] Cx)\n"
+		"csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned int const [] Bx, int [] Cp, \n"
+		"    int [] Cj, unsigned int [] Cx)\n"
+		"csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, long long const [] Bx, int [] Cp, \n"
+		"    int [] Cj, long long [] Cx)\n"
+		"csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned long long const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned long long [] Cx)\n"
+		"csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, float const [] Bx, int [] Cp, int [] Cj, \n"
+		"    float [] Cx)\n"
+		"csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, double const [] Bx, int [] Cp, int [] Cj, \n"
+		"    double [] Cx)\n"
+		"csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, long double const [] Bx, int [] Cp, \n"
+		"    int [] Cj, long double [] Cx)\n"
+		"csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, npy_cfloat_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)\n"
+		"csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, npy_cdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Cj, npy_cdouble_wrapper [] Cx)\n"
+		"csr_plus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, npy_clongdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Cj, npy_clongdouble_wrapper [] Cx)\n"
 		""},
 	 { (char *)"csr_minus_csr", _wrap_csr_minus_csr, METH_VARARGS, (char *)"\n"
-		"csr_minus_csr(int n_row, int n_col, int Ap, int Aj, signed char Ax, \n"
-		"    int Bp, int Bj, signed char Bx, int Cp, int Cj, \n"
-		"    signed char Cx)\n"
-		"csr_minus_csr(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, \n"
-		"    int Bp, int Bj, unsigned char Bx, int Cp, \n"
-		"    int Cj, unsigned char Cx)\n"
-		"csr_minus_csr(int n_row, int n_col, int Ap, int Aj, short Ax, int Bp, \n"
-		"    int Bj, short Bx, int Cp, int Cj, short Cx)\n"
-		"csr_minus_csr(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, \n"
-		"    int Bp, int Bj, unsigned short Bx, int Cp, \n"
-		"    int Cj, unsigned short Cx)\n"
-		"csr_minus_csr(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp, \n"
-		"    int Bj, int Bx, int Cp, int Cj, int Cx)\n"
-		"csr_minus_csr(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, \n"
-		"    int Bp, int Bj, unsigned int Bx, int Cp, \n"
-		"    int Cj, unsigned int Cx)\n"
-		"csr_minus_csr(int n_row, int n_col, int Ap, int Aj, long long Ax, \n"
-		"    int Bp, int Bj, long long Bx, int Cp, int Cj, \n"
-		"    long long Cx)\n"
-		"csr_minus_csr(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, \n"
-		"    int Bp, int Bj, unsigned long long Bx, \n"
-		"    int Cp, int Cj, unsigned long long Cx)\n"
-		"csr_minus_csr(int n_row, int n_col, int Ap, int Aj, float Ax, int Bp, \n"
-		"    int Bj, float Bx, int Cp, int Cj, float Cx)\n"
-		"csr_minus_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, \n"
-		"    int Bj, double Bx, int Cp, int Cj, double Cx)\n"
-		"csr_minus_csr(int n_row, int n_col, int Ap, int Aj, long double Ax, \n"
-		"    int Bp, int Bj, long double Bx, int Cp, int Cj, \n"
-		"    long double Cx)\n"
-		"csr_minus_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_cfloat_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_cfloat_wrapper Cx)\n"
-		"csr_minus_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_cdouble_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_cdouble_wrapper Cx)\n"
-		"csr_minus_csr(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, \n"
-		"    int Bp, int Bj, npy_clongdouble_wrapper Bx, \n"
-		"    int Cp, int Cj, npy_clongdouble_wrapper Cx)\n"
+		"csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, signed char const [] Bx, int [] Cp, \n"
+		"    int [] Cj, signed char [] Cx)\n"
+		"csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned char const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned char [] Cx)\n"
+		"csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, short const [] Bx, int [] Cp, int [] Cj, \n"
+		"    short [] Cx)\n"
+		"csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned short const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned short [] Cx)\n"
+		"csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, int const [] Bx, int [] Cp, int [] Cj, \n"
+		"    int [] Cx)\n"
+		"csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned int const [] Bx, int [] Cp, \n"
+		"    int [] Cj, unsigned int [] Cx)\n"
+		"csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, long long const [] Bx, int [] Cp, \n"
+		"    int [] Cj, long long [] Cx)\n"
+		"csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, unsigned long long const [] Bx, \n"
+		"    int [] Cp, int [] Cj, unsigned long long [] Cx)\n"
+		"csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, float const [] Bx, int [] Cp, int [] Cj, \n"
+		"    float [] Cx)\n"
+		"csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, double const [] Bx, int [] Cp, int [] Cj, \n"
+		"    double [] Cx)\n"
+		"csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, long double const [] Bx, int [] Cp, \n"
+		"    int [] Cj, long double [] Cx)\n"
+		"csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, npy_cfloat_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Cj, npy_cfloat_wrapper [] Cx)\n"
+		"csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, npy_cdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Cj, npy_cdouble_wrapper [] Cx)\n"
+		"csr_minus_csr(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, \n"
+		"    int const [] Bp, int const [] Bj, npy_clongdouble_wrapper const [] Bx, \n"
+		"    int [] Cp, int [] Cj, npy_clongdouble_wrapper [] Cx)\n"
 		""},
 	 { (char *)"csr_sort_indices", _wrap_csr_sort_indices, METH_VARARGS, (char *)"\n"
-		"csr_sort_indices(int n_row, int Ap, int Aj, signed char Ax)\n"
-		"csr_sort_indices(int n_row, int Ap, int Aj, unsigned char Ax)\n"
-		"csr_sort_indices(int n_row, int Ap, int Aj, short Ax)\n"
-		"csr_sort_indices(int n_row, int Ap, int Aj, unsigned short Ax)\n"
-		"csr_sort_indices(int n_row, int Ap, int Aj, int Ax)\n"
-		"csr_sort_indices(int n_row, int Ap, int Aj, unsigned int Ax)\n"
-		"csr_sort_indices(int n_row, int Ap, int Aj, long long Ax)\n"
-		"csr_sort_indices(int n_row, int Ap, int Aj, unsigned long long Ax)\n"
-		"csr_sort_indices(int n_row, int Ap, int Aj, float Ax)\n"
-		"csr_sort_indices(int n_row, int Ap, int Aj, double Ax)\n"
-		"csr_sort_indices(int n_row, int Ap, int Aj, long double Ax)\n"
-		"csr_sort_indices(int n_row, int Ap, int Aj, npy_cfloat_wrapper Ax)\n"
-		"csr_sort_indices(int n_row, int Ap, int Aj, npy_cdouble_wrapper Ax)\n"
-		"csr_sort_indices(int n_row, int Ap, int Aj, npy_clongdouble_wrapper Ax)\n"
+		"csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, signed char [] Ax)\n"
+		"csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, unsigned char [] Ax)\n"
+		"csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, short [] Ax)\n"
+		"csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, unsigned short [] Ax)\n"
+		"csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, int [] Ax)\n"
+		"csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, unsigned int [] Ax)\n"
+		"csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, long long [] Ax)\n"
+		"csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, unsigned long long [] Ax)\n"
+		"csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, float [] Ax)\n"
+		"csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, double [] Ax)\n"
+		"csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, long double [] Ax)\n"
+		"csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, npy_cfloat_wrapper [] Ax)\n"
+		"csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, npy_cdouble_wrapper [] Ax)\n"
+		"csr_sort_indices(int const n_row, int const [] Ap, int [] Aj, npy_clongdouble_wrapper [] Ax)\n"
 		""},
 	 { (char *)"csr_eliminate_zeros", _wrap_csr_eliminate_zeros, METH_VARARGS, (char *)"\n"
-		"csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, signed char Ax)\n"
-		"csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, unsigned char Ax)\n"
-		"csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, short Ax)\n"
-		"csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, unsigned short Ax)\n"
-		"csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, int Ax)\n"
-		"csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, unsigned int Ax)\n"
-		"csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, long long Ax)\n"
-		"csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax)\n"
-		"csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, float Ax)\n"
-		"csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, double Ax)\n"
-		"csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, long double Ax)\n"
-		"csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax)\n"
-		"csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax)\n"
-		"csr_eliminate_zeros(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax)\n"
+		"csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, signed char [] Ax)\n"
+		"csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, unsigned char [] Ax)\n"
+		"csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, short [] Ax)\n"
+		"csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, unsigned short [] Ax)\n"
+		"csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, int [] Ax)\n"
+		"csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, unsigned int [] Ax)\n"
+		"csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, long long [] Ax)\n"
+		"csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, unsigned long long [] Ax)\n"
+		"csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, float [] Ax)\n"
+		"csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, double [] Ax)\n"
+		"csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, long double [] Ax)\n"
+		"csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, npy_cfloat_wrapper [] Ax)\n"
+		"csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, npy_cdouble_wrapper [] Ax)\n"
+		"csr_eliminate_zeros(int const n_row, int const n_col, int [] Ap, int [] Aj, npy_clongdouble_wrapper [] Ax)\n"
 		""},
 	 { (char *)"csr_sum_duplicates", _wrap_csr_sum_duplicates, METH_VARARGS, (char *)"\n"
-		"csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, signed char Ax)\n"
-		"csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, unsigned char Ax)\n"
-		"csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, short Ax)\n"
-		"csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, unsigned short Ax)\n"
-		"csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, int Ax)\n"
-		"csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, unsigned int Ax)\n"
-		"csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, long long Ax)\n"
-		"csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax)\n"
-		"csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, float Ax)\n"
-		"csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, double Ax)\n"
-		"csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, long double Ax)\n"
-		"csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax)\n"
-		"csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax)\n"
-		"csr_sum_duplicates(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax)\n"
+		"csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, signed char [] Ax)\n"
+		"csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, unsigned char [] Ax)\n"
+		"csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, short [] Ax)\n"
+		"csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, unsigned short [] Ax)\n"
+		"csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, int [] Ax)\n"
+		"csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, unsigned int [] Ax)\n"
+		"csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, long long [] Ax)\n"
+		"csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, unsigned long long [] Ax)\n"
+		"csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, float [] Ax)\n"
+		"csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, double [] Ax)\n"
+		"csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, long double [] Ax)\n"
+		"csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, npy_cfloat_wrapper [] Ax)\n"
+		"csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, npy_cdouble_wrapper [] Ax)\n"
+		"csr_sum_duplicates(int const n_row, int const n_col, int [] Ap, int [] Aj, npy_clongdouble_wrapper [] Ax)\n"
 		""},
 	 { (char *)"get_csr_submatrix", _wrap_get_csr_submatrix, METH_VARARGS, (char *)"\n"
-		"get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, signed char Ax, \n"
-		"    int ir0, int ir1, int ic0, int ic1)\n"
-		"get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, \n"
-		"    int ir0, int ir1, int ic0, int ic1)\n"
-		"get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, short Ax, int ir0, \n"
-		"    int ir1, int ic0, int ic1)\n"
-		"get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, \n"
-		"    int ir0, int ir1, int ic0, int ic1)\n"
-		"get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, int Ax, int ir0, \n"
-		"    int ir1, int ic0, int ic1)\n"
-		"get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, \n"
-		"    int ir0, int ir1, int ic0, int ic1)\n"
-		"get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, long long Ax, \n"
-		"    int ir0, int ir1, int ic0, int ic1)\n"
-		"get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, \n"
-		"    int ir0, int ir1, int ic0, int ic1)\n"
-		"get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, float Ax, int ir0, \n"
-		"    int ir1, int ic0, int ic1)\n"
-		"get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, double Ax, int ir0, \n"
-		"    int ir1, int ic0, int ic1)\n"
-		"get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, long double Ax, \n"
-		"    int ir0, int ir1, int ic0, int ic1)\n"
-		"get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
-		"    int ir0, int ir1, int ic0, int ic1)\n"
-		"get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
-		"    int ir0, int ir1, int ic0, int ic1)\n"
-		"get_csr_submatrix(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, \n"
-		"    int ir0, int ir1, int ic0, int ic1)\n"
+		"get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, \n"
+		"    int const ir0, int const ir1, int const ic0, int const ic1)\n"
+		"get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, \n"
+		"    int const ir0, int const ir1, int const ic0, int const ic1)\n"
+		"get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, \n"
+		"    int const ir0, int const ir1, int const ic0, int const ic1)\n"
+		"get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, \n"
+		"    int const ir0, int const ir1, int const ic0, int const ic1)\n"
+		"get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, \n"
+		"    int const ir0, int const ir1, int const ic0, int const ic1)\n"
+		"get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, \n"
+		"    int const ir0, int const ir1, int const ic0, int const ic1)\n"
+		"get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, \n"
+		"    int const ir0, int const ir1, int const ic0, int const ic1)\n"
+		"get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, \n"
+		"    int const ir0, int const ir1, int const ic0, int const ic1)\n"
+		"get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, \n"
+		"    int const ir0, int const ir1, int const ic0, int const ic1)\n"
+		"get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, \n"
+		"    int const ir0, int const ir1, int const ic0, int const ic1)\n"
+		"get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, \n"
+		"    int const ir0, int const ir1, int const ic0, int const ic1)\n"
+		"get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, \n"
+		"    int const ir0, int const ir1, int const ic0, int const ic1)\n"
+		"get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, \n"
+		"    int const ir0, int const ir1, int const ic0, int const ic1)\n"
+		"get_csr_submatrix(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, \n"
+		"    int const ir0, int const ir1, int const ic0, int const ic1)\n"
 		""},
 	 { (char *)"csr_sample_values", _wrap_csr_sample_values, METH_VARARGS, (char *)"\n"
-		"csr_sample_values(int n_row, int n_col, int Ap, int Aj, signed char Ax, \n"
-		"    int n_samples, int Bi, int Bj, signed char Bx)\n"
-		"csr_sample_values(int n_row, int n_col, int Ap, int Aj, unsigned char Ax, \n"
-		"    int n_samples, int Bi, int Bj, unsigned char Bx)\n"
-		"csr_sample_values(int n_row, int n_col, int Ap, int Aj, short Ax, int n_samples, \n"
-		"    int Bi, int Bj, short Bx)\n"
-		"csr_sample_values(int n_row, int n_col, int Ap, int Aj, unsigned short Ax, \n"
-		"    int n_samples, int Bi, int Bj, unsigned short Bx)\n"
-		"csr_sample_values(int n_row, int n_col, int Ap, int Aj, int Ax, int n_samples, \n"
-		"    int Bi, int Bj, int Bx)\n"
-		"csr_sample_values(int n_row, int n_col, int Ap, int Aj, unsigned int Ax, \n"
-		"    int n_samples, int Bi, int Bj, unsigned int Bx)\n"
-		"csr_sample_values(int n_row, int n_col, int Ap, int Aj, long long Ax, \n"
-		"    int n_samples, int Bi, int Bj, long long Bx)\n"
-		"csr_sample_values(int n_row, int n_col, int Ap, int Aj, unsigned long long Ax, \n"
-		"    int n_samples, int Bi, int Bj, unsigned long long Bx)\n"
-		"csr_sample_values(int n_row, int n_col, int Ap, int Aj, float Ax, int n_samples, \n"
-		"    int Bi, int Bj, float Bx)\n"
-		"csr_sample_values(int n_row, int n_col, int Ap, int Aj, double Ax, int n_samples, \n"
-		"    int Bi, int Bj, double Bx)\n"
-		"csr_sample_values(int n_row, int n_col, int Ap, int Aj, long double Ax, \n"
-		"    int n_samples, int Bi, int Bj, long double Bx)\n"
-		"csr_sample_values(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
-		"    int n_samples, int Bi, int Bj, npy_cfloat_wrapper Bx)\n"
-		"csr_sample_values(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
-		"    int n_samples, int Bi, int Bj, npy_cdouble_wrapper Bx)\n"
-		"csr_sample_values(int n_row, int n_col, int Ap, int Aj, npy_clongdouble_wrapper Ax, \n"
-		"    int n_samples, int Bi, int Bj, \n"
-		"    npy_clongdouble_wrapper Bx)\n"
+		"csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, signed char const [] Ax, \n"
+		"    int const n_samples, int const [] Bi, int const [] Bj, signed char [] Bx)\n"
+		"csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned char const [] Ax, \n"
+		"    int const n_samples, int const [] Bi, int const [] Bj, unsigned char [] Bx)\n"
+		"csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, short const [] Ax, \n"
+		"    int const n_samples, int const [] Bi, int const [] Bj, short [] Bx)\n"
+		"csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned short const [] Ax, \n"
+		"    int const n_samples, int const [] Bi, int const [] Bj, unsigned short [] Bx)\n"
+		"csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, int const [] Ax, \n"
+		"    int const n_samples, int const [] Bi, int const [] Bj, int [] Bx)\n"
+		"csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned int const [] Ax, \n"
+		"    int const n_samples, int const [] Bi, int const [] Bj, unsigned int [] Bx)\n"
+		"csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long long const [] Ax, \n"
+		"    int const n_samples, int const [] Bi, int const [] Bj, long long [] Bx)\n"
+		"csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, unsigned long long const [] Ax, \n"
+		"    int const n_samples, int const [] Bi, int const [] Bj, unsigned long long [] Bx)\n"
+		"csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, float const [] Ax, \n"
+		"    int const n_samples, int const [] Bi, int const [] Bj, float [] Bx)\n"
+		"csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, double const [] Ax, \n"
+		"    int const n_samples, int const [] Bi, int const [] Bj, double [] Bx)\n"
+		"csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, long double const [] Ax, \n"
+		"    int const n_samples, int const [] Bi, int const [] Bj, long double [] Bx)\n"
+		"csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cfloat_wrapper const [] Ax, \n"
+		"    int const n_samples, int const [] Bi, int const [] Bj, npy_cfloat_wrapper [] Bx)\n"
+		"csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_cdouble_wrapper const [] Ax, \n"
+		"    int const n_samples, int const [] Bi, int const [] Bj, \n"
+		"    npy_cdouble_wrapper [] Bx)\n"
+		"csr_sample_values(int const n_row, int const n_col, int const [] Ap, int const [] Aj, npy_clongdouble_wrapper const [] Ax, \n"
+		"    int const n_samples, int const [] Bi, int const [] Bj, \n"
+		"    npy_clongdouble_wrapper [] Bx)\n"
 		""},
 	 { NULL, NULL, 0, NULL }
 };
@@ -49787,24 +50044,23 @@ extern "C" {
   swig_varlink_type(void) {
     static char varlink__doc__[] = "Swig var link object";
     static PyTypeObject varlink_type;
-    static int type_init = 0;  
+    static int type_init = 0;
     if (!type_init) {
-      const PyTypeObject tmp
-      = {
+      const PyTypeObject tmp = {
         /* PyObject header changed in Python 3 */
 #if PY_VERSION_HEX >= 0x03000000
-        PyVarObject_HEAD_INIT(&PyType_Type, 0)
+        PyVarObject_HEAD_INIT(NULL, 0)
 #else
         PyObject_HEAD_INIT(NULL)
-        0,                                  /* Number of items in variable part (ob_size) */
+        0,                                  /* ob_size */
 #endif
-        (char *)"swigvarlink",              /* Type name (tp_name) */
-        sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
-        0,                                  /* Itemsize (tp_itemsize) */
-        (destructor) swig_varlink_dealloc,  /* Deallocator (tp_dealloc) */ 
-        (printfunc) swig_varlink_print,     /* Print (tp_print) */
-        (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
-        (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
+        (char *)"swigvarlink",              /* tp_name */
+        sizeof(swig_varlinkobject),         /* tp_basicsize */
+        0,                                  /* tp_itemsize */
+        (destructor) swig_varlink_dealloc,  /* tp_dealloc */
+        (printfunc) swig_varlink_print,     /* tp_print */
+        (getattrfunc) swig_varlink_getattr, /* tp_getattr */
+        (setattrfunc) swig_varlink_setattr, /* tp_setattr */
         0,                                  /* tp_compare */
         (reprfunc) swig_varlink_repr,       /* tp_repr */
         0,                                  /* tp_as_number */
@@ -49828,16 +50084,21 @@ extern "C" {
 #if PY_VERSION_HEX >= 0x02030000
         0,                                  /* tp_del */
 #endif
+#if PY_VERSION_HEX >= 0x02060000
+        0,                                  /* tp_version */
+#endif
 #ifdef COUNT_ALLOCS
         0,0,0,0                             /* tp_alloc -> tp_next */
 #endif
       };
       varlink_type = tmp;
-      /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
-#if PY_VERSION_HEX < 0x03000000
+      type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
       varlink_type.ob_type = &PyType_Type;
+#else
+      if (PyType_Ready(&varlink_type) < 0)
+      return NULL;
 #endif
-      type_init = 1;
     }
     return &varlink_type;
   }
@@ -49888,7 +50149,7 @@ extern "C" {
     for (i = 0; constants[i].type; ++i) {
       switch(constants[i].type) {
       case SWIG_PY_POINTER:
-        obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
+        obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
         break;
       case SWIG_PY_BINARY:
         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
@@ -49969,10 +50230,19 @@ PyObject*
 void
 #endif
 SWIG_init(void) {
-  PyObject *m, *d;  
+  PyObject *m, *d, *md;
 #if PY_VERSION_HEX >= 0x03000000
   static struct PyModuleDef SWIG_module = {
+# if PY_VERSION_HEX >= 0x03020000
     PyModuleDef_HEAD_INIT,
+# else
+    {
+      PyObject_HEAD_INIT(NULL)
+      NULL, /* m_init */
+      0,    /* m_index */
+      NULL, /* m_copy */
+    },
+# endif
     (char *) SWIG_name,
     NULL,
     -1,
@@ -49984,6 +50254,49 @@ SWIG_init(void) {
   };
 #endif
   
+#if defined(SWIGPYTHON_BUILTIN)
+  static SwigPyClientData SwigPyObject_clientdata = {
+    0, 0, 0, 0, 0, 0, 0
+  };
+  static PyGetSetDef this_getset_def = {
+    (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
+  };
+  static SwigPyGetSet thisown_getset_closure = {
+    (PyCFunction) SwigPyObject_own,
+    (PyCFunction) SwigPyObject_own
+  };
+  static PyGetSetDef thisown_getset_def = {
+    (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
+  };
+  PyObject *metatype_args;
+  PyTypeObject *builtin_pytype;
+  int builtin_base_count;
+  swig_type_info *builtin_basetype;
+  PyObject *tuple;
+  PyGetSetDescrObject *static_getset;
+  PyTypeObject *metatype;
+  SwigPyClientData *cd;
+  PyObject *public_interface, *public_symbol;
+  PyObject *this_descr;
+  PyObject *thisown_descr;
+  int i;
+  
+  (void)builtin_pytype;
+  (void)builtin_base_count;
+  (void)builtin_basetype;
+  (void)tuple;
+  (void)static_getset;
+  
+  /* metatype is used to implement static member variables. */
+  metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
+  assert(metatype_args);
+  metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
+  assert(metatype);
+  Py_DECREF(metatype_args);
+  metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
+  assert(PyType_Ready(metatype) >= 0);
+#endif
+  
   /* Fix SwigMethods to carry the callback ptrs when needed */
   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
   
@@ -49992,11 +50305,47 @@ SWIG_init(void) {
 #else
   m = Py_InitModule((char *) SWIG_name, SwigMethods);
 #endif
-  d = PyModule_GetDict(m);
+  md = d = PyModule_GetDict(m);
   
   SWIG_InitializeModule(0);
-  SWIG_InstallConstants(d,swig_const_table);
   
+#ifdef SWIGPYTHON_BUILTIN
+  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
+  assert(SwigPyObject_stype);
+  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
+  if (!cd) {
+    SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
+    SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
+  } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
+    PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
+# if PY_VERSION_HEX >= 0x03000000
+    return NULL;
+# else
+    return;
+# endif
+  }
+  
+  /* All objects have a 'this' attribute */
+  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
+  (void)this_descr;
+  
+  /* All objects have a 'thisown' attribute */
+  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
+  (void)thisown_descr;
+  
+  public_interface = PyList_New(0);
+  public_symbol = 0;
+  (void)public_symbol;
+  
+  PyDict_SetItemString(md, "__all__", public_interface);
+  Py_DECREF(public_interface);
+  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
+  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
+  for (i = 0; swig_const_table[i].name != 0; ++i)
+  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
+#endif
+  
+  SWIG_InstallConstants(d,swig_const_table);
   
   
   import_array();
diff --git a/scipy/sparse/sparsetools/dia.py b/scipy/sparse/sparsetools/dia.py
index 896dcec..4e8c1c3 100644
--- a/scipy/sparse/sparsetools/dia.py
+++ b/scipy/sparse/sparsetools/dia.py
@@ -1,9 +1,10 @@
 # This file was automatically generated by SWIG (http://www.swig.org).
-# Version 2.0.1+capsulehack
+# Version 2.0.7
 #
 # Do not make changes to this file unless you know what you are doing--modify
 # the SWIG interface file instead.
-# This file is compatible with both classic and new-style classes.
+
+
 
 from sys import version_info
 if version_info >= (2,6,0):
@@ -39,7 +40,7 @@ def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
             return
     method = class_type.__swig_setmethods__.get(name,None)
     if method: return method(self,value)
-    if (not static) or hasattr(self,name):
+    if (not static):
         self.__dict__[name] = value
     else:
         raise AttributeError("You cannot add attributes to %s" % self)
@@ -66,40 +67,41 @@ except AttributeError:
     _newclass = 0
 
 
+
 def dia_matvec(*args):
+  """
+    dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, 
+        signed char const [] diags, signed char const [] Xx, signed char [] Yx)
+    dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, 
+        unsigned char const [] diags, unsigned char const [] Xx, unsigned char [] Yx)
+    dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, 
+        short const [] diags, short const [] Xx, short [] Yx)
+    dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, 
+        unsigned short const [] diags, unsigned short const [] Xx, unsigned short [] Yx)
+    dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, 
+        int const [] diags, int const [] Xx, int [] Yx)
+    dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, 
+        unsigned int const [] diags, unsigned int const [] Xx, unsigned int [] Yx)
+    dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, 
+        long long const [] diags, long long const [] Xx, long long [] Yx)
+    dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, 
+        unsigned long long const [] diags, unsigned long long const [] Xx, unsigned long long [] Yx)
+    dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, 
+        float const [] diags, float const [] Xx, float [] Yx)
+    dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, 
+        double const [] diags, double const [] Xx, double [] Yx)
+    dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, 
+        long double const [] diags, long double const [] Xx, long double [] Yx)
+    dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, 
+        npy_cfloat_wrapper const [] diags, npy_cfloat_wrapper const [] Xx, npy_cfloat_wrapper [] Yx)
+    dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, 
+        npy_cdouble_wrapper const [] diags, npy_cdouble_wrapper const [] Xx, 
+        npy_cdouble_wrapper [] Yx)
+    dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, 
+        npy_clongdouble_wrapper const [] diags, npy_clongdouble_wrapper const [] Xx, 
+        npy_clongdouble_wrapper [] Yx)
     """
-    dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets,
-        signed char diags, signed char Xx, signed char Yx)
-    dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets,
-        unsigned char diags, unsigned char Xx, unsigned char Yx)
-    dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets,
-        short diags, short Xx, short Yx)
-    dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets,
-        unsigned short diags, unsigned short Xx,
-        unsigned short Yx)
-    dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets,
-        int diags, int Xx, int Yx)
-    dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets,
-        unsigned int diags, unsigned int Xx, unsigned int Yx)
-    dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets,
-        long long diags, long long Xx, long long Yx)
-    dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets,
-        unsigned long long diags, unsigned long long Xx,
-        unsigned long long Yx)
-    dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets,
-        float diags, float Xx, float Yx)
-    dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets,
-        double diags, double Xx, double Yx)
-    dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets,
-        long double diags, long double Xx, long double Yx)
-    dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets,
-        npy_cfloat_wrapper diags, npy_cfloat_wrapper Xx,
-        npy_cfloat_wrapper Yx)
-    dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets,
-        npy_cdouble_wrapper diags, npy_cdouble_wrapper Xx,
-        npy_cdouble_wrapper Yx)
-    dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets,
-        npy_clongdouble_wrapper diags, npy_clongdouble_wrapper Xx,
-        npy_clongdouble_wrapper Yx)
-    """
-    return _dia.dia_matvec(*args)
+  return _dia.dia_matvec(*args)
+# This file is compatible with both classic and new-style classes.
+
+
diff --git a/scipy/sparse/sparsetools/dia_wrap.cxx b/scipy/sparse/sparsetools/dia_wrap.cxx
index e97be05..c23e060 100644
--- a/scipy/sparse/sparsetools/dia_wrap.cxx
+++ b/scipy/sparse/sparsetools/dia_wrap.cxx
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.1+capsulehack
+ * Version 2.0.7
  * 
  * This file is not intended to be easily readable and contains a number of 
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -756,7 +756,16 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
 #define PyInt_Check(x) PyLong_Check(x)
 #define PyInt_AsLong(x) PyLong_AsLong(x)
 #define PyInt_FromLong(x) PyLong_FromLong(x)
+#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
+#define PyString_Check(name) PyBytes_Check(name)
+#define PyString_FromString(x) PyUnicode_FromString(x)
 #define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
+#define PyString_AsString(str) PyBytes_AsString(str)
+#define PyString_Size(str) PyBytes_Size(str)	
+#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
+#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
+#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
+#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
 
 #endif
 
@@ -896,6 +905,63 @@ PyObject *PyBool_FromLong(long ok)
 typedef int Py_ssize_t;
 # define PY_SSIZE_T_MAX INT_MAX
 # define PY_SSIZE_T_MIN INT_MIN
+typedef inquiry lenfunc;
+typedef intargfunc ssizeargfunc;
+typedef intintargfunc ssizessizeargfunc;
+typedef intobjargproc ssizeobjargproc;
+typedef intintobjargproc ssizessizeobjargproc;
+typedef getreadbufferproc readbufferproc;
+typedef getwritebufferproc writebufferproc;
+typedef getsegcountproc segcountproc;
+typedef getcharbufferproc charbufferproc;
+static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
+{
+  long result = 0;
+  PyObject *i = PyNumber_Int(x);
+  if (i) {
+    result = PyInt_AsLong(i);
+    Py_DECREF(i);
+  }
+  return result;
+}
+#endif
+
+#if PY_VERSION_HEX < 0x02040000
+#define Py_VISIT(op)				\
+  do { 						\
+    if (op) {					\
+      int vret = visit((op), arg);		\
+      if (vret)					\
+        return vret;				\
+    }						\
+  } while (0)
+#endif
+
+#if PY_VERSION_HEX < 0x02030000
+typedef struct {
+  PyTypeObject type;
+  PyNumberMethods as_number;
+  PyMappingMethods as_mapping;
+  PySequenceMethods as_sequence;
+  PyBufferProcs as_buffer;
+  PyObject *name, *slots;
+} PyHeapTypeObject;
+#endif
+
+#if PY_VERSION_HEX < 0x02030000
+typedef destructor freefunc;
+#endif
+
+#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
+     (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
+     (PY_MAJOR_VERSION > 3))
+# define SWIGPY_USE_CAPSULE
+# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
+#endif
+
+#if PY_VERSION_HEX < 0x03020000
+#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
+#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
 #endif
 
 /* -----------------------------------------------------------------------------
@@ -1042,9 +1108,6 @@ SWIG_Python_AddErrorMsg(const char* mesg)
 
 #ifdef __cplusplus
 extern "C" {
-#if 0
-} /* cc-mode */
-#endif
 #endif
 
 /* -----------------------------------------------------------------------------
@@ -1070,19 +1133,19 @@ typedef struct swig_const_info {
  * Wrapper of PyInstanceMethod_New() used in Python 3
  * It is exported to the generated module, used for -fastproxy
  * ----------------------------------------------------------------------------- */
-SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
-{
 #if PY_VERSION_HEX >= 0x03000000
+SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
+{
   return PyInstanceMethod_New(func);
+}
 #else
+SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
+{
   return NULL;
-#endif
 }
+#endif
 
 #ifdef __cplusplus
-#if 0
-{ /* cc-mode */
-#endif
 }
 #endif
 
@@ -1102,7 +1165,15 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
 #define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
-#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(ptr, type, flags)
+
+#ifdef SWIGPYTHON_BUILTIN
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
+#else
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
+#endif
+
+#define SWIG_InternalNewPointerObj(ptr, type, flags)	SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
+
 #define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
 #define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
 #define swig_owntype                                    int
@@ -1117,7 +1188,7 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
 
 /* for C or C++ function pointers */
 #define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
-#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(ptr, type, 0)
+#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
 
 /* for C++ member pointers, ie, member methods */
 #define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
@@ -1134,18 +1205,8 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
 #define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
 #define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
 #define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
-#define SWIG_fail                        		goto fail				
+#define SWIG_fail                        		goto fail					   
 
-/*
- * Python 2.7 and newer and Python 3.1 and newer should use Capsules API instead of
- * CObjects API.
- */
-#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
-     (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0))
-#define USE_CAPSULES
-#define TYPE_POINTER_NAME \
-    ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
-#endif
 
 /* Runtime API implementation */
 
@@ -1162,7 +1223,7 @@ SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
 SWIGINTERN void 
 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
   SWIG_PYTHON_THREAD_BEGIN_BLOCK;
-  PyErr_SetString(errtype, (char *) msg);
+  PyErr_SetString(errtype, msg);
   SWIG_PYTHON_THREAD_END_BLOCK;
 }
 
@@ -1170,12 +1231,41 @@ SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
 
 /* Set a constant value */
 
+#if defined(SWIGPYTHON_BUILTIN)
+
+SWIGINTERN void
+SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
+  PyObject *s = PyString_InternFromString(key);
+  PyList_Append(seq, s);
+  Py_DECREF(s);
+}
+
+SWIGINTERN void
+SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
+#if PY_VERSION_HEX < 0x02030000
+  PyDict_SetItemString(d, (char *)name, obj);
+#else
+  PyDict_SetItemString(d, name, obj);
+#endif
+  Py_DECREF(obj);
+  if (public_interface)
+    SwigPyBuiltin_AddPublicSymbol(public_interface, name);
+}
+
+#else
+
 SWIGINTERN void
 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
-  PyDict_SetItemString(d, (char*) name, obj);
+#if PY_VERSION_HEX < 0x02030000
+  PyDict_SetItemString(d, (char *)name, obj);
+#else
+  PyDict_SetItemString(d, name, obj);
+#endif
   Py_DECREF(obj);                            
 }
 
+#endif
+
 /* Append a value to the result obj */
 
 SWIGINTERN PyObject*
@@ -1236,6 +1326,14 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
     }
   }  
   if (!PyTuple_Check(args)) {
+    if (min <= 1 && max >= 1) {
+      register int i;
+      objs[0] = args;
+      for (i = 1; i < max; ++i) {
+	objs[i] = 0;
+      }
+      return 2;
+    }
     PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
     return 0;
   } else {
@@ -1288,11 +1386,11 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
 
 #define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
 
+#define SWIG_BUILTIN_TP_INIT	    (SWIG_POINTER_OWN << 2)
+#define SWIG_BUILTIN_INIT	    (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
+
 #ifdef __cplusplus
 extern "C" {
-#if 0
-} /* cc-mode */
-#endif
 #endif
 
 /*  How to access Py_None */
@@ -1343,6 +1441,7 @@ typedef struct {
   PyObject *destroy;
   int delargs;
   int implicitconv;
+  PyTypeObject *pytype;
 } SwigPyClientData;
 
 SWIGRUNTIMEINLINE int 
@@ -1409,13 +1508,13 @@ SwigPyClientData_New(PyObject* obj)
       data->delargs = 0;
     }
     data->implicitconv = 0;
+    data->pytype = 0;
     return data;
   }
 }
 
 SWIGRUNTIME void 
-SwigPyClientData_Del(SwigPyClientData* data)
-{
+SwigPyClientData_Del(SwigPyClientData *data) {
   Py_XDECREF(data->newraw);
   Py_XDECREF(data->newargs);
   Py_XDECREF(data->destroy);
@@ -1429,6 +1528,9 @@ typedef struct {
   swig_type_info *ty;
   int own;
   PyObject *next;
+#ifdef SWIGPYTHON_BUILTIN
+  PyObject *dict;
+#endif
 } SwigPyObject;
 
 SWIGRUNTIME PyObject *
@@ -1479,21 +1581,21 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
 #endif
 {
   const char *name = SWIG_TypePrettyName(v->ty);
-  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v);
+  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
   if (v->next) {
-#ifdef METH_NOARGS
+# ifdef METH_NOARGS
     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
-#else
+# else
     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
-#endif
-#if PY_VERSION_HEX >= 0x03000000
+# endif
+# if PY_VERSION_HEX >= 0x03000000
     PyObject *joined = PyUnicode_Concat(repr, nrep);
     Py_DecRef(repr);
     Py_DecRef(nrep);
     repr = joined;
-#else
+# else
     PyString_ConcatAndDel(&repr,nrep);
-#endif
+# endif
   }
   return repr;  
 }
@@ -1543,27 +1645,43 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
     Py_INCREF(Py_NotImplemented);
     return Py_NotImplemented;
   }
-  if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) )
-    res = Py_True;
-  else
-    res = Py_False;
-  Py_INCREF(res);
+  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
   return res;  
 }
 
 
-SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
+SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
 
+#ifdef SWIGPYTHON_BUILTIN
+static swig_type_info *SwigPyObject_stype = 0;
 SWIGRUNTIME PyTypeObject*
 SwigPyObject_type(void) {
-  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
+    SwigPyClientData *cd;
+    assert(SwigPyObject_stype);
+    cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
+    assert(cd);
+    assert(cd->pytype);
+    return cd->pytype;
+}
+#else
+SWIGRUNTIME PyTypeObject*
+SwigPyObject_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
   return type;
 }
+#endif
 
 SWIGRUNTIMEINLINE int
 SwigPyObject_Check(PyObject *op) {
+#ifdef SWIGPYTHON_BUILTIN
+  PyTypeObject *target_tp = SwigPyObject_type();
+  if (PyType_IsSubtype(op->ob_type, target_tp))
+    return 1;
+  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
+#else
   return (Py_TYPE(op) == SwigPyObject_type())
     || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
+#endif
 }
 
 SWIGRUNTIME PyObject *
@@ -1667,8 +1785,10 @@ SwigPyObject_own(PyObject *v, PyObject *args)
   PyObject *val = 0;
 #if (PY_VERSION_HEX < 0x02020000)
   if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
-#else
+#elif (PY_VERSION_HEX < 0x02050000)
   if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
+#else
+  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) 
 #endif
     {
       return NULL;
@@ -1729,9 +1849,9 @@ SwigPyObject_getattr(SwigPyObject *sobj,char *name)
 #endif
 
 SWIGRUNTIME PyTypeObject*
-_PySwigObject_type(void) {
+SwigPyObject_TypeOnce(void) {
   static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
-  
+
   static PyNumberMethods SwigPyObject_as_number = {
     (binaryfunc)0, /*nb_add*/
     (binaryfunc)0, /*nb_subtract*/
@@ -1778,85 +1898,89 @@ _PySwigObject_type(void) {
 #endif
   };
 
-  static PyTypeObject swigpyobject_type;  
+  static PyTypeObject swigpyobject_type;
   static int type_init = 0;
   if (!type_init) {
-    const PyTypeObject tmp
-      = {
-	/* PyObject header changed in Python 3 */
+    const PyTypeObject tmp = {
+      /* PyObject header changed in Python 3 */
 #if PY_VERSION_HEX >= 0x03000000
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-#else    
-	PyObject_HEAD_INIT(NULL)
-	0,				    /* ob_size */
-#endif
-	(char *)"SwigPyObject",		    /* tp_name */
-	sizeof(SwigPyObject),		    /* tp_basicsize */
-	0,			            /* tp_itemsize */
-	(destructor)SwigPyObject_dealloc,   /* tp_dealloc */
-	(printfunc)SwigPyObject_print,	    /* tp_print */
+      PyVarObject_HEAD_INIT(NULL, 0)
+#else
+      PyObject_HEAD_INIT(NULL)
+      0,                                    /* ob_size */
+#endif
+      (char *)"SwigPyObject",               /* tp_name */
+      sizeof(SwigPyObject),                 /* tp_basicsize */
+      0,                                    /* tp_itemsize */
+      (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
+      (printfunc)SwigPyObject_print,        /* tp_print */
 #if PY_VERSION_HEX < 0x02020000
-	(getattrfunc)SwigPyObject_getattr,  /* tp_getattr */ 
+      (getattrfunc)SwigPyObject_getattr,    /* tp_getattr */
 #else
-	(getattrfunc)0,			    /* tp_getattr */ 
+      (getattrfunc)0,                       /* tp_getattr */
 #endif
-	(setattrfunc)0,			    /* tp_setattr */ 
+      (setattrfunc)0,                       /* tp_setattr */
 #if PY_VERSION_HEX >= 0x03000000
     0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
 #else
-	(cmpfunc)SwigPyObject_compare,	    /* tp_compare */
-#endif
-	(reprfunc)SwigPyObject_repr,	    /* tp_repr */    
-	&SwigPyObject_as_number,	    /* tp_as_number */
-	0,				    /* tp_as_sequence */
-	0,				    /* tp_as_mapping */
-	(hashfunc)0,			    /* tp_hash */
-	(ternaryfunc)0,			    /* tp_call */
-	(reprfunc)SwigPyObject_str,	    /* tp_str */
-	PyObject_GenericGetAttr,            /* tp_getattro */
-	0,				    /* tp_setattro */
-	0,		                    /* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
-	swigobject_doc, 	            /* tp_doc */        
-	0,                                  /* tp_traverse */
-	0,                                  /* tp_clear */
-	(richcmpfunc)SwigPyObject_richcompare,           /* tp_richcompare */
-	0,                                  /* tp_weaklistoffset */
+      (cmpfunc)SwigPyObject_compare,        /* tp_compare */
+#endif
+      (reprfunc)SwigPyObject_repr,          /* tp_repr */
+      &SwigPyObject_as_number,              /* tp_as_number */
+      0,                                    /* tp_as_sequence */
+      0,                                    /* tp_as_mapping */
+      (hashfunc)0,                          /* tp_hash */
+      (ternaryfunc)0,                       /* tp_call */
+      (reprfunc)SwigPyObject_str,           /* tp_str */
+      PyObject_GenericGetAttr,              /* tp_getattro */
+      0,                                    /* tp_setattro */
+      0,                                    /* tp_as_buffer */
+      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
+      swigobject_doc,                       /* tp_doc */
+      0,                                    /* tp_traverse */
+      0,                                    /* tp_clear */
+      (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
+      0,                                    /* tp_weaklistoffset */
 #if PY_VERSION_HEX >= 0x02020000
-	0,                                  /* tp_iter */
-	0,                                  /* tp_iternext */
-	swigobject_methods,		    /* tp_methods */ 
-	0,			            /* tp_members */
-	0,				    /* tp_getset */	    	
-	0,			            /* tp_base */	        
-	0,				    /* tp_dict */	    	
-	0,				    /* tp_descr_get */  	
-	0,				    /* tp_descr_set */  	
-	0,				    /* tp_dictoffset */ 	
-	0,				    /* tp_init */	    	
-	0,				    /* tp_alloc */	    	
-	0,			            /* tp_new */	    	
-	0,	                            /* tp_free */	   
-	0,                                  /* tp_is_gc */  
-	0,				    /* tp_bases */   
-	0,				    /* tp_mro */
-	0,				    /* tp_cache */   
-	0,				    /* tp_subclasses */
-	0,				    /* tp_weaklist */
+      0,                                    /* tp_iter */
+      0,                                    /* tp_iternext */
+      swigobject_methods,                   /* tp_methods */
+      0,                                    /* tp_members */
+      0,                                    /* tp_getset */
+      0,                                    /* tp_base */
+      0,                                    /* tp_dict */
+      0,                                    /* tp_descr_get */
+      0,                                    /* tp_descr_set */
+      0,                                    /* tp_dictoffset */
+      0,                                    /* tp_init */
+      0,                                    /* tp_alloc */
+      0,                                    /* tp_new */
+      0,                                    /* tp_free */
+      0,                                    /* tp_is_gc */
+      0,                                    /* tp_bases */
+      0,                                    /* tp_mro */
+      0,                                    /* tp_cache */
+      0,                                    /* tp_subclasses */
+      0,                                    /* tp_weaklist */
 #endif
 #if PY_VERSION_HEX >= 0x02030000
-	0,                                  /* tp_del */
+      0,                                    /* tp_del */
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+      0,                                    /* tp_version */
 #endif
 #ifdef COUNT_ALLOCS
-	0,0,0,0                             /* tp_alloc -> tp_next */
+      0,0,0,0                               /* tp_alloc -> tp_next */
 #endif
-      };
+    };
     swigpyobject_type = tmp;
-    /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
-#if PY_VERSION_HEX < 0x03000000
+    type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
     swigpyobject_type.ob_type = &PyType_Type;
+#else
+    if (PyType_Ready(&swigpyobject_type) < 0)
+      return NULL;
 #endif
-    type_init = 1;
   }
   return &swigpyobject_type;
 }
@@ -1930,17 +2054,17 @@ SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
   return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
 }
 
-SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
+SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
 
 SWIGRUNTIME PyTypeObject*
 SwigPyPacked_type(void) {
-  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
   return type;
 }
 
 SWIGRUNTIMEINLINE int
 SwigPyPacked_Check(PyObject *op) {
-  return ((op)->ob_type == _PySwigPacked_type()) 
+  return ((op)->ob_type == SwigPyPacked_TypeOnce()) 
     || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
 }
 
@@ -1955,83 +2079,87 @@ SwigPyPacked_dealloc(PyObject *v)
 }
 
 SWIGRUNTIME PyTypeObject*
-_PySwigPacked_type(void) {
+SwigPyPacked_TypeOnce(void) {
   static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
   static PyTypeObject swigpypacked_type;
-  static int type_init = 0;  
+  static int type_init = 0;
   if (!type_init) {
-    const PyTypeObject tmp
-      = {
-    /* PyObject header changed in Python 3 */
+    const PyTypeObject tmp = {
+      /* PyObject header changed in Python 3 */
 #if PY_VERSION_HEX>=0x03000000
-    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+      PyVarObject_HEAD_INIT(NULL, 0)
 #else
-	PyObject_HEAD_INIT(NULL)
-    0,				    /* ob_size */	
-#endif
-	(char *)"SwigPyPacked",		    /* tp_name */	
-	sizeof(SwigPyPacked),		    /* tp_basicsize */	
-	0,				    /* tp_itemsize */	
-	(destructor)SwigPyPacked_dealloc,   /* tp_dealloc */	
-	(printfunc)SwigPyPacked_print,	    /* tp_print */   	
-	(getattrfunc)0,			    /* tp_getattr */ 	
-	(setattrfunc)0,			    /* tp_setattr */ 	
+      PyObject_HEAD_INIT(NULL)
+      0,                                    /* ob_size */
+#endif
+      (char *)"SwigPyPacked",               /* tp_name */
+      sizeof(SwigPyPacked),                 /* tp_basicsize */
+      0,                                    /* tp_itemsize */
+      (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
+      (printfunc)SwigPyPacked_print,        /* tp_print */
+      (getattrfunc)0,                       /* tp_getattr */
+      (setattrfunc)0,                       /* tp_setattr */
 #if PY_VERSION_HEX>=0x03000000
-    0, /* tp_reserved in 3.0.1 */
+      0, /* tp_reserved in 3.0.1 */
 #else
-    (cmpfunc)SwigPyPacked_compare,	    /* tp_compare */
-#endif
-	(reprfunc)SwigPyPacked_repr,	    /* tp_repr */
-	0,	                            /* tp_as_number */
-	0,				    /* tp_as_sequence */
-	0,				    /* tp_as_mapping */
-	(hashfunc)0,			    /* tp_hash */
-	(ternaryfunc)0,			    /* tp_call */
-	(reprfunc)SwigPyPacked_str,	    /* tp_str */
-	PyObject_GenericGetAttr,            /* tp_getattro */
-	0,				    /* tp_setattro */
-	0,		                    /* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
-	swigpacked_doc, 	            /* tp_doc */
-	0,                                  /* tp_traverse */
-	0,                                  /* tp_clear */
-	0,                                  /* tp_richcompare */
-	0,                                  /* tp_weaklistoffset */
+      (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
+#endif
+      (reprfunc)SwigPyPacked_repr,          /* tp_repr */
+      0,                                    /* tp_as_number */
+      0,                                    /* tp_as_sequence */
+      0,                                    /* tp_as_mapping */
+      (hashfunc)0,                          /* tp_hash */
+      (ternaryfunc)0,                       /* tp_call */
+      (reprfunc)SwigPyPacked_str,           /* tp_str */
+      PyObject_GenericGetAttr,              /* tp_getattro */
+      0,                                    /* tp_setattro */
+      0,                                    /* tp_as_buffer */
+      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
+      swigpacked_doc,                       /* tp_doc */
+      0,                                    /* tp_traverse */
+      0,                                    /* tp_clear */
+      0,                                    /* tp_richcompare */
+      0,                                    /* tp_weaklistoffset */
 #if PY_VERSION_HEX >= 0x02020000
-	0,                                  /* tp_iter */
-	0,                                  /* tp_iternext */
-	0,		                    /* tp_methods */ 
-	0,			            /* tp_members */
-	0,				    /* tp_getset */	    	
-	0,			            /* tp_base */	        
-	0,				    /* tp_dict */	    	
-	0,				    /* tp_descr_get */  	
-	0,				    /* tp_descr_set */  	
-	0,				    /* tp_dictoffset */ 	
-	0,				    /* tp_init */	    	
-	0,				    /* tp_alloc */	    	
-	0,			            /* tp_new */	    	
-	0, 	                            /* tp_free */	   
-        0,                                  /* tp_is_gc */  
-	0,				    /* tp_bases */   
-	0,				    /* tp_mro */
-	0,				    /* tp_cache */   
- 	0,				    /* tp_subclasses */
-	0,				    /* tp_weaklist */
+      0,                                    /* tp_iter */
+      0,                                    /* tp_iternext */
+      0,                                    /* tp_methods */
+      0,                                    /* tp_members */
+      0,                                    /* tp_getset */
+      0,                                    /* tp_base */
+      0,                                    /* tp_dict */
+      0,                                    /* tp_descr_get */
+      0,                                    /* tp_descr_set */
+      0,                                    /* tp_dictoffset */
+      0,                                    /* tp_init */
+      0,                                    /* tp_alloc */
+      0,                                    /* tp_new */
+      0,                                    /* tp_free */
+      0,                                    /* tp_is_gc */
+      0,                                    /* tp_bases */
+      0,                                    /* tp_mro */
+      0,                                    /* tp_cache */
+      0,                                    /* tp_subclasses */
+      0,                                    /* tp_weaklist */
 #endif
 #if PY_VERSION_HEX >= 0x02030000
-	0,                                  /* tp_del */
+      0,                                    /* tp_del */
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+      0,                                    /* tp_version */
 #endif
 #ifdef COUNT_ALLOCS
-	0,0,0,0                             /* tp_alloc -> tp_next */
+      0,0,0,0                               /* tp_alloc -> tp_next */
 #endif
-      };
+    };
     swigpypacked_type = tmp;
-    /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */
-#if PY_VERSION_HEX < 0x03000000
+    type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
     swigpypacked_type.ob_type = &PyType_Type;
+#else
+    if (PyType_Ready(&swigpypacked_type) < 0)
+      return NULL;
 #endif
-    type_init = 1;
   }
   return &swigpypacked_type;
 }
@@ -2098,50 +2226,65 @@ SWIG_This(void)
 SWIGRUNTIME SwigPyObject *
 SWIG_Python_GetSwigThis(PyObject *pyobj) 
 {
-  if (SwigPyObject_Check(pyobj)) {
+  PyObject *obj;
+
+  if (SwigPyObject_Check(pyobj))
     return (SwigPyObject *) pyobj;
-  } else {
-    PyObject *obj = 0;
+
+#ifdef SWIGPYTHON_BUILTIN
+  (void)obj;
+# ifdef PyWeakref_CheckProxy
+  if (PyWeakref_CheckProxy(pyobj)) {
+    pyobj = PyWeakref_GET_OBJECT(pyobj);
+    if (pyobj && SwigPyObject_Check(pyobj))
+      return (SwigPyObject*) pyobj;
+  }
+# endif
+  return NULL;
+#else
+
+  obj = 0;
+
 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
-    if (PyInstance_Check(pyobj)) {
-      obj = _PyInstance_Lookup(pyobj, SWIG_This());      
+  if (PyInstance_Check(pyobj)) {
+    obj = _PyInstance_Lookup(pyobj, SWIG_This());      
+  } else {
+    PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
+    if (dictptr != NULL) {
+      PyObject *dict = *dictptr;
+      obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
     } else {
-      PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
-      if (dictptr != NULL) {
-	PyObject *dict = *dictptr;
-	obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
-      } else {
 #ifdef PyWeakref_CheckProxy
-	if (PyWeakref_CheckProxy(pyobj)) {
-	  PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
-	  return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
-	}
+      if (PyWeakref_CheckProxy(pyobj)) {
+	PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
+	return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
+      }
 #endif
-	obj = PyObject_GetAttr(pyobj,SWIG_This());
-	if (obj) {
-	  Py_DECREF(obj);
-	} else {
-	  if (PyErr_Occurred()) PyErr_Clear();
-	  return 0;
-	}
+      obj = PyObject_GetAttr(pyobj,SWIG_This());
+      if (obj) {
+	Py_DECREF(obj);
+      } else {
+	if (PyErr_Occurred()) PyErr_Clear();
+	return 0;
       }
     }
+  }
 #else
-    obj = PyObject_GetAttr(pyobj,SWIG_This());
-    if (obj) {
-      Py_DECREF(obj);
-    } else {
-      if (PyErr_Occurred()) PyErr_Clear();
-      return 0;
-    }
+  obj = PyObject_GetAttr(pyobj,SWIG_This());
+  if (obj) {
+    Py_DECREF(obj);
+  } else {
+    if (PyErr_Occurred()) PyErr_Clear();
+    return 0;
+  }
 #endif
-    if (obj && !SwigPyObject_Check(obj)) {
-      /* a PyObject is called 'this', try to get the 'real this'
-	 SwigPyObject from it */ 
-      return SWIG_Python_GetSwigThis(obj);
-    }
-    return (SwigPyObject *)obj;
+  if (obj && !SwigPyObject_Check(obj)) {
+    /* a PyObject is called 'this', try to get the 'real this'
+       SwigPyObject from it */ 
+    return SWIG_Python_GetSwigThis(obj);
   }
+  return (SwigPyObject *)obj;
+#endif
 }
 
 /* Acquire a pointer value */
@@ -2163,91 +2306,97 @@ SWIG_Python_AcquirePtr(PyObject *obj, int own) {
 
 SWIGRUNTIME int
 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
-  if (!obj) return SWIG_ERROR;
+  int res;
+  SwigPyObject *sobj;
+
+  if (!obj)
+    return SWIG_ERROR;
   if (obj == Py_None) {
-    if (ptr) *ptr = 0;
+    if (ptr)
+      *ptr = 0;
     return SWIG_OK;
-  } else {
-    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
-    if (own)
-      *own = 0;
-    while (sobj) {
-      void *vptr = sobj->ptr;
-      if (ty) {
-	swig_type_info *to = sobj->ty;
-	if (to == ty) {
-	  /* no type cast needed */
-	  if (ptr) *ptr = vptr;
-	  break;
-	} else {
-	  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
-	  if (!tc) {
-	    sobj = (SwigPyObject *)sobj->next;
-	  } else {
-	    if (ptr) {
-              int newmemory = 0;
-              *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
-              if (newmemory == SWIG_CAST_NEW_MEMORY) {
-                assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
-                if (own)
-                  *own = *own | SWIG_CAST_NEW_MEMORY;
-              }
-            }
-	    break;
-	  }
-	}
+  }
+
+  res = SWIG_ERROR;
+
+  sobj = SWIG_Python_GetSwigThis(obj);
+  if (own)
+    *own = 0;
+  while (sobj) {
+    void *vptr = sobj->ptr;
+    if (ty) {
+      swig_type_info *to = sobj->ty;
+      if (to == ty) {
+        /* no type cast needed */
+        if (ptr) *ptr = vptr;
+        break;
       } else {
-	if (ptr) *ptr = vptr;
-	break;
-      }
-    }
-    if (sobj) {
-      if (own)
-        *own = *own | sobj->own;
-      if (flags & SWIG_POINTER_DISOWN) {
-	sobj->own = 0;
+        swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+        if (!tc) {
+          sobj = (SwigPyObject *)sobj->next;
+        } else {
+          if (ptr) {
+            int newmemory = 0;
+            *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+            if (newmemory == SWIG_CAST_NEW_MEMORY) {
+              assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
+              if (own)
+                *own = *own | SWIG_CAST_NEW_MEMORY;
+            }
+          }
+          break;
+        }
       }
-      return SWIG_OK;
     } else {
-      int res = SWIG_ERROR;
-      if (flags & SWIG_POINTER_IMPLICIT_CONV) {
-	SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
-	if (data && !data->implicitconv) {
-	  PyObject *klass = data->klass;
-	  if (klass) {
-	    PyObject *impconv;
-	    data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
-	    impconv = SWIG_Python_CallFunctor(klass, obj);
-	    data->implicitconv = 0;
-	    if (PyErr_Occurred()) {
-	      PyErr_Clear();
-	      impconv = 0;
-	    }
-	    if (impconv) {
-	      SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
-	      if (iobj) {
-		void *vptr;
-		res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
-		if (SWIG_IsOK(res)) {
-		  if (ptr) {
-		    *ptr = vptr;
-		    /* transfer the ownership to 'ptr' */
-		    iobj->own = 0;
-		    res = SWIG_AddCast(res);
-		    res = SWIG_AddNewMask(res);
-		  } else {
-		    res = SWIG_AddCast(res);		    
-		  }
-		}
-	      }
-	      Py_DECREF(impconv);
-	    }
-	  }
-	}
+      if (ptr) *ptr = vptr;
+      break;
+    }
+  }
+  if (sobj) {
+    if (own)
+      *own = *own | sobj->own;
+    if (flags & SWIG_POINTER_DISOWN) {
+      sobj->own = 0;
+    }
+    res = SWIG_OK;
+  } else {
+    if (flags & SWIG_POINTER_IMPLICIT_CONV) {
+      SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
+      if (data && !data->implicitconv) {
+        PyObject *klass = data->klass;
+        if (klass) {
+          PyObject *impconv;
+          data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
+          impconv = SWIG_Python_CallFunctor(klass, obj);
+          data->implicitconv = 0;
+          if (PyErr_Occurred()) {
+            PyErr_Clear();
+            impconv = 0;
+          }
+          if (impconv) {
+            SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
+            if (iobj) {
+              void *vptr;
+              res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
+              if (SWIG_IsOK(res)) {
+                if (ptr) {
+                  *ptr = vptr;
+                  /* transfer the ownership to 'ptr' */
+                  iobj->own = 0;
+                  res = SWIG_AddCast(res);
+                  res = SWIG_AddNewMask(res);
+                } else {
+                  res = SWIG_AddCast(res);		    
+                }
+              }
+            }
+            Py_DECREF(impconv);
+          }
+        }
       }
-      return res;
     }
   }
+  return res;
 }
 
 /* Convert a function ptr value */
@@ -2401,7 +2550,7 @@ SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
 SWIGINTERN PyObject *
 SWIG_Python_InitShadowInstance(PyObject *args) {
   PyObject *obj[2];
-  if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
+  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
     return NULL;
   } else {
     SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
@@ -2417,22 +2566,54 @@ SWIG_Python_InitShadowInstance(PyObject *args) {
 /* Create a new pointer object */
 
 SWIGRUNTIME PyObject *
-SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
-  if (!ptr) {
+SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
+  SwigPyClientData *clientdata;
+  PyObject * robj;
+  int own;
+
+  if (!ptr)
     return SWIG_Py_Void();
-  } else {
-    int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
-    PyObject *robj = SwigPyObject_New(ptr, type, own);
-    SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
-    if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
-      PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
-      if (inst) {
-	Py_DECREF(robj);
-	robj = inst;
+
+  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
+  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
+  if (clientdata && clientdata->pytype) {
+    SwigPyObject *newobj;
+    if (flags & SWIG_BUILTIN_TP_INIT) {
+      newobj = (SwigPyObject*) self;
+      if (newobj->ptr) {
+        PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
+        while (newobj->next)
+	  newobj = (SwigPyObject *) newobj->next;
+        newobj->next = next_self;
+        newobj = (SwigPyObject *)next_self;
       }
+    } else {
+      newobj = PyObject_New(SwigPyObject, clientdata->pytype);
+    }
+    if (newobj) {
+      newobj->ptr = ptr;
+      newobj->ty = type;
+      newobj->own = own;
+      newobj->next = 0;
+#ifdef SWIGPYTHON_BUILTIN
+      newobj->dict = 0;
+#endif
+      return (PyObject*) newobj;
+    }
+    return SWIG_Py_Void();
+  }
+
+  assert(!(flags & SWIG_BUILTIN_TP_INIT));
+
+  robj = SwigPyObject_New(ptr, type, own);
+  if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
+    PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
+    if (inst) {
+      Py_DECREF(robj);
+      robj = inst;
     }
-    return robj;
   }
+  return robj;
 }
 
 /* Create a new packed object */
@@ -2458,12 +2639,12 @@ SWIG_Python_GetModule(void) {
 #ifdef SWIG_LINK_RUNTIME
     type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
 #else
-#ifdef USE_CAPSULES
-    type_pointer = PyCapsule_Import(TYPE_POINTER_NAME, 0);
-#else
+# ifdef SWIGPY_USE_CAPSULE
+    type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
+# else
     type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
 				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
-#endif
+# endif
     if (PyErr_Occurred()) {
       PyErr_Clear();
       type_pointer = (void *)0;
@@ -2506,16 +2687,19 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o)
 #endif
 
 SWIGRUNTIME void
+#ifdef SWIGPY_USE_CAPSULE
+SWIG_Python_DestroyModule(PyObject *obj)
+#else
 SWIG_Python_DestroyModule(void *vptr)
+#endif
 {
-  size_t i;
-#ifdef USE_CAPSULES
-  swig_module_info *swig_module =
-    (swig_module_info *) PyCapsule_GetPointer((PyObject *)vptr, TYPE_POINTER_NAME);
+#ifdef SWIGPY_USE_CAPSULE
+  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
 #else
   swig_module_info *swig_module = (swig_module_info *) vptr;
 #endif
   swig_type_info **types = swig_module->types;
+  size_t i;
   for (i =0; i < swig_module->size; ++i) {
     swig_type_info *ty = types[i];
     if (ty->owndata) {
@@ -2529,30 +2713,28 @@ SWIG_Python_DestroyModule(void *vptr)
 
 SWIGRUNTIME void
 SWIG_Python_SetModule(swig_module_info *swig_module) {
-  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
-
 #if PY_VERSION_HEX >= 0x03000000
  /* Add a dummy module object into sys.modules */
   PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
 #else
-  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
-				   swig_empty_runtime_method_table);
-#endif
-#ifdef USE_CAPSULES
-  PyObject *pointer = PyCapsule_New((void *)swig_module, TYPE_POINTER_NAME,
-				    (PyCapsule_Destructor)SWIG_Python_DestroyModule);
-#else
-  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
+  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
 #endif
+#ifdef SWIGPY_USE_CAPSULE
+  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
   if (pointer && module) {
-#ifdef USE_CAPSULES
     PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
+  } else {
+    Py_XDECREF(pointer);
+  }
 #else
+  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+  if (pointer && module) {
     PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
-#endif
   } else {
     Py_XDECREF(pointer);
   }
+#endif
 }
 
 /* The python cached type query */
@@ -2570,8 +2752,8 @@ SWIG_Python_TypeQuery(const char *type)
   PyObject *obj = PyDict_GetItem(cache, key);
   swig_type_info *descriptor;
   if (obj) {
-#ifdef USE_CAPSULES
-    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, type);
+#ifdef SWIGPY_USE_CAPSULE
+    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
 #else
     descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
 #endif
@@ -2579,8 +2761,8 @@ SWIG_Python_TypeQuery(const char *type)
     swig_module_info *swig_module = SWIG_Python_GetModule();
     descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
     if (descriptor) {
-#ifdef USE_CAPSULES
-      obj = PyCapsule_New(descriptor, type, NULL);
+#ifdef SWIGPY_USE_CAPSULE
+      obj = PyCapsule_New((void*) descriptor, NULL, NULL);
 #else
       obj = PyCObject_FromVoidPtr(descriptor, NULL);
 #endif
@@ -2644,7 +2826,7 @@ SwigPyObject_GetDesc(PyObject *self)
 {
   SwigPyObject *v = (SwigPyObject *)self;
   swig_type_info *ty = v ? v->ty : 0;
-  return ty ? ty->str : (char*)"";
+  return ty ? ty->str : "";
 }
 
 SWIGRUNTIME void
@@ -2687,7 +2869,7 @@ SWIG_Python_TypeError(const char *type, PyObject *obj)
 
 /* Convert a pointer value, signal an exception on a type mismatch */
 SWIGRUNTIME void *
-SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
+SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
   void *result;
   if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
     PyErr_Clear();
@@ -2701,11 +2883,62 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags)
   return result;
 }
 
+#ifdef SWIGPYTHON_BUILTIN
+SWIGRUNTIME int
+SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
+  PyTypeObject *tp = obj->ob_type;
+  PyObject *descr;
+  PyObject *encoded_name;
+  descrsetfunc f;
+  int res;
 
-#ifdef __cplusplus
-#if 0
-{ /* cc-mode */
+# ifdef Py_USING_UNICODE
+  if (PyString_Check(name)) {
+    name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
+    if (!name)
+      return -1;
+  } else if (!PyUnicode_Check(name))
+# else
+  if (!PyString_Check(name))
+# endif
+  {
+    PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
+    return -1;
+  } else {
+    Py_INCREF(name);
+  }
+
+  if (!tp->tp_dict) {
+    if (PyType_Ready(tp) < 0)
+      goto done;
+  }
+
+  res = -1;
+  descr = _PyType_Lookup(tp, name);
+  f = NULL;
+  if (descr != NULL)
+    f = descr->ob_type->tp_descr_set;
+  if (!f) {
+    if (PyString_Check(name)) {
+      encoded_name = name;
+      Py_INCREF(name);
+    } else {
+      encoded_name = PyUnicode_AsUTF8String(name);
+    }
+    PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
+    Py_DECREF(encoded_name);
+  } else {
+    res = f(descr, obj, value);
+  }
+  
+  done:
+  Py_DECREF(name);
+  return res;
+}
 #endif
+
+
+#ifdef __cplusplus
 }
 #endif
 
@@ -2745,7 +2978,7 @@ static swig_module_info swig_module = {swig_types, 1, 0, 0, 0, 0};
 #endif
 #define SWIG_name    "_dia"
 
-#define SWIGVERSION 0x020001 
+#define SWIGVERSION 0x020007 
 #define SWIG_VERSION SWIGVERSION
 
 
@@ -5077,8 +5310,8 @@ SWIGINTERN PyObject *_wrap_dia_matvec(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = (int)PyObject_Length(args);
-  for (ii = 0; (ii < argc) && (ii < 8); ii++) {
+  argc = args ? (int)PyObject_Length(args) : 0;
+  for (ii = 0; (ii < 8) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
   if (argc == 8) {
@@ -5771,46 +6004,43 @@ fail:
     "    dia_matvec< int,npy_cfloat_wrapper >(int const,int const,int const,int const,int const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper [])\n"
     "    dia_matvec< int,npy_cdouble_wrapper >(int const,int const,int const,int const,int const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper [])\n"
     "    dia_matvec< int,npy_clongdouble_wrapper >(int const,int const,int const,int const,int const [],npy_clongdouble_wrapper const [],npy_clongdouble_wrapper const [],npy_clongdouble_wrapper [])\n");
-  return NULL;
+  return 0;
 }
 
 
 static PyMethodDef SwigMethods[] = {
 	 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
 	 { (char *)"dia_matvec", _wrap_dia_matvec, METH_VARARGS, (char *)"\n"
-		"dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets, \n"
-		"    signed char diags, signed char Xx, signed char Yx)\n"
-		"dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets, \n"
-		"    unsigned char diags, unsigned char Xx, unsigned char Yx)\n"
-		"dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets, \n"
-		"    short diags, short Xx, short Yx)\n"
-		"dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets, \n"
-		"    unsigned short diags, unsigned short Xx, \n"
-		"    unsigned short Yx)\n"
-		"dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets, \n"
-		"    int diags, int Xx, int Yx)\n"
-		"dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets, \n"
-		"    unsigned int diags, unsigned int Xx, unsigned int Yx)\n"
-		"dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets, \n"
-		"    long long diags, long long Xx, long long Yx)\n"
-		"dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets, \n"
-		"    unsigned long long diags, unsigned long long Xx, \n"
-		"    unsigned long long Yx)\n"
-		"dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets, \n"
-		"    float diags, float Xx, float Yx)\n"
-		"dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets, \n"
-		"    double diags, double Xx, double Yx)\n"
-		"dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets, \n"
-		"    long double diags, long double Xx, long double Yx)\n"
-		"dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets, \n"
-		"    npy_cfloat_wrapper diags, npy_cfloat_wrapper Xx, \n"
-		"    npy_cfloat_wrapper Yx)\n"
-		"dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets, \n"
-		"    npy_cdouble_wrapper diags, npy_cdouble_wrapper Xx, \n"
-		"    npy_cdouble_wrapper Yx)\n"
-		"dia_matvec(int n_row, int n_col, int n_diags, int L, int offsets, \n"
-		"    npy_clongdouble_wrapper diags, npy_clongdouble_wrapper Xx, \n"
-		"    npy_clongdouble_wrapper Yx)\n"
+		"dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, \n"
+		"    signed char const [] diags, signed char const [] Xx, signed char [] Yx)\n"
+		"dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, \n"
+		"    unsigned char const [] diags, unsigned char const [] Xx, unsigned char [] Yx)\n"
+		"dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, \n"
+		"    short const [] diags, short const [] Xx, short [] Yx)\n"
+		"dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, \n"
+		"    unsigned short const [] diags, unsigned short const [] Xx, unsigned short [] Yx)\n"
+		"dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, \n"
+		"    int const [] diags, int const [] Xx, int [] Yx)\n"
+		"dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, \n"
+		"    unsigned int const [] diags, unsigned int const [] Xx, unsigned int [] Yx)\n"
+		"dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, \n"
+		"    long long const [] diags, long long const [] Xx, long long [] Yx)\n"
+		"dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, \n"
+		"    unsigned long long const [] diags, unsigned long long const [] Xx, unsigned long long [] Yx)\n"
+		"dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, \n"
+		"    float const [] diags, float const [] Xx, float [] Yx)\n"
+		"dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, \n"
+		"    double const [] diags, double const [] Xx, double [] Yx)\n"
+		"dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, \n"
+		"    long double const [] diags, long double const [] Xx, long double [] Yx)\n"
+		"dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, \n"
+		"    npy_cfloat_wrapper const [] diags, npy_cfloat_wrapper const [] Xx, npy_cfloat_wrapper [] Yx)\n"
+		"dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, \n"
+		"    npy_cdouble_wrapper const [] diags, npy_cdouble_wrapper const [] Xx, \n"
+		"    npy_cdouble_wrapper [] Yx)\n"
+		"dia_matvec(int const n_row, int const n_col, int const n_diags, int const L, int const [] offsets, \n"
+		"    npy_clongdouble_wrapper const [] diags, npy_clongdouble_wrapper const [] Xx, \n"
+		"    npy_clongdouble_wrapper [] Yx)\n"
 		""},
 	 { NULL, NULL, 0, NULL }
 };
@@ -6210,24 +6440,23 @@ extern "C" {
   swig_varlink_type(void) {
     static char varlink__doc__[] = "Swig var link object";
     static PyTypeObject varlink_type;
-    static int type_init = 0;  
+    static int type_init = 0;
     if (!type_init) {
-      const PyTypeObject tmp
-      = {
+      const PyTypeObject tmp = {
         /* PyObject header changed in Python 3 */
 #if PY_VERSION_HEX >= 0x03000000
-        PyVarObject_HEAD_INIT(&PyType_Type, 0)
+        PyVarObject_HEAD_INIT(NULL, 0)
 #else
         PyObject_HEAD_INIT(NULL)
-        0,                                  /* Number of items in variable part (ob_size) */
-#endif
-        (char *)"swigvarlink",              /* Type name (tp_name) */
-        sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
-        0,                                  /* Itemsize (tp_itemsize) */
-        (destructor) swig_varlink_dealloc,  /* Deallocator (tp_dealloc) */ 
-        (printfunc) swig_varlink_print,     /* Print (tp_print) */
-        (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
-        (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
+        0,                                  /* ob_size */
+#endif
+        (char *)"swigvarlink",              /* tp_name */
+        sizeof(swig_varlinkobject),         /* tp_basicsize */
+        0,                                  /* tp_itemsize */
+        (destructor) swig_varlink_dealloc,  /* tp_dealloc */
+        (printfunc) swig_varlink_print,     /* tp_print */
+        (getattrfunc) swig_varlink_getattr, /* tp_getattr */
+        (setattrfunc) swig_varlink_setattr, /* tp_setattr */
         0,                                  /* tp_compare */
         (reprfunc) swig_varlink_repr,       /* tp_repr */
         0,                                  /* tp_as_number */
@@ -6251,16 +6480,21 @@ extern "C" {
 #if PY_VERSION_HEX >= 0x02030000
         0,                                  /* tp_del */
 #endif
+#if PY_VERSION_HEX >= 0x02060000
+        0,                                  /* tp_version */
+#endif
 #ifdef COUNT_ALLOCS
         0,0,0,0                             /* tp_alloc -> tp_next */
 #endif
       };
       varlink_type = tmp;
-      /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
-#if PY_VERSION_HEX < 0x03000000
+      type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
       varlink_type.ob_type = &PyType_Type;
+#else
+      if (PyType_Ready(&varlink_type) < 0)
+      return NULL;
 #endif
-      type_init = 1;
     }
     return &varlink_type;
   }
@@ -6311,7 +6545,7 @@ extern "C" {
     for (i = 0; constants[i].type; ++i) {
       switch(constants[i].type) {
       case SWIG_PY_POINTER:
-        obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
+        obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
         break;
       case SWIG_PY_BINARY:
         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
@@ -6392,10 +6626,19 @@ PyObject*
 void
 #endif
 SWIG_init(void) {
-  PyObject *m, *d;  
+  PyObject *m, *d, *md;
 #if PY_VERSION_HEX >= 0x03000000
   static struct PyModuleDef SWIG_module = {
+# if PY_VERSION_HEX >= 0x03020000
     PyModuleDef_HEAD_INIT,
+# else
+    {
+      PyObject_HEAD_INIT(NULL)
+      NULL, /* m_init */
+      0,    /* m_index */
+      NULL, /* m_copy */
+    },
+# endif
     (char *) SWIG_name,
     NULL,
     -1,
@@ -6407,6 +6650,49 @@ SWIG_init(void) {
   };
 #endif
   
+#if defined(SWIGPYTHON_BUILTIN)
+  static SwigPyClientData SwigPyObject_clientdata = {
+    0, 0, 0, 0, 0, 0, 0
+  };
+  static PyGetSetDef this_getset_def = {
+    (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
+  };
+  static SwigPyGetSet thisown_getset_closure = {
+    (PyCFunction) SwigPyObject_own,
+    (PyCFunction) SwigPyObject_own
+  };
+  static PyGetSetDef thisown_getset_def = {
+    (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
+  };
+  PyObject *metatype_args;
+  PyTypeObject *builtin_pytype;
+  int builtin_base_count;
+  swig_type_info *builtin_basetype;
+  PyObject *tuple;
+  PyGetSetDescrObject *static_getset;
+  PyTypeObject *metatype;
+  SwigPyClientData *cd;
+  PyObject *public_interface, *public_symbol;
+  PyObject *this_descr;
+  PyObject *thisown_descr;
+  int i;
+  
+  (void)builtin_pytype;
+  (void)builtin_base_count;
+  (void)builtin_basetype;
+  (void)tuple;
+  (void)static_getset;
+  
+  /* metatype is used to implement static member variables. */
+  metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
+  assert(metatype_args);
+  metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
+  assert(metatype);
+  Py_DECREF(metatype_args);
+  metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
+  assert(PyType_Ready(metatype) >= 0);
+#endif
+  
   /* Fix SwigMethods to carry the callback ptrs when needed */
   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
   
@@ -6415,11 +6701,47 @@ SWIG_init(void) {
 #else
   m = Py_InitModule((char *) SWIG_name, SwigMethods);
 #endif
-  d = PyModule_GetDict(m);
+  md = d = PyModule_GetDict(m);
   
   SWIG_InitializeModule(0);
-  SWIG_InstallConstants(d,swig_const_table);
   
+#ifdef SWIGPYTHON_BUILTIN
+  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
+  assert(SwigPyObject_stype);
+  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
+  if (!cd) {
+    SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
+    SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
+  } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
+    PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
+# if PY_VERSION_HEX >= 0x03000000
+    return NULL;
+# else
+    return;
+# endif
+  }
+  
+  /* All objects have a 'this' attribute */
+  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
+  (void)this_descr;
+  
+  /* All objects have a 'thisown' attribute */
+  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
+  (void)thisown_descr;
+  
+  public_interface = PyList_New(0);
+  public_symbol = 0;
+  (void)public_symbol;
+  
+  PyDict_SetItemString(md, "__all__", public_interface);
+  Py_DECREF(public_interface);
+  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
+  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
+  for (i = 0; swig_const_table[i].name != 0; ++i)
+  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
+#endif
+  
+  SWIG_InstallConstants(d,swig_const_table);
   
   
   import_array();
