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

scipy-svn@scip... scipy-svn@scip...
Sun Jul 15 02:09:19 CDT 2007


Author: wnbell
Date: 2007-07-15 02:09:14 -0500 (Sun, 15 Jul 2007)
New Revision: 3165

Modified:
   trunk/Lib/sparse/sparsetools/complex_ops.h
   trunk/Lib/sparse/sparsetools/numpy.i
   trunk/Lib/sparse/sparsetools/sparsetools.h
   trunk/Lib/sparse/sparsetools/sparsetools.i
   trunk/Lib/sparse/sparsetools/sparsetools.py
   trunk/Lib/sparse/sparsetools/sparsetools_wrap.cxx
Log:
created C++ class to wrap NumPy complex types
providing overloaded operators  + - * / = etc.
allows cleaner (NumPy oblivious) implementation of sparsetools.h



Modified: trunk/Lib/sparse/sparsetools/complex_ops.h
===================================================================
--- trunk/Lib/sparse/sparsetools/complex_ops.h	2007-07-15 02:22:48 UTC (rev 3164)
+++ trunk/Lib/sparse/sparsetools/complex_ops.h	2007-07-15 07:09:14 UTC (rev 3165)
@@ -5,235 +5,85 @@
  *  Functions to handle arithmetic operations on NumPy complex values
  */
 
+#include <numpy/arrayobject.h>
 
 
+template <class c_type, class npy_type>
+class complex_wrapper : public npy_type {
+    public:
+        complex_wrapper( const c_type r = c_type(0), const c_type i = c_type(0) ){
+            npy_type::real = r;
+            npy_type::imag = i;
+        }
+        complex_wrapper operator-() const {
+          return complex_wrapper(-npy_type::real,-npy_type::imag);
+        }
+        complex_wrapper operator+(const complex_wrapper& B) const {
+          return complex_wrapper(npy_type::real + B.real, npy_type::imag + B.imag);
+        }
+        complex_wrapper operator-(const complex_wrapper& B) const {
+          return complex_wrapper(npy_type::real - B.real, npy_type::imag - B.imag);
+        }
+        complex_wrapper operator*(const complex_wrapper& B) const {
+          return complex_wrapper(npy_type::real * B.real - npy_type::imag * B.imag, 
+                                 npy_type::real * B.imag + npy_type::imag * B.real);
+        }
+        complex_wrapper operator/(const complex_wrapper& B) const {
+          complex_wrapper result;
+          c_type denom = 1.0 / (B.real * B.real + B.imag * B.imag);
+          result.real = (npy_type::real * npy_type::real + npy_type::imag * B.imag) * denom;
+          result.imag = (npy_type::real * npy_type::imag - npy_type::imag * B.real) * denom;
+          return result;
+        }
+        complex_wrapper& operator+=(const complex_wrapper & B){
+          npy_type::real += B.real;
+          npy_type::imag += B.imag;
+          return (*this);
+        }
+        complex_wrapper& operator-=(const complex_wrapper & B){
+          npy_type::real -= B.real;
+          npy_type::imag -= B.imag;
+          return (*this);
+        }
+        complex_wrapper& operator*=(const complex_wrapper & B){
+          c_type temp    = npy_type::real * B.real - npy_type::imag * B.imag;
+          npy_type::imag = npy_type::real * B.imag + npy_type::imag * B.real;
+          npy_type::real = temp;
+          return (*this);
+        }
+        complex_wrapper& operator/=(const complex_wrapper & B){
+          c_type denom   = 1.0 / (B.real * B.real + B.imag * B.imag);
+          c_type temp    = (npy_type::real * B.real + npy_type::imag * B.imag) * denom; 
+          npy_type::imag = (npy_type::real * B.imag - npy_type::imag * B.real) * denom;
+          npy_type::real = temp;
+          return (*this);
+        }
+        bool operator==(const complex_wrapper& B) const{
+          return npy_type::real == B.real && npy_type::imag == B.imag;
+        }
+        bool operator!=(const complex_wrapper& B) const{
+          return npy_type::real != B.real || npy_type::imag != B.imag;
+        }
+        bool operator==(const c_type& B) const{
+          return npy_type::real == B && npy_type::imag == c_type(0);
+        }
+        bool operator!=(const c_type& B) const{
+          return npy_type::real != B || npy_type::imag != c_type(0);
+        }
+        complex_wrapper& operator=(const complex_wrapper& B){
+          npy_type::real = B.real;
+          npy_type::imag = B.imag;
+          return (*this);
+        }
+        complex_wrapper& operator=(const c_type& B){
+          npy_type::real = B;
+          npy_type::imag = c_type(0);
+          return (*this);
+        }
+};
 
-/*
- * Addition
- */
-inline npy_cfloat operator+(const npy_cfloat& A, const npy_cfloat& B){
-  npy_cfloat result;
-  result.real = A.real + B.real;
-  result.imag = A.imag + B.imag;
-  return result;
-}
-inline npy_cdouble operator+(const npy_cdouble& A, const npy_cdouble& B){
-  npy_cdouble result;
-  result.real = A.real + B.real;
-  result.imag = A.imag + B.imag;
-  return result;
-}
-inline npy_clongdouble operator+(const npy_clongdouble& A, const npy_clongdouble& B){
-  npy_clongdouble result;
-  result.real = A.real + B.real;
-  result.imag = A.imag + B.imag;
-  return result;
-}
+typedef complex_wrapper<float, npy_cfloat>  npy_cfloat_wrapper;
+typedef complex_wrapper<double,npy_cdouble> npy_cdouble_wrapper;
 
-inline npy_cfloat& operator+=(npy_cfloat& A, const npy_cfloat& B){
-  A.real += B.real;
-  A.imag += B.imag;
-  return A;
-}
-inline npy_cdouble& operator+=(npy_cdouble& A, const npy_cdouble& B){
-  A.real += B.real;
-  A.imag += B.imag;
-  return A;
-}
-inline npy_clongdouble& operator+=(npy_clongdouble& A, const npy_clongdouble& B){
-  A.real += B.real;
-  A.imag += B.imag;
-  return A;
-}
 
-
-
-/*
- * Subtraction
- */
-inline npy_cfloat operator-(const npy_cfloat& A, const npy_cfloat& B){
-  npy_cfloat result;
-  result.real = A.real - B.real;
-  result.imag = A.imag - B.imag;
-  return result;
-}
-inline npy_cdouble operator-(const npy_cdouble& A, const npy_cdouble& B){
-  npy_cdouble result;
-  result.real = A.real - B.real;
-  result.imag = A.imag - B.imag;
-  return result;
-}
-inline npy_clongdouble operator-(const npy_clongdouble& A, const npy_clongdouble& B){
-  npy_clongdouble result;
-  result.real = A.real - B.real;
-  result.imag = A.imag - B.imag;
-  return result;
-}
-
-inline npy_cfloat& operator-=(npy_cfloat& A, const npy_cfloat& B){
-  A.real -= B.real;
-  A.imag -= B.imag;
-  return A;
-}
-inline npy_cdouble& operator-=(npy_cdouble& A, const npy_cdouble& B){
-  A.real -= B.real;
-  A.imag -= B.imag;
-  return A;
-}
-inline npy_clongdouble& operator-=(npy_clongdouble& A, const npy_clongdouble& B){
-  A.real -= B.real;
-  A.imag -= B.imag;
-  return A;
-}
-
-
-/*
- * Multiplication
- */
-inline npy_cfloat operator*(const npy_cfloat& A, const npy_cfloat& B){
-  npy_cfloat result;
-  result.real = A.real * B.real - A.imag * B.imag;
-  result.imag = A.real * B.imag + A.imag * B.real;
-  return result;
-}
-inline npy_cdouble operator*(const npy_cdouble& A, const npy_cdouble& B){
-  npy_cdouble result;
-  result.real = A.real * B.real - A.imag * B.imag;
-  result.imag = A.real * B.imag + A.imag * B.real;
-  return result;
-}
-inline npy_clongdouble operator*(const npy_clongdouble& A, const npy_clongdouble& B){
-  npy_clongdouble result;
-  result.real = A.real * B.real - A.imag * B.imag;
-  result.imag = A.real * B.imag + A.imag * B.real;
-  return result;
-}
-
-inline npy_cfloat& operator*=(npy_cfloat& A, const npy_cfloat& B){
-  npy_float temp = A.real * B.real - A.imag * B.imag;
-  A.imag = A.real * B.imag + A.imag * B.real;
-  A.real = temp;
-  return A;
-}
-inline npy_cdouble& operator*=(npy_cdouble& A, const npy_cdouble& B){
-  npy_double temp = A.real * B.real - A.imag * B.imag;
-  A.imag = A.real * B.imag + A.imag * B.real;
-  A.real = temp;
-  return A;
-}
-inline npy_clongdouble& operator*=(npy_clongdouble& A, const npy_clongdouble& B){
-  npy_longdouble temp = A.real * B.real - A.imag * B.imag;
-  A.imag = A.real * B.imag + A.imag * B.real;
-  A.real = temp;
-  return A;
-}
-
-
-/*
- * Division
- */
-inline npy_cfloat operator/(const npy_cfloat& A, const npy_cfloat& B){
-  npy_cfloat result;
-  npy_float denom = 1.0 / (B.real * B.real + B.imag * B.imag);
-  result.real = (A.real * B.real + A.imag * B.imag) * denom;
-  result.imag = (A.real * B.imag - A.imag * B.real) * denom;
-  return result;
-}
-inline npy_cdouble operator/(const npy_cdouble& A, const npy_cdouble& B){
-  npy_cdouble result;
-  npy_double denom = 1.0 / (B.real * B.real + B.imag * B.imag);
-  result.real = (A.real * B.real + A.imag * B.imag) * denom;
-  result.imag = (A.real * B.imag - A.imag * B.real) * denom;
-  return result;
-}
-inline npy_clongdouble operator/(const npy_clongdouble& A, const npy_clongdouble& B){
-  npy_clongdouble result;
-  npy_longdouble denom = 1.0 / (B.real * B.real + B.imag * B.imag);
-  result.real = (A.real * B.real + A.imag * B.imag) * denom;
-  result.imag = (A.real * B.imag - A.imag * B.real) * denom;
-  return result;
-}
-
-inline npy_cfloat& operator/=(npy_cfloat& A, const npy_cfloat& B){
-  A = A*B;
-  return A;
-}
-inline npy_cdouble& operator/=(npy_cdouble& A, const npy_cdouble& B){
-  A = A*B;
-  return A;
-}
-inline npy_clongdouble& operator/=(npy_clongdouble& A, const npy_clongdouble& B){
-  A = A*B;
-  return A;
-}
-
-/*
- * Equality (complex==complex)
- */
-inline bool operator==(const npy_cfloat& A, const npy_cfloat& B){
-  return A.real == B.real && A.imag == B.imag;
-}
-inline bool operator==(const npy_cdouble& A, const npy_cdouble& B){
-  return A.real == B.real && A.imag == B.imag;
-}
-inline bool operator==(const npy_clongdouble& A, const npy_clongdouble& B){
-  return A.real == B.real && A.imag == B.imag;
-}
-
-inline bool operator!=(const npy_cfloat& A, const npy_cfloat& B){
-  return A.real != B.real || A.imag != B.imag;
-}
-inline bool operator!=(const npy_cdouble& A, const npy_cdouble& B){
-  return A.real != B.real || A.imag != B.imag;
-}
-inline bool operator!=(const npy_clongdouble& A, const npy_clongdouble& B){
-  return A.real != B.real || A.imag != B.imag;
-}
-
-/*
- * Equality (complex==scalar)
- */
-inline bool operator==(const npy_cfloat& A, const npy_float& B){
-  return A.real == B && A.imag == 0;
-}
-inline bool operator==(const npy_cdouble& A, const npy_double& B){
-  return A.real == B && A.imag == 0;
-}
-inline bool operator==(const npy_clongdouble& A, const npy_longdouble& B){
-  return A.real == B && A.imag == 0;
-}
-
-inline bool operator!=(const npy_cfloat& A, const npy_float& B){
-  return A.real != B || A.imag != 0;
-}
-inline bool operator!=(const npy_cdouble& A, const npy_double& B){
-  return A.real != B || A.imag != 0;
-}
-inline bool operator!=(const npy_clongdouble& A, const npy_longdouble& B){
-  return A.real != B || A.imag != 0;
-}
-
-/*
- * Equality (scalar==complex)
- */
-inline bool operator==(const npy_float& A, const npy_cfloat& B){
-  return A == B.real && 0 == B.imag;
-}
-inline bool operator==(const npy_double& A, const npy_cdouble& B){
-  return A == B.real && 0 == B.imag;
-}
-inline bool operator==(const npy_longdouble& A, const npy_clongdouble& B){
-  return A == B.real && 0 == B.imag;
-}
-
-inline bool operator!=(const npy_float& A, const npy_cfloat& B){
-  return A != B.real || 0 != B.imag;
-}
-inline bool operator!=(const npy_double& A, const npy_cdouble& B){
-  return A != B.real || 0 != B.imag;
-}
-inline bool operator!=(const npy_longdouble& A, const npy_clongdouble& B){
-  return A != B.real || 0 != B.imag;
-}
-
 #endif

Modified: trunk/Lib/sparse/sparsetools/numpy.i
===================================================================
--- trunk/Lib/sparse/sparsetools/numpy.i	2007-07-15 02:22:48 UTC (rev 3164)
+++ trunk/Lib/sparse/sparsetools/numpy.i	2007-07-15 07:09:14 UTC (rev 3165)
@@ -5,7 +5,9 @@
 #endif
 #include "stdio.h"
 #include <numpy/arrayobject.h>
+#include "complex_ops.h"
 
+
 /* The following code originally appeared in enthought/kiva/agg/src/numeric.i,
  * author unknown.  It was translated from C++ to C by John Hunter.  Bill
  * Spotz has modified it slightly to fix some minor bugs, add some comments
@@ -343,8 +345,8 @@
 TYPEMAP_IN1(float,         PyArray_FLOAT )
 TYPEMAP_IN1(double,        PyArray_DOUBLE)
 TYPEMAP_IN1(long double,        PyArray_LONGDOUBLE)
-TYPEMAP_IN1(npy_cfloat,         PyArray_CFLOAT )
-TYPEMAP_IN1(npy_cdouble,        PyArray_CDOUBLE)
+TYPEMAP_IN1(npy_cfloat_wrapper,         PyArray_CFLOAT )
+TYPEMAP_IN1(npy_cdouble_wrapper,        PyArray_CDOUBLE)
 TYPEMAP_IN1(npy_clongdouble,    PyArray_CLONGDOUBLE)
 TYPEMAP_IN1(const char,          PyArray_CHAR  )
 TYPEMAP_IN1(const unsigned char, PyArray_UBYTE )
@@ -355,8 +357,8 @@
 TYPEMAP_IN1(const float,         PyArray_FLOAT )
 TYPEMAP_IN1(const double,        PyArray_DOUBLE)
 TYPEMAP_IN1(const long double,        PyArray_LONGDOUBLE)
-TYPEMAP_IN1(const npy_cfloat,         PyArray_CFLOAT )
-TYPEMAP_IN1(const npy_cdouble,        PyArray_CDOUBLE)
+TYPEMAP_IN1(const npy_cfloat_wrapper,         PyArray_CFLOAT )
+TYPEMAP_IN1(const npy_cdouble_wrapper,        PyArray_CDOUBLE)
 TYPEMAP_IN1(const npy_clongdouble,    PyArray_CLONGDOUBLE)
 TYPEMAP_IN1(PyObject,      PyArray_OBJECT)
 
@@ -389,8 +391,8 @@
 TYPEMAP_IN2(float,         PyArray_FLOAT )
 TYPEMAP_IN2(double,        PyArray_DOUBLE)
 TYPEMAP_IN2(long double,        PyArray_LONGDOUBLE)
-TYPEMAP_IN2(npy_cfloat,         PyArray_CFLOAT )
-TYPEMAP_IN2(npy_cdouble,        PyArray_CDOUBLE)
+TYPEMAP_IN2(npy_cfloat_wrapper,         PyArray_CFLOAT )
+TYPEMAP_IN2(npy_cdouble_wrapper,        PyArray_CDOUBLE)
 TYPEMAP_IN2(npy_clongdouble,    PyArray_CLONGDOUBLE)
 TYPEMAP_IN2(const char,          PyArray_CHAR  )
 TYPEMAP_IN2(const unsigned char, PyArray_UBYTE )
@@ -401,8 +403,8 @@
 TYPEMAP_IN2(const float,         PyArray_FLOAT )
 TYPEMAP_IN2(const double,        PyArray_DOUBLE)
 TYPEMAP_IN2(const long double,        PyArray_LONGDOUBLE)
-TYPEMAP_IN2(const npy_cfloat,         PyArray_CFLOAT )
-TYPEMAP_IN2(const npy_cdouble,        PyArray_CDOUBLE)
+TYPEMAP_IN2(const npy_cfloat_wrapper,         PyArray_CFLOAT )
+TYPEMAP_IN2(const npy_cdouble_wrapper,        PyArray_CDOUBLE)
 TYPEMAP_IN2(const npy_clongdouble,    PyArray_CLONGDOUBLE)
 TYPEMAP_IN2(PyObject,      PyArray_OBJECT)
 
@@ -452,8 +454,8 @@
 TYPEMAP_INPLACE1(float,         PyArray_FLOAT )
 TYPEMAP_INPLACE1(double,        PyArray_DOUBLE)
 TYPEMAP_INPLACE1(long double,        PyArray_LONGDOUBLE)
-TYPEMAP_INPLACE1(npy_cfloat,         PyArray_CFLOAT )
-TYPEMAP_INPLACE1(npy_cdouble,        PyArray_CDOUBLE)
+TYPEMAP_INPLACE1(npy_cfloat_wrapper,         PyArray_CFLOAT )
+TYPEMAP_INPLACE1(npy_cdouble_wrapper,        PyArray_CDOUBLE)
 TYPEMAP_INPLACE1(npy_clongdouble,    PyArray_CLONGDOUBLE)
 TYPEMAP_INPLACE1(const char,          PyArray_CHAR  )
 TYPEMAP_INPLACE1(const unsigned char, PyArray_UBYTE )
@@ -464,8 +466,8 @@
 TYPEMAP_INPLACE1(const float,         PyArray_FLOAT )
 TYPEMAP_INPLACE1(const double,        PyArray_DOUBLE)
 TYPEMAP_INPLACE1(const long double,        PyArray_LONGDOUBLE)
-TYPEMAP_INPLACE1(const npy_cfloat,         PyArray_CFLOAT )
-TYPEMAP_INPLACE1(const npy_cdouble,        PyArray_CDOUBLE)
+TYPEMAP_INPLACE1(const npy_cfloat_wrapper,         PyArray_CFLOAT )
+TYPEMAP_INPLACE1(const npy_cdouble_wrapper,        PyArray_CDOUBLE)
 TYPEMAP_INPLACE1(const npy_clongdouble,    PyArray_CLONGDOUBLE)
 TYPEMAP_INPLACE1(PyObject,      PyArray_OBJECT)
 
@@ -494,8 +496,8 @@
 TYPEMAP_INPLACE2(float,         PyArray_FLOAT )
 TYPEMAP_INPLACE2(double,        PyArray_DOUBLE)
 TYPEMAP_INPLACE2(long double,        PyArray_LONGDOUBLE)
-TYPEMAP_INPLACE2(npy_cfloat,         PyArray_CFLOAT )
-TYPEMAP_INPLACE2(npy_cdouble,        PyArray_CDOUBLE)
+TYPEMAP_INPLACE2(npy_cfloat_wrapper,         PyArray_CFLOAT )
+TYPEMAP_INPLACE2(npy_cdouble_wrapper,        PyArray_CDOUBLE)
 TYPEMAP_INPLACE2(npy_clongdouble,    PyArray_CLONGDOUBLE)
 TYPEMAP_INPLACE2(const char,          PyArray_CHAR  )
 TYPEMAP_INPLACE2(const unsigned char, PyArray_UBYTE )
@@ -506,8 +508,8 @@
 TYPEMAP_INPLACE2(const float,         PyArray_FLOAT )
 TYPEMAP_INPLACE2(const double,        PyArray_DOUBLE)
 TYPEMAP_INPLACE2(const long double,        PyArray_LONGDOUBLE)
-TYPEMAP_INPLACE2(const npy_cfloat,         PyArray_CFLOAT )
-TYPEMAP_INPLACE2(const npy_cdouble,        PyArray_CDOUBLE)
+TYPEMAP_INPLACE2(const npy_cfloat_wrapper,         PyArray_CFLOAT )
+TYPEMAP_INPLACE2(const npy_cdouble_wrapper,        PyArray_CDOUBLE)
 TYPEMAP_INPLACE2(const npy_clongdouble,    PyArray_CLONGDOUBLE)
 TYPEMAP_INPLACE2(PyObject,      PyArray_OBJECT)
 
@@ -565,8 +567,8 @@
 TYPEMAP_ARGOUT1(float,         PyArray_FLOAT )
 TYPEMAP_ARGOUT1(double,        PyArray_DOUBLE)
 TYPEMAP_ARGOUT1(long double,        PyArray_LONGDOUBLE)
-TYPEMAP_ARGOUT1(npy_cfloat,         PyArray_CFLOAT )
-TYPEMAP_ARGOUT1(npy_cdouble,        PyArray_CDOUBLE)
+TYPEMAP_ARGOUT1(npy_cfloat_wrapper,         PyArray_CFLOAT )
+TYPEMAP_ARGOUT1(npy_cdouble_wrapper,        PyArray_CDOUBLE)
 TYPEMAP_ARGOUT1(npy_clongdouble,    PyArray_CLONGDOUBLE)
 TYPEMAP_ARGOUT1(PyObject,      PyArray_OBJECT)
 
@@ -593,8 +595,8 @@
 TYPEMAP_ARGOUT2(float,         PyArray_FLOAT )
 TYPEMAP_ARGOUT2(double,        PyArray_DOUBLE)
 TYPEMAP_ARGOUT2(long double,        PyArray_LONGDOUBLE)
-TYPEMAP_ARGOUT2(npy_cfloat,         PyArray_CFLOAT )
-TYPEMAP_ARGOUT2(npy_cdouble,        PyArray_CDOUBLE)
+TYPEMAP_ARGOUT2(npy_cfloat_wrapper,         PyArray_CFLOAT )
+TYPEMAP_ARGOUT2(npy_cdouble_wrapper,        PyArray_CDOUBLE)
 TYPEMAP_ARGOUT2(npy_clongdouble,    PyArray_CLONGDOUBLE)
 TYPEMAP_ARGOUT2(PyObject,      PyArray_OBJECT)
 
@@ -642,6 +644,6 @@
 NPY_TYPECHECK(        long,     LONG )
 NPY_TYPECHECK(       float,    FLOAT )
 NPY_TYPECHECK(      double,   DOUBLE )
-NPY_TYPECHECK(  npy_cfloat,   CFLOAT )
-NPY_TYPECHECK(  npy_cdouble, CDOUBLE )
+NPY_TYPECHECK(  npy_cfloat_wrapper,   CFLOAT )
+NPY_TYPECHECK(  npy_cdouble_wrapper, CDOUBLE )
 

Modified: trunk/Lib/sparse/sparsetools/sparsetools.h
===================================================================
--- trunk/Lib/sparse/sparsetools/sparsetools.h	2007-07-15 02:22:48 UTC (rev 3164)
+++ trunk/Lib/sparse/sparsetools/sparsetools.h	2007-07-15 07:09:14 UTC (rev 3165)
@@ -25,26 +25,7 @@
 
 
 
-
 /*
- * Return zero of the appropriate type
- *
- *  this is a workaround for NumPy complex types 
- *  where T x = 0; doesn't make sense.
-*
- */
-template <class T> 
-T ZERO(){
-  T temp = {0};
-  return temp;
-}
-
-
-
-
-
-
-/*
  * Compute B = A for CSR matrix A, CSC matrix B
  *
  * Also, with the appropriate arguments can also be used to:
@@ -76,13 +57,13 @@
  */
 template <class I, class T>
 void csrtocsc(const I n_row,
-	      const I n_col, 
-	      const I Ap[], 
-	      const I Aj[], 
-	      const T Ax[],
-	      std::vector<I>* Bp,
-	      std::vector<I>* Bi,
-	      std::vector<T>* Bx)
+	          const I n_col, 
+	          const I Ap[], 
+	          const I Aj[], 
+	          const T Ax[],
+	          std::vector<I>* Bp,
+	          std::vector<I>* Bi,
+	          std::vector<T>* Bx)
 {  
   I NNZ = Ap[n_row];
   
@@ -230,10 +211,8 @@
 {
   Cp->resize(n_row+1,0);
   
-  const T zero = ZERO<T>();
-
   std::vector<I> index(n_col,-1);
-  std::vector<T> sums(n_col,zero);
+  std::vector<T> sums(n_col,0);
 
   for(I i = 0; i < n_row; i++){
     I istart = -2;
@@ -255,7 +234,7 @@
     }         
 
     for(I jj = 0; jj < length; jj++){
-      if(sums[istart] != zero){
+      if(sums[istart] != 0){
 	    Cj->push_back(istart);
 	    Cx->push_back(sums[istart]);
       }
@@ -264,7 +243,7 @@
       istart = index[istart];
       
       index[temp] = -1; //clear arrays
-      sums[temp]  = zero;                              
+      sums[temp]  =  0;                              
     }
     
     (*Cp)[i+1] = Cx->size();
@@ -305,25 +284,23 @@
  */
 template <class I, class T, class bin_op>
 void csr_binop_csr(const I n_row,
-                 const I n_col, 
-                 const I Ap[], 
-                 const I Aj[], 
-                 const T Ax[],
-                 const I Bp[],
-                 const I Bj[],
-                 const T Bx[],
-                 std::vector<I>* Cp,
-                 std::vector<I>* Cj,
-                 std::vector<T>* Cx,
-                 const bin_op& op)
+                   const I n_col, 
+                   const I Ap[], 
+                   const I Aj[], 
+                   const T Ax[],
+                   const I Bp[],
+                   const I Bj[],
+                   const T Bx[],
+                   std::vector<I>* Cp,
+                   std::vector<I>* Cj,
+                   std::vector<T>* Cx,
+                   const bin_op& op)
 {
   Cp->resize(n_row+1,0);
   
-  const T zero = ZERO<T>();
-
   std::vector<I>   index(n_col,-1);
-  std::vector<T> A_row(n_col,zero);
-  std::vector<T> B_row(n_col,zero);
+  std::vector<T> A_row(n_col,0);
+  std::vector<T> B_row(n_col,0);
 
   for(I i = 0; i < n_row; i++){
     I istart = -2;
@@ -359,7 +336,7 @@
     for(I jj = 0; jj < length; jj++){
       T result = op(A_row[istart],B_row[istart]);
       
-      if(result != zero){
+      if(result != 0){
 	    Cj->push_back(istart);
 	    Cx->push_back(result);
       }
@@ -368,8 +345,8 @@
       istart = index[istart];
       
       index[temp] = -1;
-      A_row[temp] = zero;                              
-      B_row[temp] = zero;
+      A_row[temp] =  0;                              
+      B_row[temp] =  0;
     }
     
     (*Cp)[i+1] = Cx->size();
@@ -438,10 +415,8 @@
                               I Aj[], 
                               T Ax[])
 {
-  const T zero = ZERO<T>();
-
   std::vector<I>  next(n_col,-1);
-  std::vector<T>  sums(n_col,zero);
+  std::vector<T>  sums(n_col, 0);
 
   I NNZ = 0;
 
@@ -473,7 +448,7 @@
         Ax[NNZ] = sums[curr];
 
         next[curr] = -1;
-        sums[curr] = zero;
+        sums[curr] =  0;
 
         NNZ++;
     }
@@ -585,25 +560,24 @@
  */
 template <class I, class T>
 void csrmux(const I n_row,
-	    const I n_col, 
-	    const I Ap [], 
-	    const I Aj[], 
-	    const T Ax[],
-	    const T Xx[],
-	    std::vector<T>*  Yx)
+	        const I n_col, 
+	        const I Ap [], 
+	        const I Aj[], 
+	        const T Ax[],
+	        const T Xx[],
+	        std::vector<T>*  Yx)
 {
-  const T zero = ZERO<T>();
+  Yx->resize(n_row);
 
-  Yx->resize(n_row,zero);
-
   for(I i = 0; i < n_row; i++){
     I row_start = Ap[i];
     I row_end   = Ap[i+1];
     
-    T& Yx_i = (*Yx)[i];
+    T sum = 0;
     for(I jj = row_start; jj < row_end; jj++){
-      Yx_i += Ax[jj] * Xx[Aj[jj]];
+      sum += Ax[jj] * Xx[Aj[jj]];
     }
+    (*Yx)[i] = sum;
   }
 }
 
@@ -633,16 +607,14 @@
  */
 template <class I, class T>
 void cscmux(const I n_row,
-	    const I n_col, 
-	    const I Ap[], 
-	    const I Ai[], 
-	    const T Ax[],
-	    const T Xx[],
-	    std::vector<T>*  Yx)
+	        const I n_col, 
+	        const I Ap[], 
+	        const I Ai[], 
+	        const T Ax[],
+	        const T Xx[],
+	        std::vector<T>*  Yx)
 {
-  const T zero = ZERO<T>();
-
-  Yx->resize(n_row,zero);
+  Yx->resize(n_row,0);
   
   for(I j = 0; j < n_col; j++){
     I col_start = Ap[j];
@@ -777,13 +749,12 @@
                 std::vector<I>* Aj,
                 std::vector<T>* Ax)
 {
-  const T  zero  = ZERO<T>();
   const T* x_ptr = Mx;
 
   Ap->push_back(0);
   for(I i = 0; i < n_row; i++){
     for(I j = 0; j < n_col; j++){
-      if(*x_ptr != zero){
+      if(*x_ptr != 0){
 	    Aj->push_back(j);
 	    Ax->push_back(*x_ptr);
       }
@@ -916,9 +887,9 @@
 
 template <class I, class T>
 void csc_plus_csc(const I n_row, const I n_col, 
-                 const I Ap [], const I Ai [], const T Ax [],
-                 const I Bp [], const I Bi [], const T Bx [],
-                 std::vector<I>* Cp, std::vector<I>* Ci, std::vector<T>* Cx)
+                  const I Ap [], const I Ai [], const T Ax [],
+                  const I Bp [], const I Bi [], const T Bx [],
+                  std::vector<I>* Cp, std::vector<I>* Ci, std::vector<T>* Cx)
 {
     csr_plus_csr(n_col,n_row,Ap,Ai,Ax,Bp,Bi,Bx,Cp,Ci,Cx);
 }

Modified: trunk/Lib/sparse/sparsetools/sparsetools.i
===================================================================
--- trunk/Lib/sparse/sparsetools/sparsetools.i	2007-07-15 02:22:48 UTC (rev 3164)
+++ trunk/Lib/sparse/sparsetools/sparsetools.i	2007-07-15 07:09:14 UTC (rev 3165)
@@ -61,15 +61,15 @@
 T_IN_ARRAY1( long        )
 T_IN_ARRAY1( float       )
 T_IN_ARRAY1( double      )
-T_IN_ARRAY1( npy_cfloat  )
-T_IN_ARRAY1( npy_cdouble )
+T_IN_ARRAY1( npy_cfloat_wrapper  )
+T_IN_ARRAY1( npy_cdouble_wrapper )
 
 T_IN_ARRAY2( int         )
 T_IN_ARRAY2( long        )
 T_IN_ARRAY2( float       )
 T_IN_ARRAY2( double      )
-T_IN_ARRAY2( npy_cfloat  )
-T_IN_ARRAY2( npy_cdouble )
+T_IN_ARRAY2( npy_cfloat_wrapper  )
+T_IN_ARRAY2( npy_cdouble_wrapper )
 
 
 
@@ -111,8 +111,8 @@
 T_ARRAY_ARGOUT( long,        LONG    )
 T_ARRAY_ARGOUT( float,       FLOAT   )
 T_ARRAY_ARGOUT( double,      DOUBLE  )
-T_ARRAY_ARGOUT( npy_cfloat,  CFLOAT  )
-T_ARRAY_ARGOUT( npy_cdouble, CDOUBLE )
+T_ARRAY_ARGOUT( npy_cfloat_wrapper,  CFLOAT  )
+T_ARRAY_ARGOUT( npy_cdouble_wrapper, CDOUBLE )
 
 
 
@@ -129,8 +129,8 @@
 T_INPLACE_ARRAY2( long        )
 T_INPLACE_ARRAY2( float       )
 T_INPLACE_ARRAY2( double      )
-T_INPLACE_ARRAY2( npy_cfloat  )
-T_INPLACE_ARRAY2( npy_cdouble )
+T_INPLACE_ARRAY2( npy_cfloat_wrapper  )
+T_INPLACE_ARRAY2( npy_cdouble_wrapper )
 
 
 
@@ -154,8 +154,8 @@
 T_INPLACE_ARRAY1( long        )
 T_INPLACE_ARRAY1( float       )
 T_INPLACE_ARRAY1( double      )
-T_INPLACE_ARRAY1( npy_cfloat  )
-T_INPLACE_ARRAY1( npy_cdouble )
+T_INPLACE_ARRAY1( npy_cfloat_wrapper  )
+T_INPLACE_ARRAY1( npy_cdouble_wrapper )
 
 
 
@@ -172,8 +172,8 @@
 %template(f_name)   f_name<int,long>;
 %template(f_name)   f_name<int,float>;
 %template(f_name)   f_name<int,double>;
-%template(f_name)   f_name<int,npy_cfloat>;
-%template(f_name)   f_name<int,npy_cdouble>;
+%template(f_name)   f_name<int,npy_cfloat_wrapper>;
+%template(f_name)   f_name<int,npy_cdouble_wrapper>;
 /* 64-bit indices would go here */
 %enddef
 

Modified: trunk/Lib/sparse/sparsetools/sparsetools.py
===================================================================
--- trunk/Lib/sparse/sparsetools/sparsetools.py	2007-07-15 02:22:48 UTC (rev 3164)
+++ trunk/Lib/sparse/sparsetools/sparsetools.py	2007-07-15 07:09:14 UTC (rev 3165)
@@ -60,12 +60,12 @@
         std::vector<(int)> Bi, std::vector<(float)> Bx)
     csrtocsc(int n_row, int n_col, int Ap, int Aj, double Ax, std::vector<(int)> Bp, 
         std::vector<(int)> Bi, std::vector<(double)> Bx)
-    csrtocsc(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, 
+    csrtocsc(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bi, 
-        std::vector<(npy_cfloat)> Bx)
-    csrtocsc(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, 
+        std::vector<(npy_cfloat_wrapper)> Bx)
+    csrtocsc(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bi, 
-        std::vector<(npy_cdouble)> Bx)
+        std::vector<(npy_cdouble_wrapper)> Bx)
     """
   return _sparsetools.csrtocsc(*args)
 
@@ -79,12 +79,12 @@
         std::vector<(int)> Bj, std::vector<(float)> Bx)
     csctocsr(int n_row, int n_col, int Ap, int Ai, double Ax, std::vector<(int)> Bp, 
         std::vector<(int)> Bj, std::vector<(double)> Bx)
-    csctocsr(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, 
+    csctocsr(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bj, 
-        std::vector<(npy_cfloat)> Bx)
-    csctocsr(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, 
+        std::vector<(npy_cfloat_wrapper)> Bx)
+    csctocsr(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bj, 
-        std::vector<(npy_cdouble)> Bx)
+        std::vector<(npy_cdouble_wrapper)> Bx)
     """
   return _sparsetools.csctocsr(*args)
 
@@ -98,12 +98,12 @@
         std::vector<(int)> Bj, std::vector<(float)> Bx)
     csrtocoo(int n_row, int n_col, int Ap, int Aj, double Ax, std::vector<(int)> Bi, 
         std::vector<(int)> Bj, std::vector<(double)> Bx)
-    csrtocoo(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, 
+    csrtocoo(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, 
         std::vector<(int)> Bi, std::vector<(int)> Bj, 
-        std::vector<(npy_cfloat)> Bx)
-    csrtocoo(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, 
+        std::vector<(npy_cfloat_wrapper)> Bx)
+    csrtocoo(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, 
         std::vector<(int)> Bi, std::vector<(int)> Bj, 
-        std::vector<(npy_cdouble)> Bx)
+        std::vector<(npy_cdouble_wrapper)> Bx)
     """
   return _sparsetools.csrtocoo(*args)
 
@@ -117,12 +117,12 @@
         std::vector<(int)> Bj, std::vector<(float)> Bx)
     csctocoo(int n_row, int n_col, int Ap, int Ai, double Ax, std::vector<(int)> Bi, 
         std::vector<(int)> Bj, std::vector<(double)> Bx)
-    csctocoo(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, 
+    csctocoo(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, 
         std::vector<(int)> Bi, std::vector<(int)> Bj, 
-        std::vector<(npy_cfloat)> Bx)
-    csctocoo(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, 
+        std::vector<(npy_cfloat_wrapper)> Bx)
+    csctocoo(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, 
         std::vector<(int)> Bi, std::vector<(int)> Bj, 
-        std::vector<(npy_cdouble)> Bx)
+        std::vector<(npy_cdouble_wrapper)> Bx)
     """
   return _sparsetools.csctocoo(*args)
 
@@ -140,12 +140,12 @@
     cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, double Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bj, 
         std::vector<(double)> Bx)
-    cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cfloat Ax, 
+    cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cfloat_wrapper Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bj, 
-        std::vector<(npy_cfloat)> Bx)
-    cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cdouble Ax, 
+        std::vector<(npy_cfloat_wrapper)> Bx)
+    cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cdouble_wrapper Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bj, 
-        std::vector<(npy_cdouble)> Bx)
+        std::vector<(npy_cdouble_wrapper)> Bx)
     """
   return _sparsetools.cootocsr(*args)
 
@@ -163,12 +163,12 @@
     cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, double Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bi, 
         std::vector<(double)> Bx)
-    cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cfloat Ax, 
+    cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cfloat_wrapper Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bi, 
-        std::vector<(npy_cfloat)> Bx)
-    cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cdouble Ax, 
+        std::vector<(npy_cfloat_wrapper)> Bx)
+    cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cdouble_wrapper Ax, 
         std::vector<(int)> Bp, std::vector<(int)> Bi, 
-        std::vector<(npy_cdouble)> Bx)
+        std::vector<(npy_cdouble_wrapper)> Bx)
     """
   return _sparsetools.cootocsc(*args)
 
@@ -186,12 +186,14 @@
     csrmucsr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, 
         int Bj, double Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Cj, std::vector<(double)> Cx)
-    csrmucsr(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, 
-        int Bp, int Bj, npy_cfloat Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Cj, std::vector<(npy_cfloat)> Cx)
-    csrmucsr(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, 
-        int Bp, int Bj, npy_cdouble Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Cj, std::vector<(npy_cdouble)> Cx)
+    csrmucsr(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, 
+        int Bp, int Bj, npy_cfloat_wrapper Bx, 
+        std::vector<(int)> Cp, std::vector<(int)> Cj, 
+        std::vector<(npy_cfloat_wrapper)> Cx)
+    csrmucsr(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, 
+        int Bp, int Bj, npy_cdouble_wrapper Bx, 
+        std::vector<(int)> Cp, std::vector<(int)> Cj, 
+        std::vector<(npy_cdouble_wrapper)> Cx)
     """
   return _sparsetools.csrmucsr(*args)
 
@@ -209,12 +211,14 @@
     cscmucsc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, 
         int Bi, double Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Ci, std::vector<(double)> Cx)
-    cscmucsc(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, 
-        int Bp, int Bi, npy_cfloat Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Ci, std::vector<(npy_cfloat)> Cx)
-    cscmucsc(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, 
-        int Bp, int Bi, npy_cdouble Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Ci, std::vector<(npy_cdouble)> Cx)
+    cscmucsc(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, 
+        int Bp, int Bi, npy_cfloat_wrapper Bx, 
+        std::vector<(int)> Cp, std::vector<(int)> Ci, 
+        std::vector<(npy_cfloat_wrapper)> Cx)
+    cscmucsc(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, 
+        int Bp, int Bi, npy_cdouble_wrapper Bx, 
+        std::vector<(int)> Cp, std::vector<(int)> Ci, 
+        std::vector<(npy_cdouble_wrapper)> Cx)
     """
   return _sparsetools.cscmucsc(*args)
 
@@ -228,10 +232,10 @@
         std::vector<(float)> Yx)
     csrmux(int n_row, int n_col, int Ap, int Aj, double Ax, double Xx, 
         std::vector<(double)> Yx)
-    csrmux(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, 
-        npy_cfloat Xx, std::vector<(npy_cfloat)> Yx)
-    csrmux(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, 
-        npy_cdouble Xx, std::vector<(npy_cdouble)> Yx)
+    csrmux(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, 
+        npy_cfloat_wrapper Xx, std::vector<(npy_cfloat_wrapper)> Yx)
+    csrmux(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, 
+        npy_cdouble_wrapper Xx, std::vector<(npy_cdouble_wrapper)> Yx)
     """
   return _sparsetools.csrmux(*args)
 
@@ -245,10 +249,10 @@
         std::vector<(float)> Yx)
     cscmux(int n_row, int n_col, int Ap, int Ai, double Ax, double Xx, 
         std::vector<(double)> Yx)
-    cscmux(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, 
-        npy_cfloat Xx, std::vector<(npy_cfloat)> Yx)
-    cscmux(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, 
-        npy_cdouble Xx, std::vector<(npy_cdouble)> Yx)
+    cscmux(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, 
+        npy_cfloat_wrapper Xx, std::vector<(npy_cfloat_wrapper)> Yx)
+    cscmux(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, 
+        npy_cdouble_wrapper Xx, std::vector<(npy_cdouble_wrapper)> Yx)
     """
   return _sparsetools.cscmux(*args)
 
@@ -266,12 +270,14 @@
     csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, 
         int Bj, double Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Cj, std::vector<(double)> Cx)
-    csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, 
-        int Bp, int Bj, npy_cfloat Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Cj, std::vector<(npy_cfloat)> Cx)
-    csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, 
-        int Bp, int Bj, npy_cdouble Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Cj, std::vector<(npy_cdouble)> Cx)
+    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, 
+        std::vector<(int)> Cp, std::vector<(int)> Cj, 
+        std::vector<(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, 
+        std::vector<(int)> Cp, std::vector<(int)> Cj, 
+        std::vector<(npy_cdouble_wrapper)> Cx)
     """
   return _sparsetools.csr_elmul_csr(*args)
 
@@ -289,12 +295,14 @@
     csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, 
         int Bj, double Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Cj, std::vector<(double)> Cx)
-    csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, 
-        int Bp, int Bj, npy_cfloat Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Cj, std::vector<(npy_cfloat)> Cx)
-    csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, 
-        int Bp, int Bj, npy_cdouble Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Cj, std::vector<(npy_cdouble)> Cx)
+    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, 
+        std::vector<(int)> Cp, std::vector<(int)> Cj, 
+        std::vector<(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, 
+        std::vector<(int)> Cp, std::vector<(int)> Cj, 
+        std::vector<(npy_cdouble_wrapper)> Cx)
     """
   return _sparsetools.csr_eldiv_csr(*args)
 
@@ -312,12 +320,14 @@
     csr_plus_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, 
         int Bj, double Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Cj, std::vector<(double)> Cx)
-    csr_plus_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, 
-        int Bp, int Bj, npy_cfloat Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Cj, std::vector<(npy_cfloat)> Cx)
-    csr_plus_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, 
-        int Bp, int Bj, npy_cdouble Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Cj, std::vector<(npy_cdouble)> Cx)
+    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, 
+        std::vector<(int)> Cp, std::vector<(int)> Cj, 
+        std::vector<(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, 
+        std::vector<(int)> Cp, std::vector<(int)> Cj, 
+        std::vector<(npy_cdouble_wrapper)> Cx)
     """
   return _sparsetools.csr_plus_csr(*args)
 
@@ -335,12 +345,14 @@
     csr_minus_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, 
         int Bj, double Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Cj, std::vector<(double)> Cx)
-    csr_minus_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, 
-        int Bp, int Bj, npy_cfloat Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Cj, std::vector<(npy_cfloat)> Cx)
-    csr_minus_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, 
-        int Bp, int Bj, npy_cdouble Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Cj, std::vector<(npy_cdouble)> Cx)
+    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, 
+        std::vector<(int)> Cp, std::vector<(int)> Cj, 
+        std::vector<(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, 
+        std::vector<(int)> Cp, std::vector<(int)> Cj, 
+        std::vector<(npy_cdouble_wrapper)> Cx)
     """
   return _sparsetools.csr_minus_csr(*args)
 
@@ -358,12 +370,14 @@
     csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, 
         int Bi, double Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Ci, std::vector<(double)> Cx)
-    csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, 
-        int Bp, int Bi, npy_cfloat Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Ci, std::vector<(npy_cfloat)> Cx)
-    csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, 
-        int Bp, int Bi, npy_cdouble Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Ci, std::vector<(npy_cdouble)> Cx)
+    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, 
+        std::vector<(int)> Cp, std::vector<(int)> Ci, 
+        std::vector<(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, 
+        std::vector<(int)> Cp, std::vector<(int)> Ci, 
+        std::vector<(npy_cdouble_wrapper)> Cx)
     """
   return _sparsetools.csc_elmul_csc(*args)
 
@@ -381,12 +395,14 @@
     csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, 
         int Bi, double Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Ci, std::vector<(double)> Cx)
-    csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, 
-        int Bp, int Bi, npy_cfloat Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Ci, std::vector<(npy_cfloat)> Cx)
-    csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, 
-        int Bp, int Bi, npy_cdouble Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Ci, std::vector<(npy_cdouble)> Cx)
+    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, 
+        std::vector<(int)> Cp, std::vector<(int)> Ci, 
+        std::vector<(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, 
+        std::vector<(int)> Cp, std::vector<(int)> Ci, 
+        std::vector<(npy_cdouble_wrapper)> Cx)
     """
   return _sparsetools.csc_eldiv_csc(*args)
 
@@ -404,12 +420,14 @@
     csc_plus_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, 
         int Bi, double Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Ci, std::vector<(double)> Cx)
-    csc_plus_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, 
-        int Bp, int Bi, npy_cfloat Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Ci, std::vector<(npy_cfloat)> Cx)
-    csc_plus_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, 
-        int Bp, int Bi, npy_cdouble Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Ci, std::vector<(npy_cdouble)> Cx)
+    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, 
+        std::vector<(int)> Cp, std::vector<(int)> Ci, 
+        std::vector<(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, 
+        std::vector<(int)> Cp, std::vector<(int)> Ci, 
+        std::vector<(npy_cdouble_wrapper)> Cx)
     """
   return _sparsetools.csc_plus_csc(*args)
 
@@ -427,12 +445,14 @@
     csc_minus_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, 
         int Bi, double Bx, std::vector<(int)> Cp, 
         std::vector<(int)> Ci, std::vector<(double)> Cx)
-    csc_minus_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, 
-        int Bp, int Bi, npy_cfloat Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Ci, std::vector<(npy_cfloat)> Cx)
-    csc_minus_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, 
-        int Bp, int Bi, npy_cdouble Bx, std::vector<(int)> Cp, 
-        std::vector<(int)> Ci, std::vector<(npy_cdouble)> Cx)
+    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, 
+        std::vector<(int)> Cp, std::vector<(int)> Ci, 
+        std::vector<(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, 
+        std::vector<(int)> Cp, std::vector<(int)> Ci, 
+        std::vector<(npy_cdouble_wrapper)> Cx)
     """
   return _sparsetools.csc_minus_csc(*args)
 
@@ -450,12 +470,12 @@
     spdiags(int n_row, int n_col, int n_diag, int offsets, double diags, 
         std::vector<(int)> Ap, std::vector<(int)> Ai, 
         std::vector<(double)> Ax)
-    spdiags(int n_row, int n_col, int n_diag, int offsets, npy_cfloat diags, 
-        std::vector<(int)> Ap, std::vector<(int)> Ai, 
-        std::vector<(npy_cfloat)> Ax)
-    spdiags(int n_row, int n_col, int n_diag, int offsets, npy_cdouble diags, 
-        std::vector<(int)> Ap, std::vector<(int)> Ai, 
-        std::vector<(npy_cdouble)> Ax)
+    spdiags(int n_row, int n_col, int n_diag, int offsets, npy_cfloat_wrapper diags, 
+        std::vector<(int)> Ap, 
+        std::vector<(int)> Ai, std::vector<(npy_cfloat_wrapper)> Ax)
+    spdiags(int n_row, int n_col, int n_diag, int offsets, npy_cdouble_wrapper diags, 
+        std::vector<(int)> Ap, 
+        std::vector<(int)> Ai, std::vector<(npy_cdouble_wrapper)> Ax)
     """
   return _sparsetools.spdiags(*args)
 
@@ -465,10 +485,10 @@
     csrtodense(int n_row, int n_col, int Ap, int Aj, long Ax, long Mx)
     csrtodense(int n_row, int n_col, int Ap, int Aj, float Ax, float Mx)
     csrtodense(int n_row, int n_col, int Ap, int Aj, double Ax, double Mx)
-    csrtodense(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, 
-        npy_cfloat Mx)
-    csrtodense(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, 
-        npy_cdouble Mx)
+    csrtodense(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, 
+        npy_cfloat_wrapper Mx)
+    csrtodense(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, 
+        npy_cdouble_wrapper Mx)
     """
   return _sparsetools.csrtodense(*args)
 
@@ -482,10 +502,10 @@
         std::vector<(int)> Aj, std::vector<(float)> Ax)
     densetocsr(int n_row, int n_col, double Mx, std::vector<(int)> Ap, 
         std::vector<(int)> Aj, std::vector<(double)> Ax)
-    densetocsr(int n_row, int n_col, npy_cfloat Mx, std::vector<(int)> Ap, 
-        std::vector<(int)> Aj, std::vector<(npy_cfloat)> Ax)
-    densetocsr(int n_row, int n_col, npy_cdouble Mx, std::vector<(int)> Ap, 
-        std::vector<(int)> Aj, std::vector<(npy_cdouble)> Ax)
+    densetocsr(int n_row, int n_col, npy_cfloat_wrapper Mx, std::vector<(int)> Ap, 
+        std::vector<(int)> Aj, std::vector<(npy_cfloat_wrapper)> Ax)
+    densetocsr(int n_row, int n_col, npy_cdouble_wrapper Mx, std::vector<(int)> Ap, 
+        std::vector<(int)> Aj, std::vector<(npy_cdouble_wrapper)> Ax)
     """
   return _sparsetools.densetocsr(*args)
 
@@ -495,8 +515,8 @@
     sort_csr_indices(int n_row, int n_col, int Ap, int Aj, long Ax)
     sort_csr_indices(int n_row, int n_col, int Ap, int Aj, float Ax)
     sort_csr_indices(int n_row, int n_col, int Ap, int Aj, double Ax)
-    sort_csr_indices(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax)
-    sort_csr_indices(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax)
+    sort_csr_indices(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax)
+    sort_csr_indices(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax)
     """
   return _sparsetools.sort_csr_indices(*args)
 
@@ -506,8 +526,8 @@
     sort_csc_indices(int n_row, int n_col, int Ap, int Ai, long Ax)
     sort_csc_indices(int n_row, int n_col, int Ap, int Ai, float Ax)
     sort_csc_indices(int n_row, int n_col, int Ap, int Ai, double Ax)
-    sort_csc_indices(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax)
-    sort_csc_indices(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax)
+    sort_csc_indices(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax)
+    sort_csc_indices(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax)
     """
   return _sparsetools.sort_csc_indices(*args)
 
@@ -517,8 +537,8 @@
     sum_csr_duplicates(int n_row, int n_col, int Ap, int Aj, long Ax)
     sum_csr_duplicates(int n_row, int n_col, int Ap, int Aj, float Ax)
     sum_csr_duplicates(int n_row, int n_col, int Ap, int Aj, double Ax)
-    sum_csr_duplicates(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax)
-    sum_csr_duplicates(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax)
+    sum_csr_duplicates(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax)
+    sum_csr_duplicates(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax)
     """
   return _sparsetools.sum_csr_duplicates(*args)
 
@@ -528,8 +548,8 @@
     sum_csc_duplicates(int n_row, int n_col, int Ap, int Ai, long Ax)
     sum_csc_duplicates(int n_row, int n_col, int Ap, int Ai, float Ax)
     sum_csc_duplicates(int n_row, int n_col, int Ap, int Ai, double Ax)
-    sum_csc_duplicates(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax)
-    sum_csc_duplicates(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax)
+    sum_csc_duplicates(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax)
+    sum_csc_duplicates(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax)
     """
   return _sparsetools.sum_csc_duplicates(*args)
 

Modified: trunk/Lib/sparse/sparsetools/sparsetools_wrap.cxx
===================================================================
--- trunk/Lib/sparse/sparsetools/sparsetools_wrap.cxx	2007-07-15 02:22:48 UTC (rev 3164)
+++ trunk/Lib/sparse/sparsetools/sparsetools_wrap.cxx	2007-07-15 07:09:14 UTC (rev 3165)
@@ -2473,8 +2473,8 @@
 #define SWIGTYPE_p_std__vectorTfloat_t swig_types[3]
 #define SWIGTYPE_p_std__vectorTint_t swig_types[4]
 #define SWIGTYPE_p_std__vectorTlong_t swig_types[5]
-#define SWIGTYPE_p_std__vectorTnpy_cdouble_t swig_types[6]
-#define SWIGTYPE_p_std__vectorTnpy_cfloat_t swig_types[7]
+#define SWIGTYPE_p_std__vectorTnpy_cdouble_wrapper_t swig_types[6]
+#define SWIGTYPE_p_std__vectorTnpy_cfloat_wrapper_t swig_types[7]
 static swig_type_info *swig_types[9];
 static swig_module_info swig_module = {swig_types, 8, 0, 0, 0, 0};
 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
@@ -2578,7 +2578,9 @@
 #endif
 #include "stdio.h"
 #include <numpy/arrayobject.h>
+#include "complex_ops.h"
 
+
 /* The following code originally appeared in enthought/kiva/agg/src/numeric.i,
  * author unknown.  It was translated from C++ to C by John Hunter.  Bill
  * Spotz has modified it slightly to fix some minor bugs, add some comments
@@ -3516,10 +3518,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg8 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<npy_cfloat_wrapper > *arg8 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -3532,7 +3534,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cfloat > *tmp8 ;
+  std::vector<npy_cfloat_wrapper > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -3548,7 +3550,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cfloat>(); 
+    tmp8 = new std::vector<npy_cfloat_wrapper>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csrtocsc",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -3584,9 +3586,9 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (npy_cfloat_wrapper*) array5->data;
   }
-  csrtocsc<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,arg6,arg7,arg8);
+  csrtocsc<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat_wrapper const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -3605,7 +3607,7 @@
   {
     int length = (arg8)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -3639,10 +3641,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg8 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cdouble_wrapper > *arg8 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -3655,7 +3657,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cdouble > *tmp8 ;
+  std::vector<npy_cdouble_wrapper > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -3671,7 +3673,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cdouble>(); 
+    tmp8 = new std::vector<npy_cdouble_wrapper>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csrtocsc",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -3707,9 +3709,9 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cdouble_wrapper*) array5->data;
   }
-  csrtocsc<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,arg6,arg7,arg8);
+  csrtocsc<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble_wrapper const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -3728,7 +3730,7 @@
   {
     int length = (arg8)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -3954,7 +3956,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrtocsc'.\n  Possible C/C++ prototypes are:\n    csrtocsc<(int,int)>(int const,int const,int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csrtocsc<(int,long)>(int const,int const,int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csrtocsc<(int,float)>(int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csrtocsc<(int,double)>(int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csrtocsc<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csrtocsc<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrtocsc'.\n  Possible C/C++ prototypes are:\n    csrtocsc<(int,int)>(int const,int const,int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csrtocsc<(int,long)>(int const,int const,int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csrtocsc<(int,float)>(int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csrtocsc<(int,double)>(int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csrtocsc<(int,npy_cfloat_wrapper)>(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat_wrapper > *)\n    csrtocsc<(int,npy_cdouble_wrapper)>(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -4457,10 +4459,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg8 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<npy_cfloat_wrapper > *arg8 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -4473,7 +4475,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cfloat > *tmp8 ;
+  std::vector<npy_cfloat_wrapper > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -4489,7 +4491,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cfloat>(); 
+    tmp8 = new std::vector<npy_cfloat_wrapper>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocsr",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -4525,9 +4527,9 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (npy_cfloat_wrapper*) array5->data;
   }
-  csctocsr<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,arg6,arg7,arg8);
+  csctocsr<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat_wrapper const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -4546,7 +4548,7 @@
   {
     int length = (arg8)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -4580,10 +4582,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg8 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cdouble_wrapper > *arg8 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -4596,7 +4598,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cdouble > *tmp8 ;
+  std::vector<npy_cdouble_wrapper > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -4612,7 +4614,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cdouble>(); 
+    tmp8 = new std::vector<npy_cdouble_wrapper>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocsr",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -4648,9 +4650,9 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cdouble_wrapper*) array5->data;
   }
-  csctocsr<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,arg6,arg7,arg8);
+  csctocsr<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble_wrapper const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -4669,7 +4671,7 @@
   {
     int length = (arg8)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -4895,7 +4897,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csctocsr'.\n  Possible C/C++ prototypes are:\n    csctocsr<(int,int)>(int const,int const,int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csctocsr<(int,long)>(int const,int const,int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csctocsr<(int,float)>(int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csctocsr<(int,double)>(int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csctocsr<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csctocsr<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csctocsr'.\n  Possible C/C++ prototypes are:\n    csctocsr<(int,int)>(int const,int const,int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csctocsr<(int,long)>(int const,int const,int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csctocsr<(int,float)>(int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csctocsr<(int,double)>(int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csctocsr<(int,npy_cfloat_wrapper)>(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat_wrapper > *)\n    csctocsr<(int,npy_cdouble_wrapper)>(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -5398,10 +5400,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg8 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<npy_cfloat_wrapper > *arg8 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -5414,7 +5416,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cfloat > *tmp8 ;
+  std::vector<npy_cfloat_wrapper > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -5430,7 +5432,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cfloat>(); 
+    tmp8 = new std::vector<npy_cfloat_wrapper>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csrtocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -5466,9 +5468,9 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (npy_cfloat_wrapper*) array5->data;
   }
-  csrtocoo<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,arg6,arg7,arg8);
+  csrtocoo<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat_wrapper const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -5487,7 +5489,7 @@
   {
     int length = (arg8)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -5521,10 +5523,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg8 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cdouble_wrapper > *arg8 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -5537,7 +5539,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cdouble > *tmp8 ;
+  std::vector<npy_cdouble_wrapper > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -5553,7 +5555,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cdouble>(); 
+    tmp8 = new std::vector<npy_cdouble_wrapper>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csrtocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -5589,9 +5591,9 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cdouble_wrapper*) array5->data;
   }
-  csrtocoo<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,arg6,arg7,arg8);
+  csrtocoo<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble_wrapper const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -5610,7 +5612,7 @@
   {
     int length = (arg8)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -5836,7 +5838,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrtocoo'.\n  Possible C/C++ prototypes are:\n    csrtocoo<(int,int)>(int const,int const,int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csrtocoo<(int,long)>(int const,int const,int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csrtocoo<(int,float)>(int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csrtocoo<(int,double)>(int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csrtocoo<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csrtocoo<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrtocoo'.\n  Possible C/C++ prototypes are:\n    csrtocoo<(int,int)>(int const,int const,int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csrtocoo<(int,long)>(int const,int const,int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csrtocoo<(int,float)>(int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csrtocoo<(int,double)>(int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csrtocoo<(int,npy_cfloat_wrapper)>(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat_wrapper > *)\n    csrtocoo<(int,npy_cdouble_wrapper)>(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -6339,10 +6341,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg8 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<npy_cfloat_wrapper > *arg8 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -6355,7 +6357,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cfloat > *tmp8 ;
+  std::vector<npy_cfloat_wrapper > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -6371,7 +6373,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cfloat>(); 
+    tmp8 = new std::vector<npy_cfloat_wrapper>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -6407,9 +6409,9 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (npy_cfloat_wrapper*) array5->data;
   }
-  csctocoo<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,arg6,arg7,arg8);
+  csctocoo<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat_wrapper const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -6428,7 +6430,7 @@
   {
     int length = (arg8)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -6462,10 +6464,10 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg8 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cdouble_wrapper > *arg8 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -6478,7 +6480,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cdouble > *tmp8 ;
+  std::vector<npy_cdouble_wrapper > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -6494,7 +6496,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cdouble>(); 
+    tmp8 = new std::vector<npy_cdouble_wrapper>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:csctocoo",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -6530,9 +6532,9 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cdouble_wrapper*) array5->data;
   }
-  csctocoo<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,arg6,arg7,arg8);
+  csctocoo<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble_wrapper const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -6551,7 +6553,7 @@
   {
     int length = (arg8)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -6777,7 +6779,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csctocoo'.\n  Possible C/C++ prototypes are:\n    csctocoo<(int,int)>(int const,int const,int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csctocoo<(int,long)>(int const,int const,int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csctocoo<(int,float)>(int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csctocoo<(int,double)>(int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csctocoo<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csctocoo<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csctocoo'.\n  Possible C/C++ prototypes are:\n    csctocoo<(int,int)>(int const,int const,int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csctocoo<(int,long)>(int const,int const,int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csctocoo<(int,float)>(int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csctocoo<(int,double)>(int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csctocoo<(int,npy_cfloat_wrapper)>(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat_wrapper > *)\n    csctocoo<(int,npy_cdouble_wrapper)>(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -7317,10 +7319,10 @@
   int arg3 ;
   int *arg4 ;
   int *arg5 ;
-  npy_cfloat *arg6 ;
+  npy_cfloat_wrapper *arg6 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
   std::vector<int > *arg8 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg9 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<npy_cfloat_wrapper > *arg9 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -7335,7 +7337,7 @@
   int is_new_object6 ;
   std::vector<int > *tmp7 ;
   std::vector<int > *tmp8 ;
-  std::vector<npy_cfloat > *tmp9 ;
+  std::vector<npy_cfloat_wrapper > *tmp9 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -7352,7 +7354,7 @@
     arg8 = tmp8; 
   }
   {
-    tmp9 = new std::vector<npy_cfloat>(); 
+    tmp9 = new std::vector<npy_cfloat_wrapper>(); 
     arg9 = tmp9; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -7393,9 +7395,9 @@
     };
     array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CFLOAT, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_cfloat*) array6->data;
+    arg6 = (npy_cfloat_wrapper*) array6->data;
   }
-  cootocsr<int,npy_cfloat >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(npy_cfloat const (*))arg6,arg7,arg8,arg9);
+  cootocsr<int,npy_cfloat_wrapper >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(npy_cfloat_wrapper const (*))arg6,arg7,arg8,arg9);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
@@ -7414,7 +7416,7 @@
   {
     int length = (arg9)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg9; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -7449,10 +7451,10 @@
   int arg3 ;
   int *arg4 ;
   int *arg5 ;
-  npy_cdouble *arg6 ;
+  npy_cdouble_wrapper *arg6 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
   std::vector<int > *arg8 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg9 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cdouble_wrapper > *arg9 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -7467,7 +7469,7 @@
   int is_new_object6 ;
   std::vector<int > *tmp7 ;
   std::vector<int > *tmp8 ;
-  std::vector<npy_cdouble > *tmp9 ;
+  std::vector<npy_cdouble_wrapper > *tmp9 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -7484,7 +7486,7 @@
     arg8 = tmp8; 
   }
   {
-    tmp9 = new std::vector<npy_cdouble>(); 
+    tmp9 = new std::vector<npy_cdouble_wrapper>(); 
     arg9 = tmp9; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -7525,9 +7527,9 @@
     };
     array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CDOUBLE, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_cdouble*) array6->data;
+    arg6 = (npy_cdouble_wrapper*) array6->data;
   }
-  cootocsr<int,npy_cdouble >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(npy_cdouble const (*))arg6,arg7,arg8,arg9);
+  cootocsr<int,npy_cdouble_wrapper >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(npy_cdouble_wrapper const (*))arg6,arg7,arg8,arg9);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
@@ -7546,7 +7548,7 @@
   {
     int length = (arg9)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg9; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -7808,7 +7810,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cootocsr'.\n  Possible C/C++ prototypes are:\n    cootocsr<(int,int)>(int const,int const,int const,int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    cootocsr<(int,long)>(int const,int const,int const,int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    cootocsr<(int,float)>(int const,int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    cootocsr<(int,double)>(int const,int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    cootocsr<(int,npy_cfloat)>(int const,int const,int const,int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    cootocsr<(int,npy_cdouble)>(int const,int const,int const,int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cootocsr'.\n  Possible C/C++ prototypes are:\n    cootocsr<(int,int)>(int const,int const,int const,int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    cootocsr<(int,long)>(int const,int const,int const,int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    cootocsr<(int,float)>(int const,int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    cootocsr<(int,double)>(int const,int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    cootocsr<(int,npy_cfloat_wrapper)>(int const,int const,int const,int const [],int const [],npy_cfloat_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat_wrapper > *)\n    cootocsr<(int,npy_cdouble_wrapper)>(int const,int const,int const,int const [],int const [],npy_cdouble_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -8348,10 +8350,10 @@
   int arg3 ;
   int *arg4 ;
   int *arg5 ;
-  npy_cfloat *arg6 ;
+  npy_cfloat_wrapper *arg6 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
   std::vector<int > *arg8 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg9 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<npy_cfloat_wrapper > *arg9 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -8366,7 +8368,7 @@
   int is_new_object6 ;
   std::vector<int > *tmp7 ;
   std::vector<int > *tmp8 ;
-  std::vector<npy_cfloat > *tmp9 ;
+  std::vector<npy_cfloat_wrapper > *tmp9 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -8383,7 +8385,7 @@
     arg8 = tmp8; 
   }
   {
-    tmp9 = new std::vector<npy_cfloat>(); 
+    tmp9 = new std::vector<npy_cfloat_wrapper>(); 
     arg9 = tmp9; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -8424,9 +8426,9 @@
     };
     array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CFLOAT, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_cfloat*) array6->data;
+    arg6 = (npy_cfloat_wrapper*) array6->data;
   }
-  cootocsc<int,npy_cfloat >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(npy_cfloat const (*))arg6,arg7,arg8,arg9);
+  cootocsc<int,npy_cfloat_wrapper >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(npy_cfloat_wrapper const (*))arg6,arg7,arg8,arg9);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
@@ -8445,7 +8447,7 @@
   {
     int length = (arg9)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg9; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -8480,10 +8482,10 @@
   int arg3 ;
   int *arg4 ;
   int *arg5 ;
-  npy_cdouble *arg6 ;
+  npy_cdouble_wrapper *arg6 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
   std::vector<int > *arg8 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg9 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cdouble_wrapper > *arg9 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -8498,7 +8500,7 @@
   int is_new_object6 ;
   std::vector<int > *tmp7 ;
   std::vector<int > *tmp8 ;
-  std::vector<npy_cdouble > *tmp9 ;
+  std::vector<npy_cdouble_wrapper > *tmp9 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -8515,7 +8517,7 @@
     arg8 = tmp8; 
   }
   {
-    tmp9 = new std::vector<npy_cdouble>(); 
+    tmp9 = new std::vector<npy_cdouble_wrapper>(); 
     arg9 = tmp9; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cootocsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -8556,9 +8558,9 @@
     };
     array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CDOUBLE, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_cdouble*) array6->data;
+    arg6 = (npy_cdouble_wrapper*) array6->data;
   }
-  cootocsc<int,npy_cdouble >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(npy_cdouble const (*))arg6,arg7,arg8,arg9);
+  cootocsc<int,npy_cdouble_wrapper >(arg1,arg2,arg3,(int const (*))arg4,(int const (*))arg5,(npy_cdouble_wrapper const (*))arg6,arg7,arg8,arg9);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
@@ -8577,7 +8579,7 @@
   {
     int length = (arg9)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg9))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg9; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -8839,7 +8841,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cootocsc'.\n  Possible C/C++ prototypes are:\n    cootocsc<(int,int)>(int const,int const,int const,int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    cootocsc<(int,long)>(int const,int const,int const,int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    cootocsc<(int,float)>(int const,int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    cootocsc<(int,double)>(int const,int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    cootocsc<(int,npy_cfloat)>(int const,int const,int const,int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    cootocsc<(int,npy_cdouble)>(int const,int const,int const,int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cootocsc'.\n  Possible C/C++ prototypes are:\n    cootocsc<(int,int)>(int const,int const,int const,int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    cootocsc<(int,long)>(int const,int const,int const,int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    cootocsc<(int,float)>(int const,int const,int const,int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    cootocsc<(int,double)>(int const,int const,int const,int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    cootocsc<(int,npy_cfloat_wrapper)>(int const,int const,int const,int const [],int const [],npy_cfloat_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat_wrapper > *)\n    cootocsc<(int,npy_cdouble_wrapper)>(int const,int const,int const,int const [],int const [],npy_cdouble_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -9558,13 +9560,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cfloat *arg8 ;
+  npy_cfloat_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<npy_cfloat_wrapper > *arg11 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -9583,7 +9585,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cfloat > *tmp11 ;
+  std::vector<npy_cfloat_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -9602,7 +9604,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cfloat>(); 
+    tmp11 = new std::vector<npy_cfloat_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrmucsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -9638,7 +9640,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (npy_cfloat_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -9662,9 +9664,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cfloat*) array8->data;
+    arg8 = (npy_cfloat_wrapper*) array8->data;
   }
-  csrmucsr<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
+  csrmucsr<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -9683,7 +9685,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -9735,13 +9737,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cdouble *arg8 ;
+  npy_cdouble_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cdouble_wrapper > *arg11 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -9760,7 +9762,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cdouble > *tmp11 ;
+  std::vector<npy_cdouble_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -9779,7 +9781,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cdouble>(); 
+    tmp11 = new std::vector<npy_cdouble_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csrmucsr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -9815,7 +9817,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cdouble_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -9839,9 +9841,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cdouble*) array8->data;
+    arg8 = (npy_cdouble_wrapper*) array8->data;
   }
-  csrmucsr<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
+  csrmucsr<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -9860,7 +9862,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -10194,7 +10196,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrmucsr'.\n  Possible C/C++ prototypes are:\n    csrmucsr<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csrmucsr<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csrmucsr<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csrmucsr<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csrmucsr<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csrmucsr<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrmucsr'.\n  Possible C/C++ prototypes are:\n    csrmucsr<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csrmucsr<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csrmucsr<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csrmucsr<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csrmucsr<(int,npy_cfloat_wrapper)>(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const [],int const [],npy_cfloat_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat_wrapper > *)\n    csrmucsr<(int,npy_cdouble_wrapper)>(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const [],int const [],npy_cdouble_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -10913,13 +10915,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cfloat *arg8 ;
+  npy_cfloat_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<npy_cfloat_wrapper > *arg11 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -10938,7 +10940,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cfloat > *tmp11 ;
+  std::vector<npy_cfloat_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -10957,7 +10959,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cfloat>(); 
+    tmp11 = new std::vector<npy_cfloat_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscmucsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -10993,7 +10995,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (npy_cfloat_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -11017,9 +11019,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cfloat*) array8->data;
+    arg8 = (npy_cfloat_wrapper*) array8->data;
   }
-  cscmucsc<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
+  cscmucsc<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -11038,7 +11040,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -11090,13 +11092,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cdouble *arg8 ;
+  npy_cdouble_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cdouble_wrapper > *arg11 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -11115,7 +11117,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cdouble > *tmp11 ;
+  std::vector<npy_cdouble_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -11134,7 +11136,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cdouble>(); 
+    tmp11 = new std::vector<npy_cdouble_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cscmucsc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -11170,7 +11172,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cdouble_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -11194,9 +11196,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cdouble*) array8->data;
+    arg8 = (npy_cdouble_wrapper*) array8->data;
   }
-  cscmucsc<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
+  cscmucsc<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -11215,7 +11217,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -11549,7 +11551,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cscmucsc'.\n  Possible C/C++ prototypes are:\n    cscmucsc<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    cscmucsc<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    cscmucsc<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    cscmucsc<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    cscmucsc<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    cscmucsc<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cscmucsc'.\n  Possible C/C++ prototypes are:\n    cscmucsc<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    cscmucsc<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    cscmucsc<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    cscmucsc<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    cscmucsc<(int,npy_cfloat_wrapper)>(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],int const [],int const [],npy_cfloat_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat_wrapper > *)\n    cscmucsc<(int,npy_cdouble_wrapper)>(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],int const [],int const [],npy_cdouble_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -12020,9 +12022,9 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
-  npy_cfloat *arg6 ;
-  std::vector<npy_cfloat > *arg7 = (std::vector<npy_cfloat > *) 0 ;
+  npy_cfloat_wrapper *arg5 ;
+  npy_cfloat_wrapper *arg6 ;
+  std::vector<npy_cfloat_wrapper > *arg7 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -12035,7 +12037,7 @@
   int is_new_object5 ;
   PyArrayObject *array6 = NULL ;
   int is_new_object6 ;
-  std::vector<npy_cfloat > *tmp7 ;
+  std::vector<npy_cfloat_wrapper > *tmp7 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -12044,7 +12046,7 @@
   PyObject * obj5 = 0 ;
   
   {
-    tmp7 = new std::vector<npy_cfloat>(); 
+    tmp7 = new std::vector<npy_cfloat_wrapper>(); 
     arg7 = tmp7; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:csrmux",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -12080,7 +12082,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (npy_cfloat_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -12088,14 +12090,14 @@
     };
     array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CFLOAT, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_cfloat*) array6->data;
+    arg6 = (npy_cfloat_wrapper*) array6->data;
   }
-  csrmux<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(npy_cfloat const (*))arg6,arg7);
+  csrmux<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat_wrapper const (*))arg5,(npy_cfloat_wrapper const (*))arg6,arg7);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg7; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -12135,9 +12137,9 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
-  npy_cdouble *arg6 ;
-  std::vector<npy_cdouble > *arg7 = (std::vector<npy_cdouble > *) 0 ;
+  npy_cdouble_wrapper *arg5 ;
+  npy_cdouble_wrapper *arg6 ;
+  std::vector<npy_cdouble_wrapper > *arg7 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -12150,7 +12152,7 @@
   int is_new_object5 ;
   PyArrayObject *array6 = NULL ;
   int is_new_object6 ;
-  std::vector<npy_cdouble > *tmp7 ;
+  std::vector<npy_cdouble_wrapper > *tmp7 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -12159,7 +12161,7 @@
   PyObject * obj5 = 0 ;
   
   {
-    tmp7 = new std::vector<npy_cdouble>(); 
+    tmp7 = new std::vector<npy_cdouble_wrapper>(); 
     arg7 = tmp7; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:csrmux",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -12195,7 +12197,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cdouble_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -12203,14 +12205,14 @@
     };
     array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CDOUBLE, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_cdouble*) array6->data;
+    arg6 = (npy_cdouble_wrapper*) array6->data;
   }
-  csrmux<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(npy_cdouble const (*))arg6,arg7);
+  csrmux<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble_wrapper const (*))arg5,(npy_cdouble_wrapper const (*))arg6,arg7);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg7; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -12472,7 +12474,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrmux'.\n  Possible C/C++ prototypes are:\n    csrmux<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],std::vector<int > *)\n    csrmux<(int,long)>(int const,int const,int const [],int const [],long const [],long const [],std::vector<long > *)\n    csrmux<(int,float)>(int const,int const,int const [],int const [],float const [],float const [],std::vector<float > *)\n    csrmux<(int,double)>(int const,int const,int const [],int const [],double const [],double const [],std::vector<double > *)\n    csrmux<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],npy_cfloat const [],std::vector<npy_cfloat > *)\n    csrmux<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],npy_cdouble const [],std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrmux'.\n  Possible C/C++ prototypes are:\n    csrmux<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],std::vector<int > *)\n    csrmux<(int,long)>(int const,int const,int const [],int const [],long const [],long const [],std::vector<long > *)\n    csrmux<(int,float)>(int const,int const,int const [],int const [],float const [],float const [],std::vector<float > *)\n    csrmux<(int,double)>(int const,int const,int const [],int const [],double const [],double const [],std::vector<double > *)\n    csrmux<(int,npy_cfloat_wrapper)>(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper const [],std::vector<npy_cfloat_wrapper > *)\n    csrmux<(int,npy_cdouble_wrapper)>(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper const [],std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -12943,9 +12945,9 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
-  npy_cfloat *arg6 ;
-  std::vector<npy_cfloat > *arg7 = (std::vector<npy_cfloat > *) 0 ;
+  npy_cfloat_wrapper *arg5 ;
+  npy_cfloat_wrapper *arg6 ;
+  std::vector<npy_cfloat_wrapper > *arg7 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -12958,7 +12960,7 @@
   int is_new_object5 ;
   PyArrayObject *array6 = NULL ;
   int is_new_object6 ;
-  std::vector<npy_cfloat > *tmp7 ;
+  std::vector<npy_cfloat_wrapper > *tmp7 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -12967,7 +12969,7 @@
   PyObject * obj5 = 0 ;
   
   {
-    tmp7 = new std::vector<npy_cfloat>(); 
+    tmp7 = new std::vector<npy_cfloat_wrapper>(); 
     arg7 = tmp7; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cscmux",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -13003,7 +13005,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (npy_cfloat_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -13011,14 +13013,14 @@
     };
     array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CFLOAT, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_cfloat*) array6->data;
+    arg6 = (npy_cfloat_wrapper*) array6->data;
   }
-  cscmux<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(npy_cfloat const (*))arg6,arg7);
+  cscmux<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat_wrapper const (*))arg5,(npy_cfloat_wrapper const (*))arg6,arg7);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg7; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -13058,9 +13060,9 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
-  npy_cdouble *arg6 ;
-  std::vector<npy_cdouble > *arg7 = (std::vector<npy_cdouble > *) 0 ;
+  npy_cdouble_wrapper *arg5 ;
+  npy_cdouble_wrapper *arg6 ;
+  std::vector<npy_cdouble_wrapper > *arg7 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -13073,7 +13075,7 @@
   int is_new_object5 ;
   PyArrayObject *array6 = NULL ;
   int is_new_object6 ;
-  std::vector<npy_cdouble > *tmp7 ;
+  std::vector<npy_cdouble_wrapper > *tmp7 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -13082,7 +13084,7 @@
   PyObject * obj5 = 0 ;
   
   {
-    tmp7 = new std::vector<npy_cdouble>(); 
+    tmp7 = new std::vector<npy_cdouble_wrapper>(); 
     arg7 = tmp7; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cscmux",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
@@ -13118,7 +13120,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cdouble_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -13126,14 +13128,14 @@
     };
     array6 = obj_to_array_contiguous_allow_conversion(obj5, PyArray_CDOUBLE, &is_new_object6);
     if (!array6 || !require_dimensions(array6,1) || !require_size(array6,size,1)) SWIG_fail;
-    arg6 = (npy_cdouble*) array6->data;
+    arg6 = (npy_cdouble_wrapper*) array6->data;
   }
-  cscmux<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(npy_cdouble const (*))arg6,arg7);
+  cscmux<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble_wrapper const (*))arg5,(npy_cdouble_wrapper const (*))arg6,arg7);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg7)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg7))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg7; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -13395,7 +13397,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cscmux'.\n  Possible C/C++ prototypes are:\n    cscmux<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],std::vector<int > *)\n    cscmux<(int,long)>(int const,int const,int const [],int const [],long const [],long const [],std::vector<long > *)\n    cscmux<(int,float)>(int const,int const,int const [],int const [],float const [],float const [],std::vector<float > *)\n    cscmux<(int,double)>(int const,int const,int const [],int const [],double const [],double const [],std::vector<double > *)\n    cscmux<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],npy_cfloat const [],std::vector<npy_cfloat > *)\n    cscmux<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],npy_cdouble const [],std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cscmux'.\n  Possible C/C++ prototypes are:\n    cscmux<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],std::vector<int > *)\n    cscmux<(int,long)>(int const,int const,int const [],int const [],long const [],long const [],std::vector<long > *)\n    cscmux<(int,float)>(int const,int const,int const [],int const [],float const [],float const [],std::vector<float > *)\n    cscmux<(int,double)>(int const,int const,int const [],int const [],double const [],double const [],std::vector<double > *)\n    cscmux<(int,npy_cfloat_wrapper)>(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper const [],std::vector<npy_cfloat_wrapper > *)\n    cscmux<(int,npy_cdouble_wrapper)>(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper const [],std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -14114,13 +14116,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cfloat *arg8 ;
+  npy_cfloat_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<npy_cfloat_wrapper > *arg11 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -14139,7 +14141,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cfloat > *tmp11 ;
+  std::vector<npy_cfloat_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -14158,7 +14160,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cfloat>(); 
+    tmp11 = new std::vector<npy_cfloat_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csr_elmul_csr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -14194,7 +14196,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (npy_cfloat_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -14218,9 +14220,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cfloat*) array8->data;
+    arg8 = (npy_cfloat_wrapper*) array8->data;
   }
-  csr_elmul_csr<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
+  csr_elmul_csr<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -14239,7 +14241,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -14291,13 +14293,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cdouble *arg8 ;
+  npy_cdouble_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cdouble_wrapper > *arg11 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -14316,7 +14318,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cdouble > *tmp11 ;
+  std::vector<npy_cdouble_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -14335,7 +14337,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cdouble>(); 
+    tmp11 = new std::vector<npy_cdouble_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csr_elmul_csr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -14371,7 +14373,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cdouble_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -14395,9 +14397,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cdouble*) array8->data;
+    arg8 = (npy_cdouble_wrapper*) array8->data;
   }
-  csr_elmul_csr<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
+  csr_elmul_csr<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -14416,7 +14418,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -14750,7 +14752,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csr_elmul_csr'.\n  Possible C/C++ prototypes are:\n    csr_elmul_csr<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csr_elmul_csr<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csr_elmul_csr<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csr_elmul_csr<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csr_elmul_csr<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csr_elmul_csr<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csr_elmul_csr'.\n  Possible C/C++ prototypes are:\n    csr_elmul_csr<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csr_elmul_csr<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csr_elmul_csr<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csr_elmul_csr<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    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 [],std::vector<int > *,std::vector<int > *,std::vector<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 [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -15469,13 +15471,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cfloat *arg8 ;
+  npy_cfloat_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<npy_cfloat_wrapper > *arg11 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -15494,7 +15496,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cfloat > *tmp11 ;
+  std::vector<npy_cfloat_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -15513,7 +15515,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cfloat>(); 
+    tmp11 = new std::vector<npy_cfloat_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csr_eldiv_csr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -15549,7 +15551,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (npy_cfloat_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -15573,9 +15575,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cfloat*) array8->data;
+    arg8 = (npy_cfloat_wrapper*) array8->data;
   }
-  csr_eldiv_csr<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
+  csr_eldiv_csr<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -15594,7 +15596,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -15646,13 +15648,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cdouble *arg8 ;
+  npy_cdouble_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cdouble_wrapper > *arg11 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -15671,7 +15673,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cdouble > *tmp11 ;
+  std::vector<npy_cdouble_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -15690,7 +15692,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cdouble>(); 
+    tmp11 = new std::vector<npy_cdouble_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csr_eldiv_csr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -15726,7 +15728,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cdouble_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -15750,9 +15752,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cdouble*) array8->data;
+    arg8 = (npy_cdouble_wrapper*) array8->data;
   }
-  csr_eldiv_csr<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
+  csr_eldiv_csr<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -15771,7 +15773,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -16105,7 +16107,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csr_eldiv_csr'.\n  Possible C/C++ prototypes are:\n    csr_eldiv_csr<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csr_eldiv_csr<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csr_eldiv_csr<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csr_eldiv_csr<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csr_eldiv_csr<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csr_eldiv_csr<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csr_eldiv_csr'.\n  Possible C/C++ prototypes are:\n    csr_eldiv_csr<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csr_eldiv_csr<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csr_eldiv_csr<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csr_eldiv_csr<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    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 [],std::vector<int > *,std::vector<int > *,std::vector<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 [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -16824,13 +16826,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cfloat *arg8 ;
+  npy_cfloat_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<npy_cfloat_wrapper > *arg11 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -16849,7 +16851,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cfloat > *tmp11 ;
+  std::vector<npy_cfloat_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -16868,7 +16870,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cfloat>(); 
+    tmp11 = new std::vector<npy_cfloat_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csr_plus_csr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -16904,7 +16906,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (npy_cfloat_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -16928,9 +16930,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cfloat*) array8->data;
+    arg8 = (npy_cfloat_wrapper*) array8->data;
   }
-  csr_plus_csr<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
+  csr_plus_csr<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -16949,7 +16951,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -17001,13 +17003,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cdouble *arg8 ;
+  npy_cdouble_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cdouble_wrapper > *arg11 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -17026,7 +17028,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cdouble > *tmp11 ;
+  std::vector<npy_cdouble_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -17045,7 +17047,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cdouble>(); 
+    tmp11 = new std::vector<npy_cdouble_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csr_plus_csr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -17081,7 +17083,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cdouble_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -17105,9 +17107,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cdouble*) array8->data;
+    arg8 = (npy_cdouble_wrapper*) array8->data;
   }
-  csr_plus_csr<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
+  csr_plus_csr<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -17126,7 +17128,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -17460,7 +17462,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csr_plus_csr'.\n  Possible C/C++ prototypes are:\n    csr_plus_csr<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csr_plus_csr<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csr_plus_csr<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csr_plus_csr<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csr_plus_csr<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csr_plus_csr<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csr_plus_csr'.\n  Possible C/C++ prototypes are:\n    csr_plus_csr<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csr_plus_csr<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csr_plus_csr<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csr_plus_csr<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    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 [],std::vector<int > *,std::vector<int > *,std::vector<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 [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -18179,13 +18181,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cfloat *arg8 ;
+  npy_cfloat_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<npy_cfloat_wrapper > *arg11 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -18204,7 +18206,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cfloat > *tmp11 ;
+  std::vector<npy_cfloat_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -18223,7 +18225,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cfloat>(); 
+    tmp11 = new std::vector<npy_cfloat_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csr_minus_csr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -18259,7 +18261,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (npy_cfloat_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -18283,9 +18285,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cfloat*) array8->data;
+    arg8 = (npy_cfloat_wrapper*) array8->data;
   }
-  csr_minus_csr<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
+  csr_minus_csr<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -18304,7 +18306,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -18356,13 +18358,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cdouble *arg8 ;
+  npy_cdouble_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cdouble_wrapper > *arg11 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -18381,7 +18383,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cdouble > *tmp11 ;
+  std::vector<npy_cdouble_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -18400,7 +18402,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cdouble>(); 
+    tmp11 = new std::vector<npy_cdouble_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csr_minus_csr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -18436,7 +18438,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cdouble_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -18460,9 +18462,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cdouble*) array8->data;
+    arg8 = (npy_cdouble_wrapper*) array8->data;
   }
-  csr_minus_csr<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
+  csr_minus_csr<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -18481,7 +18483,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -18815,7 +18817,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csr_minus_csr'.\n  Possible C/C++ prototypes are:\n    csr_minus_csr<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csr_minus_csr<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csr_minus_csr<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csr_minus_csr<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csr_minus_csr<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csr_minus_csr<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csr_minus_csr'.\n  Possible C/C++ prototypes are:\n    csr_minus_csr<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csr_minus_csr<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csr_minus_csr<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csr_minus_csr<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    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 [],std::vector<int > *,std::vector<int > *,std::vector<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 [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -19534,13 +19536,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cfloat *arg8 ;
+  npy_cfloat_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<npy_cfloat_wrapper > *arg11 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -19559,7 +19561,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cfloat > *tmp11 ;
+  std::vector<npy_cfloat_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -19578,7 +19580,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cfloat>(); 
+    tmp11 = new std::vector<npy_cfloat_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csc_elmul_csc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -19614,7 +19616,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (npy_cfloat_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -19638,9 +19640,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cfloat*) array8->data;
+    arg8 = (npy_cfloat_wrapper*) array8->data;
   }
-  csc_elmul_csc<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
+  csc_elmul_csc<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -19659,7 +19661,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -19711,13 +19713,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cdouble *arg8 ;
+  npy_cdouble_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cdouble_wrapper > *arg11 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -19736,7 +19738,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cdouble > *tmp11 ;
+  std::vector<npy_cdouble_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -19755,7 +19757,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cdouble>(); 
+    tmp11 = new std::vector<npy_cdouble_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csc_elmul_csc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -19791,7 +19793,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cdouble_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -19815,9 +19817,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cdouble*) array8->data;
+    arg8 = (npy_cdouble_wrapper*) array8->data;
   }
-  csc_elmul_csc<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
+  csc_elmul_csc<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -19836,7 +19838,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -20170,7 +20172,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csc_elmul_csc'.\n  Possible C/C++ prototypes are:\n    csc_elmul_csc<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csc_elmul_csc<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csc_elmul_csc<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csc_elmul_csc<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csc_elmul_csc<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csc_elmul_csc<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csc_elmul_csc'.\n  Possible C/C++ prototypes are:\n    csc_elmul_csc<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csc_elmul_csc<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csc_elmul_csc<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csc_elmul_csc<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    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 [],std::vector<int > *,std::vector<int > *,std::vector<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 [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -20889,13 +20891,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cfloat *arg8 ;
+  npy_cfloat_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<npy_cfloat_wrapper > *arg11 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -20914,7 +20916,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cfloat > *tmp11 ;
+  std::vector<npy_cfloat_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -20933,7 +20935,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cfloat>(); 
+    tmp11 = new std::vector<npy_cfloat_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csc_eldiv_csc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -20969,7 +20971,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (npy_cfloat_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -20993,9 +20995,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cfloat*) array8->data;
+    arg8 = (npy_cfloat_wrapper*) array8->data;
   }
-  csc_eldiv_csc<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
+  csc_eldiv_csc<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -21014,7 +21016,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -21066,13 +21068,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cdouble *arg8 ;
+  npy_cdouble_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cdouble_wrapper > *arg11 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -21091,7 +21093,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cdouble > *tmp11 ;
+  std::vector<npy_cdouble_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -21110,7 +21112,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cdouble>(); 
+    tmp11 = new std::vector<npy_cdouble_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csc_eldiv_csc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -21146,7 +21148,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cdouble_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -21170,9 +21172,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cdouble*) array8->data;
+    arg8 = (npy_cdouble_wrapper*) array8->data;
   }
-  csc_eldiv_csc<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
+  csc_eldiv_csc<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -21191,7 +21193,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -21525,7 +21527,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csc_eldiv_csc'.\n  Possible C/C++ prototypes are:\n    csc_eldiv_csc<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csc_eldiv_csc<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csc_eldiv_csc<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csc_eldiv_csc<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csc_eldiv_csc<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csc_eldiv_csc<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csc_eldiv_csc'.\n  Possible C/C++ prototypes are:\n    csc_eldiv_csc<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csc_eldiv_csc<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csc_eldiv_csc<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csc_eldiv_csc<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    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 [],std::vector<int > *,std::vector<int > *,std::vector<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 [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -22244,13 +22246,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cfloat *arg8 ;
+  npy_cfloat_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<npy_cfloat_wrapper > *arg11 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -22269,7 +22271,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cfloat > *tmp11 ;
+  std::vector<npy_cfloat_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -22288,7 +22290,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cfloat>(); 
+    tmp11 = new std::vector<npy_cfloat_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csc_plus_csc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -22324,7 +22326,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (npy_cfloat_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -22348,9 +22350,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cfloat*) array8->data;
+    arg8 = (npy_cfloat_wrapper*) array8->data;
   }
-  csc_plus_csc<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
+  csc_plus_csc<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -22369,7 +22371,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -22421,13 +22423,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cdouble *arg8 ;
+  npy_cdouble_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cdouble_wrapper > *arg11 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -22446,7 +22448,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cdouble > *tmp11 ;
+  std::vector<npy_cdouble_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -22465,7 +22467,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cdouble>(); 
+    tmp11 = new std::vector<npy_cdouble_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csc_plus_csc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -22501,7 +22503,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cdouble_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -22525,9 +22527,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cdouble*) array8->data;
+    arg8 = (npy_cdouble_wrapper*) array8->data;
   }
-  csc_plus_csc<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
+  csc_plus_csc<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -22546,7 +22548,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -22880,7 +22882,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csc_plus_csc'.\n  Possible C/C++ prototypes are:\n    csc_plus_csc<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csc_plus_csc<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csc_plus_csc<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csc_plus_csc<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csc_plus_csc<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csc_plus_csc<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csc_plus_csc'.\n  Possible C/C++ prototypes are:\n    csc_plus_csc<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csc_plus_csc<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csc_plus_csc<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csc_plus_csc<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    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 [],std::vector<int > *,std::vector<int > *,std::vector<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 [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -23599,13 +23601,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cfloat *arg8 ;
+  npy_cfloat_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg11 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<npy_cfloat_wrapper > *arg11 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -23624,7 +23626,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cfloat > *tmp11 ;
+  std::vector<npy_cfloat_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -23643,7 +23645,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cfloat>(); 
+    tmp11 = new std::vector<npy_cfloat_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csc_minus_csc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -23679,7 +23681,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (npy_cfloat_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -23703,9 +23705,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CFLOAT, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cfloat*) array8->data;
+    arg8 = (npy_cfloat_wrapper*) array8->data;
   }
-  csc_minus_csc<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat const (*))arg8,arg9,arg10,arg11);
+  csc_minus_csc<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cfloat_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -23724,7 +23726,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -23776,13 +23778,13 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   int *arg6 ;
   int *arg7 ;
-  npy_cdouble *arg8 ;
+  npy_cdouble_wrapper *arg8 ;
   std::vector<int > *arg9 = (std::vector<int > *) 0 ;
   std::vector<int > *arg10 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg11 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cdouble_wrapper > *arg11 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -23801,7 +23803,7 @@
   int is_new_object8 ;
   std::vector<int > *tmp9 ;
   std::vector<int > *tmp10 ;
-  std::vector<npy_cdouble > *tmp11 ;
+  std::vector<npy_cdouble_wrapper > *tmp11 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -23820,7 +23822,7 @@
     arg10 = tmp10; 
   }
   {
-    tmp11 = new std::vector<npy_cdouble>(); 
+    tmp11 = new std::vector<npy_cdouble_wrapper>(); 
     arg11 = tmp11; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:csc_minus_csc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
@@ -23856,7 +23858,7 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cdouble_wrapper*) array5->data;
   }
   {
     npy_intp size[1] = {
@@ -23880,9 +23882,9 @@
     };
     array8 = obj_to_array_contiguous_allow_conversion(obj7, PyArray_CDOUBLE, &is_new_object8);
     if (!array8 || !require_dimensions(array8,1) || !require_size(array8,size,1)) SWIG_fail;
-    arg8 = (npy_cdouble*) array8->data;
+    arg8 = (npy_cdouble_wrapper*) array8->data;
   }
-  csc_minus_csc<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble const (*))arg8,arg9,arg10,arg11);
+  csc_minus_csc<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble_wrapper const (*))arg5,(int const (*))arg6,(int const (*))arg7,(npy_cdouble_wrapper const (*))arg8,arg9,arg10,arg11);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg9)->size(); 
@@ -23901,7 +23903,7 @@
   {
     int length = (arg11)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg11))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg11; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -24235,7 +24237,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csc_minus_csc'.\n  Possible C/C++ prototypes are:\n    csc_minus_csc<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csc_minus_csc<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csc_minus_csc<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csc_minus_csc<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    csc_minus_csc<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],int const [],int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    csc_minus_csc<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],int const [],int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csc_minus_csc'.\n  Possible C/C++ prototypes are:\n    csc_minus_csc<(int,int)>(int const,int const,int const [],int const [],int const [],int const [],int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    csc_minus_csc<(int,long)>(int const,int const,int const [],int const [],long const [],int const [],int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    csc_minus_csc<(int,float)>(int const,int const,int const [],int const [],float const [],int const [],int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    csc_minus_csc<(int,double)>(int const,int const,int const [],int const [],double const [],int const [],int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    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 [],std::vector<int > *,std::vector<int > *,std::vector<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 [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -24702,10 +24704,10 @@
   int arg2 ;
   int arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg8 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<npy_cfloat_wrapper > *arg8 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -24718,7 +24720,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cfloat > *tmp8 ;
+  std::vector<npy_cfloat_wrapper > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -24734,7 +24736,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cfloat>(); 
+    tmp8 = new std::vector<npy_cfloat_wrapper>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:spdiags",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -24767,9 +24769,9 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,2) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (npy_cfloat_wrapper*) array5->data;
   }
-  spdiags<int,npy_cfloat >(arg1,arg2,arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,arg6,arg7,arg8);
+  spdiags<int,npy_cfloat_wrapper >(arg1,arg2,arg3,(int const (*))arg4,(npy_cfloat_wrapper const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -24788,7 +24790,7 @@
   {
     int length = (arg8)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -24816,10 +24818,10 @@
   int arg2 ;
   int arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   std::vector<int > *arg6 = (std::vector<int > *) 0 ;
   std::vector<int > *arg7 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg8 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cdouble_wrapper > *arg8 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -24832,7 +24834,7 @@
   int is_new_object5 ;
   std::vector<int > *tmp6 ;
   std::vector<int > *tmp7 ;
-  std::vector<npy_cdouble > *tmp8 ;
+  std::vector<npy_cdouble_wrapper > *tmp8 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -24848,7 +24850,7 @@
     arg7 = tmp7; 
   }
   {
-    tmp8 = new std::vector<npy_cdouble>(); 
+    tmp8 = new std::vector<npy_cdouble_wrapper>(); 
     arg8 = tmp8; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOOOO:spdiags",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
@@ -24881,9 +24883,9 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,2) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cdouble_wrapper*) array5->data;
   }
-  spdiags<int,npy_cdouble >(arg1,arg2,arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,arg6,arg7,arg8);
+  spdiags<int,npy_cdouble_wrapper >(arg1,arg2,arg3,(int const (*))arg4,(npy_cdouble_wrapper const (*))arg5,arg6,arg7,arg8);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg6)->size(); 
@@ -24902,7 +24904,7 @@
   {
     int length = (arg8)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg8))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg8; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -25128,7 +25130,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'spdiags'.\n  Possible C/C++ prototypes are:\n    spdiags<(int,int)>(int const,int const,int const,int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    spdiags<(int,long)>(int const,int const,int const,int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    spdiags<(int,float)>(int const,int const,int const,int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    spdiags<(int,double)>(int const,int const,int const,int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    spdiags<(int,npy_cfloat)>(int const,int const,int const,int const [],npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    spdiags<(int,npy_cdouble)>(int const,int const,int const,int const [],npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'spdiags'.\n  Possible C/C++ prototypes are:\n    spdiags<(int,int)>(int const,int const,int const,int const [],int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    spdiags<(int,long)>(int const,int const,int const,int const [],long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    spdiags<(int,float)>(int const,int const,int const,int const [],float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    spdiags<(int,double)>(int const,int const,int const,int const [],double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    spdiags<(int,npy_cfloat_wrapper)>(int const,int const,int const,int const [],npy_cfloat_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat_wrapper > *)\n    spdiags<(int,npy_cdouble_wrapper)>(int const,int const,int const,int const [],npy_cdouble_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -25507,8 +25509,8 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
-  npy_cfloat *arg6 ;
+  npy_cfloat_wrapper *arg5 ;
+  npy_cfloat_wrapper *arg6 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -25560,14 +25562,14 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CFLOAT, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cfloat*) array5->data;
+    arg5 = (npy_cfloat_wrapper*) array5->data;
   }
   {
     temp6 = obj_to_array_no_conversion(obj5,PyArray_CFLOAT);
     if (!temp6 || !require_contiguous(temp6)) SWIG_fail;
-    arg6 = (npy_cfloat*) temp6->data;
+    arg6 = (npy_cfloat_wrapper*) temp6->data;
   }
-  csrtodense<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat const (*))arg5,arg6);
+  csrtodense<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cfloat_wrapper const (*))arg5,arg6);
   resultobj = SWIG_Py_Void();
   {
     if (is_new_object3 && array3) Py_DECREF(array3);
@@ -25599,8 +25601,8 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
-  npy_cdouble *arg6 ;
+  npy_cdouble_wrapper *arg5 ;
+  npy_cdouble_wrapper *arg6 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -25652,14 +25654,14 @@
     };
     array5 = obj_to_array_contiguous_allow_conversion(obj4, PyArray_CDOUBLE, &is_new_object5);
     if (!array5 || !require_dimensions(array5,1) || !require_size(array5,size,1)) SWIG_fail;
-    arg5 = (npy_cdouble*) array5->data;
+    arg5 = (npy_cdouble_wrapper*) array5->data;
   }
   {
     temp6 = obj_to_array_no_conversion(obj5,PyArray_CDOUBLE);
     if (!temp6 || !require_contiguous(temp6)) SWIG_fail;
-    arg6 = (npy_cdouble*) temp6->data;
+    arg6 = (npy_cdouble_wrapper*) temp6->data;
   }
-  csrtodense<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble const (*))arg5,arg6);
+  csrtodense<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,(int const (*))arg4,(npy_cdouble_wrapper const (*))arg5,arg6);
   resultobj = SWIG_Py_Void();
   {
     if (is_new_object3 && array3) Py_DECREF(array3);
@@ -25913,7 +25915,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrtodense'.\n  Possible C/C++ prototypes are:\n    csrtodense<(int,int)>(int const,int const,int const [],int const [],int const [],int [])\n    csrtodense<(int,long)>(int const,int const,int const [],int const [],long const [],long [])\n    csrtodense<(int,float)>(int const,int const,int const [],int const [],float const [],float [])\n    csrtodense<(int,double)>(int const,int const,int const [],int const [],double const [],double [])\n    csrtodense<(int,npy_cfloat)>(int const,int const,int const [],int const [],npy_cfloat const [],npy_cfloat [])\n    csrtodense<(int,npy_cdouble)>(int const,int const,int const [],int const [],npy_cdouble const [],npy_cdouble [])\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'csrtodense'.\n  Possible C/C++ prototypes are:\n    csrtodense<(int,int)>(int const,int const,int const [],int const [],int const [],int [])\n    csrtodense<(int,long)>(int const,int const,int const [],int const [],long const [],long [])\n    csrtodense<(int,float)>(int const,int const,int const [],int const [],float const [],float [])\n    csrtodense<(int,double)>(int const,int const,int const [],int const [],double const [],double [])\n    csrtodense<(int,npy_cfloat_wrapper)>(int const,int const,int const [],int const [],npy_cfloat_wrapper const [],npy_cfloat_wrapper [])\n    csrtodense<(int,npy_cdouble_wrapper)>(int const,int const,int const [],int const [],npy_cdouble_wrapper const [],npy_cdouble_wrapper [])\n");
   return NULL;
 }
 
@@ -26270,10 +26272,10 @@
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  npy_cfloat *arg3 ;
+  npy_cfloat_wrapper *arg3 ;
   std::vector<int > *arg4 = (std::vector<int > *) 0 ;
   std::vector<int > *arg5 = (std::vector<int > *) 0 ;
-  std::vector<npy_cfloat > *arg6 = (std::vector<npy_cfloat > *) 0 ;
+  std::vector<npy_cfloat_wrapper > *arg6 = (std::vector<npy_cfloat_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -26282,7 +26284,7 @@
   int is_new_object3 ;
   std::vector<int > *tmp4 ;
   std::vector<int > *tmp5 ;
-  std::vector<npy_cfloat > *tmp6 ;
+  std::vector<npy_cfloat_wrapper > *tmp6 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -26296,7 +26298,7 @@
     arg5 = tmp5; 
   }
   {
-    tmp6 = new std::vector<npy_cfloat>(); 
+    tmp6 = new std::vector<npy_cfloat_wrapper>(); 
     arg6 = tmp6; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOO:densetocsr",&obj0,&obj1,&obj2)) SWIG_fail;
@@ -26316,9 +26318,9 @@
     };
     array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_CFLOAT, &is_new_object3);
     if (!array3 || !require_dimensions(array3,2) || !require_size(array3,size,1)) SWIG_fail;
-    arg3 = (npy_cfloat*) array3->data;
+    arg3 = (npy_cfloat_wrapper*) array3->data;
   }
-  densetocsr<int,npy_cfloat >(arg1,arg2,(npy_cfloat const (*))arg3,arg4,arg5,arg6);
+  densetocsr<int,npy_cfloat_wrapper >(arg1,arg2,(npy_cfloat_wrapper const (*))arg3,arg4,arg5,arg6);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg4)->size(); 
@@ -26337,7 +26339,7 @@
   {
     int length = (arg6)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CFLOAT); 
-    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(npy_cfloat)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(npy_cfloat_wrapper)*length);	 
     delete arg6; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -26357,10 +26359,10 @@
   PyObject *resultobj = 0;
   int arg1 ;
   int arg2 ;
-  npy_cdouble *arg3 ;
+  npy_cdouble_wrapper *arg3 ;
   std::vector<int > *arg4 = (std::vector<int > *) 0 ;
   std::vector<int > *arg5 = (std::vector<int > *) 0 ;
-  std::vector<npy_cdouble > *arg6 = (std::vector<npy_cdouble > *) 0 ;
+  std::vector<npy_cdouble_wrapper > *arg6 = (std::vector<npy_cdouble_wrapper > *) 0 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -26369,7 +26371,7 @@
   int is_new_object3 ;
   std::vector<int > *tmp4 ;
   std::vector<int > *tmp5 ;
-  std::vector<npy_cdouble > *tmp6 ;
+  std::vector<npy_cdouble_wrapper > *tmp6 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
@@ -26383,7 +26385,7 @@
     arg5 = tmp5; 
   }
   {
-    tmp6 = new std::vector<npy_cdouble>(); 
+    tmp6 = new std::vector<npy_cdouble_wrapper>(); 
     arg6 = tmp6; 
   }
   if (!PyArg_ParseTuple(args,(char *)"OOO:densetocsr",&obj0,&obj1,&obj2)) SWIG_fail;
@@ -26403,9 +26405,9 @@
     };
     array3 = obj_to_array_contiguous_allow_conversion(obj2, PyArray_CDOUBLE, &is_new_object3);
     if (!array3 || !require_dimensions(array3,2) || !require_size(array3,size,1)) SWIG_fail;
-    arg3 = (npy_cdouble*) array3->data;
+    arg3 = (npy_cdouble_wrapper*) array3->data;
   }
-  densetocsr<int,npy_cdouble >(arg1,arg2,(npy_cdouble const (*))arg3,arg4,arg5,arg6);
+  densetocsr<int,npy_cdouble_wrapper >(arg1,arg2,(npy_cdouble_wrapper const (*))arg3,arg4,arg5,arg6);
   resultobj = SWIG_Py_Void();
   {
     int length = (arg4)->size(); 
@@ -26424,7 +26426,7 @@
   {
     int length = (arg6)->size(); 
     PyObject *obj = PyArray_FromDims(1, &length, PyArray_CDOUBLE); 
-    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(npy_cdouble)*length);	 
+    memcpy(PyArray_DATA(obj),&((*(arg6))[0]),sizeof(npy_cdouble_wrapper)*length);	 
     delete arg6; 
     resultobj = helper_appendToTuple( resultobj, (PyObject *)obj ); 
   }
@@ -26578,7 +26580,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'densetocsr'.\n  Possible C/C++ prototypes are:\n    densetocsr<(int,int)>(int const,int const,int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    densetocsr<(int,long)>(int const,int const,long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    densetocsr<(int,float)>(int const,int const,float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    densetocsr<(int,double)>(int const,int const,double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    densetocsr<(int,npy_cfloat)>(int const,int const,npy_cfloat const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat > *)\n    densetocsr<(int,npy_cdouble)>(int const,int const,npy_cdouble const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble > *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'densetocsr'.\n  Possible C/C++ prototypes are:\n    densetocsr<(int,int)>(int const,int const,int const [],std::vector<int > *,std::vector<int > *,std::vector<int > *)\n    densetocsr<(int,long)>(int const,int const,long const [],std::vector<int > *,std::vector<int > *,std::vector<long > *)\n    densetocsr<(int,float)>(int const,int const,float const [],std::vector<int > *,std::vector<int > *,std::vector<float > *)\n    densetocsr<(int,double)>(int const,int const,double const [],std::vector<int > *,std::vector<int > *,std::vector<double > *)\n    densetocsr<(int,npy_cfloat_wrapper)>(int const,int const,npy_cfloat_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cfloat_wrapper > *)\n    densetocsr<(int,npy_cdouble_wrapper)>(int const,int const,npy_cdouble_wrapper const [],std::vector<int > *,std::vector<int > *,std::vector<npy_cdouble_wrapper > *)\n");
   return NULL;
 }
 
@@ -26846,7 +26848,7 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -26888,9 +26890,9 @@
   {
     temp5 = obj_to_array_no_conversion(obj4,PyArray_CFLOAT);
     if (!temp5  || !require_contiguous(temp5)) SWIG_fail;
-    arg5 = (npy_cfloat*) temp5->data;
+    arg5 = (npy_cfloat_wrapper*) temp5->data;
   }
-  sort_csr_indices<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,arg4,arg5);
+  sort_csr_indices<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,arg4,arg5);
   resultobj = SWIG_Py_Void();
   {
     if (is_new_object3 && array3) Py_DECREF(array3);
@@ -26910,7 +26912,7 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -26952,9 +26954,9 @@
   {
     temp5 = obj_to_array_no_conversion(obj4,PyArray_CDOUBLE);
     if (!temp5  || !require_contiguous(temp5)) SWIG_fail;
-    arg5 = (npy_cdouble*) temp5->data;
+    arg5 = (npy_cdouble_wrapper*) temp5->data;
   }
-  sort_csr_indices<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,arg4,arg5);
+  sort_csr_indices<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,arg4,arg5);
   resultobj = SWIG_Py_Void();
   {
     if (is_new_object3 && array3) Py_DECREF(array3);
@@ -27166,7 +27168,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'sort_csr_indices'.\n  Possible C/C++ prototypes are:\n    sort_csr_indices<(int,int)>(int const,int const,int const [],int [],int [])\n    sort_csr_indices<(int,long)>(int const,int const,int const [],int [],long [])\n    sort_csr_indices<(int,float)>(int const,int const,int const [],int [],float [])\n    sort_csr_indices<(int,double)>(int const,int const,int const [],int [],double [])\n    sort_csr_indices<(int,npy_cfloat)>(int const,int const,int const [],int [],npy_cfloat [])\n    sort_csr_indices<(int,npy_cdouble)>(int const,int const,int const [],int [],npy_cdouble [])\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'sort_csr_indices'.\n  Possible C/C++ prototypes are:\n    sort_csr_indices<(int,int)>(int const,int const,int const [],int [],int [])\n    sort_csr_indices<(int,long)>(int const,int const,int const [],int [],long [])\n    sort_csr_indices<(int,float)>(int const,int const,int const [],int [],float [])\n    sort_csr_indices<(int,double)>(int const,int const,int const [],int [],double [])\n    sort_csr_indices<(int,npy_cfloat_wrapper)>(int const,int const,int const [],int [],npy_cfloat_wrapper [])\n    sort_csr_indices<(int,npy_cdouble_wrapper)>(int const,int const,int const [],int [],npy_cdouble_wrapper [])\n");
   return NULL;
 }
 
@@ -27438,7 +27440,7 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -27481,9 +27483,9 @@
   {
     temp5 = obj_to_array_no_conversion(obj4,PyArray_CFLOAT);
     if (!temp5  || !require_contiguous(temp5)) SWIG_fail;
-    arg5 = (npy_cfloat*) temp5->data;
+    arg5 = (npy_cfloat_wrapper*) temp5->data;
   }
-  sort_csc_indices<int,npy_cfloat >(arg1,arg2,(int const (*))arg3,arg4,arg5);
+  sort_csc_indices<int,npy_cfloat_wrapper >(arg1,arg2,(int const (*))arg3,arg4,arg5);
   resultobj = SWIG_Py_Void();
   {
     if (is_new_object3 && array3) Py_DECREF(array3);
@@ -27503,7 +27505,7 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -27546,9 +27548,9 @@
   {
     temp5 = obj_to_array_no_conversion(obj4,PyArray_CDOUBLE);
     if (!temp5  || !require_contiguous(temp5)) SWIG_fail;
-    arg5 = (npy_cdouble*) temp5->data;
+    arg5 = (npy_cdouble_wrapper*) temp5->data;
   }
-  sort_csc_indices<int,npy_cdouble >(arg1,arg2,(int const (*))arg3,arg4,arg5);
+  sort_csc_indices<int,npy_cdouble_wrapper >(arg1,arg2,(int const (*))arg3,arg4,arg5);
   resultobj = SWIG_Py_Void();
   {
     if (is_new_object3 && array3) Py_DECREF(array3);
@@ -27760,7 +27762,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'sort_csc_indices'.\n  Possible C/C++ prototypes are:\n    sort_csc_indices<(int,int)>(int const,int const,int const [],int [],int [])\n    sort_csc_indices<(int,long)>(int const,int const,int const [],int [],long [])\n    sort_csc_indices<(int,float)>(int const,int const,int const [],int [],float [])\n    sort_csc_indices<(int,double)>(int const,int const,int const [],int [],double [])\n    sort_csc_indices<(int,npy_cfloat)>(int const,int const,int const [],int [],npy_cfloat [])\n    sort_csc_indices<(int,npy_cdouble)>(int const,int const,int const [],int [],npy_cdouble [])\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'sort_csc_indices'.\n  Possible C/C++ prototypes are:\n    sort_csc_indices<(int,int)>(int const,int const,int const [],int [],int [])\n    sort_csc_indices<(int,long)>(int const,int const,int const [],int [],long [])\n    sort_csc_indices<(int,float)>(int const,int const,int const [],int [],float [])\n    sort_csc_indices<(int,double)>(int const,int const,int const [],int [],double [])\n    sort_csc_indices<(int,npy_cfloat_wrapper)>(int const,int const,int const [],int [],npy_cfloat_wrapper [])\n    sort_csc_indices<(int,npy_cdouble_wrapper)>(int const,int const,int const [],int [],npy_cdouble_wrapper [])\n");
   return NULL;
 }
 
@@ -27988,7 +27990,7 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -28026,9 +28028,9 @@
   {
     temp5 = obj_to_array_no_conversion(obj4,PyArray_CFLOAT);
     if (!temp5  || !require_contiguous(temp5)) SWIG_fail;
-    arg5 = (npy_cfloat*) temp5->data;
+    arg5 = (npy_cfloat_wrapper*) temp5->data;
   }
-  sum_csr_duplicates<int,npy_cfloat >(arg1,arg2,arg3,arg4,arg5);
+  sum_csr_duplicates<int,npy_cfloat_wrapper >(arg1,arg2,arg3,arg4,arg5);
   resultobj = SWIG_Py_Void();
   return resultobj;
 fail:
@@ -28042,7 +28044,7 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -28080,9 +28082,9 @@
   {
     temp5 = obj_to_array_no_conversion(obj4,PyArray_CDOUBLE);
     if (!temp5  || !require_contiguous(temp5)) SWIG_fail;
-    arg5 = (npy_cdouble*) temp5->data;
+    arg5 = (npy_cdouble_wrapper*) temp5->data;
   }
-  sum_csr_duplicates<int,npy_cdouble >(arg1,arg2,arg3,arg4,arg5);
+  sum_csr_duplicates<int,npy_cdouble_wrapper >(arg1,arg2,arg3,arg4,arg5);
   resultobj = SWIG_Py_Void();
   return resultobj;
 fail:
@@ -28288,7 +28290,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'sum_csr_duplicates'.\n  Possible C/C++ prototypes are:\n    sum_csr_duplicates<(int,int)>(int const,int const,int [],int [],int [])\n    sum_csr_duplicates<(int,long)>(int const,int const,int [],int [],long [])\n    sum_csr_duplicates<(int,float)>(int const,int const,int [],int [],float [])\n    sum_csr_duplicates<(int,double)>(int const,int const,int [],int [],double [])\n    sum_csr_duplicates<(int,npy_cfloat)>(int const,int const,int [],int [],npy_cfloat [])\n    sum_csr_duplicates<(int,npy_cdouble)>(int const,int const,int [],int [],npy_cdouble [])\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'sum_csr_duplicates'.\n  Possible C/C++ prototypes are:\n    sum_csr_duplicates<(int,int)>(int const,int const,int [],int [],int [])\n    sum_csr_duplicates<(int,long)>(int const,int const,int [],int [],long [])\n    sum_csr_duplicates<(int,float)>(int const,int const,int [],int [],float [])\n    sum_csr_duplicates<(int,double)>(int const,int const,int [],int [],double [])\n    sum_csr_duplicates<(int,npy_cfloat_wrapper)>(int const,int const,int [],int [],npy_cfloat_wrapper [])\n    sum_csr_duplicates<(int,npy_cdouble_wrapper)>(int const,int const,int [],int [],npy_cdouble_wrapper [])\n");
   return NULL;
 }
 
@@ -28520,7 +28522,7 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cfloat *arg5 ;
+  npy_cfloat_wrapper *arg5 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -28559,9 +28561,9 @@
   {
     temp5 = obj_to_array_no_conversion(obj4,PyArray_CFLOAT);
     if (!temp5  || !require_contiguous(temp5)) SWIG_fail;
-    arg5 = (npy_cfloat*) temp5->data;
+    arg5 = (npy_cfloat_wrapper*) temp5->data;
   }
-  sum_csc_duplicates<int,npy_cfloat >(arg1,arg2,arg3,arg4,arg5);
+  sum_csc_duplicates<int,npy_cfloat_wrapper >(arg1,arg2,arg3,arg4,arg5);
   resultobj = SWIG_Py_Void();
   return resultobj;
 fail:
@@ -28575,7 +28577,7 @@
   int arg2 ;
   int *arg3 ;
   int *arg4 ;
-  npy_cdouble *arg5 ;
+  npy_cdouble_wrapper *arg5 ;
   int val1 ;
   int ecode1 = 0 ;
   int val2 ;
@@ -28614,9 +28616,9 @@
   {
     temp5 = obj_to_array_no_conversion(obj4,PyArray_CDOUBLE);
     if (!temp5  || !require_contiguous(temp5)) SWIG_fail;
-    arg5 = (npy_cdouble*) temp5->data;
+    arg5 = (npy_cdouble_wrapper*) temp5->data;
   }
-  sum_csc_duplicates<int,npy_cdouble >(arg1,arg2,arg3,arg4,arg5);
+  sum_csc_duplicates<int,npy_cdouble_wrapper >(arg1,arg2,arg3,arg4,arg5);
   resultobj = SWIG_Py_Void();
   return resultobj;
 fail:
@@ -28822,7 +28824,7 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'sum_csc_duplicates'.\n  Possible C/C++ prototypes are:\n    sum_csc_duplicates<(int,int)>(int const,int const,int [],int [],int [])\n    sum_csc_duplicates<(int,long)>(int const,int const,int [],int [],long [])\n    sum_csc_duplicates<(int,float)>(int const,int const,int [],int [],float [])\n    sum_csc_duplicates<(int,double)>(int const,int const,int [],int [],double [])\n    sum_csc_duplicates<(int,npy_cfloat)>(int const,int const,int [],int [],npy_cfloat [])\n    sum_csc_duplicates<(int,npy_cdouble)>(int const,int const,int [],int [],npy_cdouble [])\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'sum_csc_duplicates'.\n  Possible C/C++ prototypes are:\n    sum_csc_duplicates<(int,int)>(int const,int const,int [],int [],int [])\n    sum_csc_duplicates<(int,long)>(int const,int const,int [],int [],long [])\n    sum_csc_duplicates<(int,float)>(int const,int const,int [],int [],float [])\n    sum_csc_duplicates<(int,double)>(int const,int const,int [],int [],double [])\n    sum_csc_duplicates<(int,npy_cfloat_wrapper)>(int const,int const,int [],int [],npy_cfloat_wrapper [])\n    sum_csc_duplicates<(int,npy_cdouble_wrapper)>(int const,int const,int [],int [],npy_cdouble_wrapper [])\n");
   return NULL;
 }
 
@@ -28837,12 +28839,12 @@
 		"    std::vector<(int)> Bi, std::vector<(float)> Bx)\n"
 		"csrtocsc(int n_row, int n_col, int Ap, int Aj, double Ax, std::vector<(int)> Bp, \n"
 		"    std::vector<(int)> Bi, std::vector<(double)> Bx)\n"
-		"csrtocsc(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, \n"
+		"csrtocsc(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
 		"    std::vector<(int)> Bp, std::vector<(int)> Bi, \n"
-		"    std::vector<(npy_cfloat)> Bx)\n"
-		"csrtocsc(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, \n"
+		"    std::vector<(npy_cfloat_wrapper)> Bx)\n"
+		"csrtocsc(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
 		"    std::vector<(int)> Bp, std::vector<(int)> Bi, \n"
-		"    std::vector<(npy_cdouble)> Bx)\n"
+		"    std::vector<(npy_cdouble_wrapper)> Bx)\n"
 		""},
 	 { (char *)"csctocsr", _wrap_csctocsr, METH_VARARGS, (char *)"\n"
 		"csctocsr(int n_row, int n_col, int Ap, int Ai, int Ax, std::vector<(int)> Bp, \n"
@@ -28853,12 +28855,12 @@
 		"    std::vector<(int)> Bj, std::vector<(float)> Bx)\n"
 		"csctocsr(int n_row, int n_col, int Ap, int Ai, double Ax, std::vector<(int)> Bp, \n"
 		"    std::vector<(int)> Bj, std::vector<(double)> Bx)\n"
-		"csctocsr(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, \n"
+		"csctocsr(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, \n"
 		"    std::vector<(int)> Bp, std::vector<(int)> Bj, \n"
-		"    std::vector<(npy_cfloat)> Bx)\n"
-		"csctocsr(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, \n"
+		"    std::vector<(npy_cfloat_wrapper)> Bx)\n"
+		"csctocsr(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, \n"
 		"    std::vector<(int)> Bp, std::vector<(int)> Bj, \n"
-		"    std::vector<(npy_cdouble)> Bx)\n"
+		"    std::vector<(npy_cdouble_wrapper)> Bx)\n"
 		""},
 	 { (char *)"csrtocoo", _wrap_csrtocoo, METH_VARARGS, (char *)"\n"
 		"csrtocoo(int n_row, int n_col, int Ap, int Aj, int Ax, std::vector<(int)> Bi, \n"
@@ -28869,12 +28871,12 @@
 		"    std::vector<(int)> Bj, std::vector<(float)> Bx)\n"
 		"csrtocoo(int n_row, int n_col, int Ap, int Aj, double Ax, std::vector<(int)> Bi, \n"
 		"    std::vector<(int)> Bj, std::vector<(double)> Bx)\n"
-		"csrtocoo(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, \n"
+		"csrtocoo(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
 		"    std::vector<(int)> Bi, std::vector<(int)> Bj, \n"
-		"    std::vector<(npy_cfloat)> Bx)\n"
-		"csrtocoo(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, \n"
+		"    std::vector<(npy_cfloat_wrapper)> Bx)\n"
+		"csrtocoo(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
 		"    std::vector<(int)> Bi, std::vector<(int)> Bj, \n"
-		"    std::vector<(npy_cdouble)> Bx)\n"
+		"    std::vector<(npy_cdouble_wrapper)> Bx)\n"
 		""},
 	 { (char *)"csctocoo", _wrap_csctocoo, METH_VARARGS, (char *)"\n"
 		"csctocoo(int n_row, int n_col, int Ap, int Ai, int Ax, std::vector<(int)> Bi, \n"
@@ -28885,12 +28887,12 @@
 		"    std::vector<(int)> Bj, std::vector<(float)> Bx)\n"
 		"csctocoo(int n_row, int n_col, int Ap, int Ai, double Ax, std::vector<(int)> Bi, \n"
 		"    std::vector<(int)> Bj, std::vector<(double)> Bx)\n"
-		"csctocoo(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, \n"
+		"csctocoo(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, \n"
 		"    std::vector<(int)> Bi, std::vector<(int)> Bj, \n"
-		"    std::vector<(npy_cfloat)> Bx)\n"
-		"csctocoo(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, \n"
+		"    std::vector<(npy_cfloat_wrapper)> Bx)\n"
+		"csctocoo(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, \n"
 		"    std::vector<(int)> Bi, std::vector<(int)> Bj, \n"
-		"    std::vector<(npy_cdouble)> Bx)\n"
+		"    std::vector<(npy_cdouble_wrapper)> Bx)\n"
 		""},
 	 { (char *)"cootocsr", _wrap_cootocsr, METH_VARARGS, (char *)"\n"
 		"cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, int Ax, \n"
@@ -28905,12 +28907,12 @@
 		"cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, double Ax, \n"
 		"    std::vector<(int)> Bp, std::vector<(int)> Bj, \n"
 		"    std::vector<(double)> Bx)\n"
-		"cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cfloat Ax, \n"
+		"cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cfloat_wrapper Ax, \n"
 		"    std::vector<(int)> Bp, std::vector<(int)> Bj, \n"
-		"    std::vector<(npy_cfloat)> Bx)\n"
-		"cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cdouble Ax, \n"
+		"    std::vector<(npy_cfloat_wrapper)> Bx)\n"
+		"cootocsr(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cdouble_wrapper Ax, \n"
 		"    std::vector<(int)> Bp, std::vector<(int)> Bj, \n"
-		"    std::vector<(npy_cdouble)> Bx)\n"
+		"    std::vector<(npy_cdouble_wrapper)> Bx)\n"
 		""},
 	 { (char *)"cootocsc", _wrap_cootocsc, METH_VARARGS, (char *)"\n"
 		"cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, int Ax, \n"
@@ -28925,12 +28927,12 @@
 		"cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, double Ax, \n"
 		"    std::vector<(int)> Bp, std::vector<(int)> Bi, \n"
 		"    std::vector<(double)> Bx)\n"
-		"cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cfloat Ax, \n"
+		"cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cfloat_wrapper Ax, \n"
 		"    std::vector<(int)> Bp, std::vector<(int)> Bi, \n"
-		"    std::vector<(npy_cfloat)> Bx)\n"
-		"cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cdouble Ax, \n"
+		"    std::vector<(npy_cfloat_wrapper)> Bx)\n"
+		"cootocsc(int n_row, int n_col, int NNZ, int Ai, int Aj, npy_cdouble_wrapper Ax, \n"
 		"    std::vector<(int)> Bp, std::vector<(int)> Bi, \n"
-		"    std::vector<(npy_cdouble)> Bx)\n"
+		"    std::vector<(npy_cdouble_wrapper)> Bx)\n"
 		""},
 	 { (char *)"csrmucsr", _wrap_csrmucsr, METH_VARARGS, (char *)"\n"
 		"csrmucsr(int n_row, int n_col, int Ap, int Aj, int Ax, int Bp, \n"
@@ -28945,12 +28947,14 @@
 		"csrmucsr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, \n"
 		"    int Bj, double Bx, std::vector<(int)> Cp, \n"
 		"    std::vector<(int)> Cj, std::vector<(double)> Cx)\n"
-		"csrmucsr(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, \n"
-		"    int Bp, int Bj, npy_cfloat Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Cj, std::vector<(npy_cfloat)> Cx)\n"
-		"csrmucsr(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, \n"
-		"    int Bp, int Bj, npy_cdouble Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Cj, std::vector<(npy_cdouble)> Cx)\n"
+		"csrmucsr(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
+		"    int Bp, int Bj, npy_cfloat_wrapper Bx, \n"
+		"    std::vector<(int)> Cp, std::vector<(int)> Cj, \n"
+		"    std::vector<(npy_cfloat_wrapper)> Cx)\n"
+		"csrmucsr(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
+		"    int Bp, int Bj, npy_cdouble_wrapper Bx, \n"
+		"    std::vector<(int)> Cp, std::vector<(int)> Cj, \n"
+		"    std::vector<(npy_cdouble_wrapper)> Cx)\n"
 		""},
 	 { (char *)"cscmucsc", _wrap_cscmucsc, METH_VARARGS, (char *)"\n"
 		"cscmucsc(int n_row, int n_col, int Ap, int Ai, int Ax, int Bp, \n"
@@ -28965,12 +28969,14 @@
 		"cscmucsc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, \n"
 		"    int Bi, double Bx, std::vector<(int)> Cp, \n"
 		"    std::vector<(int)> Ci, std::vector<(double)> Cx)\n"
-		"cscmucsc(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, \n"
-		"    int Bp, int Bi, npy_cfloat Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Ci, std::vector<(npy_cfloat)> Cx)\n"
-		"cscmucsc(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, \n"
-		"    int Bp, int Bi, npy_cdouble Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Ci, std::vector<(npy_cdouble)> Cx)\n"
+		"cscmucsc(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, \n"
+		"    int Bp, int Bi, npy_cfloat_wrapper Bx, \n"
+		"    std::vector<(int)> Cp, std::vector<(int)> Ci, \n"
+		"    std::vector<(npy_cfloat_wrapper)> Cx)\n"
+		"cscmucsc(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, \n"
+		"    int Bp, int Bi, npy_cdouble_wrapper Bx, \n"
+		"    std::vector<(int)> Cp, std::vector<(int)> Ci, \n"
+		"    std::vector<(npy_cdouble_wrapper)> Cx)\n"
 		""},
 	 { (char *)"csrmux", _wrap_csrmux, METH_VARARGS, (char *)"\n"
 		"csrmux(int n_row, int n_col, int Ap, int Aj, int Ax, int Xx, \n"
@@ -28981,10 +28987,10 @@
 		"    std::vector<(float)> Yx)\n"
 		"csrmux(int n_row, int n_col, int Ap, int Aj, double Ax, double Xx, \n"
 		"    std::vector<(double)> Yx)\n"
-		"csrmux(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, \n"
-		"    npy_cfloat Xx, std::vector<(npy_cfloat)> Yx)\n"
-		"csrmux(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, \n"
-		"    npy_cdouble Xx, std::vector<(npy_cdouble)> Yx)\n"
+		"csrmux(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
+		"    npy_cfloat_wrapper Xx, std::vector<(npy_cfloat_wrapper)> Yx)\n"
+		"csrmux(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
+		"    npy_cdouble_wrapper Xx, std::vector<(npy_cdouble_wrapper)> Yx)\n"
 		""},
 	 { (char *)"cscmux", _wrap_cscmux, METH_VARARGS, (char *)"\n"
 		"cscmux(int n_row, int n_col, int Ap, int Ai, int Ax, int Xx, \n"
@@ -28995,10 +29001,10 @@
 		"    std::vector<(float)> Yx)\n"
 		"cscmux(int n_row, int n_col, int Ap, int Ai, double Ax, double Xx, \n"
 		"    std::vector<(double)> Yx)\n"
-		"cscmux(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, \n"
-		"    npy_cfloat Xx, std::vector<(npy_cfloat)> Yx)\n"
-		"cscmux(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, \n"
-		"    npy_cdouble Xx, std::vector<(npy_cdouble)> Yx)\n"
+		"cscmux(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax, \n"
+		"    npy_cfloat_wrapper Xx, std::vector<(npy_cfloat_wrapper)> Yx)\n"
+		"cscmux(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax, \n"
+		"    npy_cdouble_wrapper Xx, std::vector<(npy_cdouble_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, int Ax, int Bp, \n"
@@ -29013,12 +29019,14 @@
 		"csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, \n"
 		"    int Bj, double Bx, std::vector<(int)> Cp, \n"
 		"    std::vector<(int)> Cj, std::vector<(double)> Cx)\n"
-		"csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, \n"
-		"    int Bp, int Bj, npy_cfloat Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Cj, std::vector<(npy_cfloat)> Cx)\n"
-		"csr_elmul_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, \n"
-		"    int Bp, int Bj, npy_cdouble Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Cj, std::vector<(npy_cdouble)> 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"
+		"    std::vector<(int)> Cp, std::vector<(int)> Cj, \n"
+		"    std::vector<(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"
+		"    std::vector<(int)> Cp, std::vector<(int)> Cj, \n"
+		"    std::vector<(npy_cdouble_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, int Ax, int Bp, \n"
@@ -29033,12 +29041,14 @@
 		"csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, \n"
 		"    int Bj, double Bx, std::vector<(int)> Cp, \n"
 		"    std::vector<(int)> Cj, std::vector<(double)> Cx)\n"
-		"csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, \n"
-		"    int Bp, int Bj, npy_cfloat Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Cj, std::vector<(npy_cfloat)> Cx)\n"
-		"csr_eldiv_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, \n"
-		"    int Bp, int Bj, npy_cdouble Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Cj, std::vector<(npy_cdouble)> 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"
+		"    std::vector<(int)> Cp, std::vector<(int)> Cj, \n"
+		"    std::vector<(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"
+		"    std::vector<(int)> Cp, std::vector<(int)> Cj, \n"
+		"    std::vector<(npy_cdouble_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, int Ax, int Bp, \n"
@@ -29053,12 +29063,14 @@
 		"csr_plus_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, \n"
 		"    int Bj, double Bx, std::vector<(int)> Cp, \n"
 		"    std::vector<(int)> Cj, std::vector<(double)> Cx)\n"
-		"csr_plus_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, \n"
-		"    int Bp, int Bj, npy_cfloat Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Cj, std::vector<(npy_cfloat)> Cx)\n"
-		"csr_plus_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, \n"
-		"    int Bp, int Bj, npy_cdouble Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Cj, std::vector<(npy_cdouble)> 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"
+		"    std::vector<(int)> Cp, std::vector<(int)> Cj, \n"
+		"    std::vector<(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"
+		"    std::vector<(int)> Cp, std::vector<(int)> Cj, \n"
+		"    std::vector<(npy_cdouble_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, int Ax, int Bp, \n"
@@ -29073,12 +29085,14 @@
 		"csr_minus_csr(int n_row, int n_col, int Ap, int Aj, double Ax, int Bp, \n"
 		"    int Bj, double Bx, std::vector<(int)> Cp, \n"
 		"    std::vector<(int)> Cj, std::vector<(double)> Cx)\n"
-		"csr_minus_csr(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, \n"
-		"    int Bp, int Bj, npy_cfloat Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Cj, std::vector<(npy_cfloat)> Cx)\n"
-		"csr_minus_csr(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, \n"
-		"    int Bp, int Bj, npy_cdouble Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Cj, std::vector<(npy_cdouble)> 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"
+		"    std::vector<(int)> Cp, std::vector<(int)> Cj, \n"
+		"    std::vector<(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"
+		"    std::vector<(int)> Cp, std::vector<(int)> Cj, \n"
+		"    std::vector<(npy_cdouble_wrapper)> Cx)\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, int Ax, int Bp, \n"
@@ -29093,12 +29107,14 @@
 		"csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, \n"
 		"    int Bi, double Bx, std::vector<(int)> Cp, \n"
 		"    std::vector<(int)> Ci, std::vector<(double)> Cx)\n"
-		"csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, \n"
-		"    int Bp, int Bi, npy_cfloat Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Ci, std::vector<(npy_cfloat)> Cx)\n"
-		"csc_elmul_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, \n"
-		"    int Bp, int Bi, npy_cdouble Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Ci, std::vector<(npy_cdouble)> 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"
+		"    std::vector<(int)> Cp, std::vector<(int)> Ci, \n"
+		"    std::vector<(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"
+		"    std::vector<(int)> Cp, std::vector<(int)> Ci, \n"
+		"    std::vector<(npy_cdouble_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, int Ax, int Bp, \n"
@@ -29113,12 +29129,14 @@
 		"csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, \n"
 		"    int Bi, double Bx, std::vector<(int)> Cp, \n"
 		"    std::vector<(int)> Ci, std::vector<(double)> Cx)\n"
-		"csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, \n"
-		"    int Bp, int Bi, npy_cfloat Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Ci, std::vector<(npy_cfloat)> Cx)\n"
-		"csc_eldiv_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, \n"
-		"    int Bp, int Bi, npy_cdouble Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Ci, std::vector<(npy_cdouble)> 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"
+		"    std::vector<(int)> Cp, std::vector<(int)> Ci, \n"
+		"    std::vector<(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"
+		"    std::vector<(int)> Cp, std::vector<(int)> Ci, \n"
+		"    std::vector<(npy_cdouble_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, int Ax, int Bp, \n"
@@ -29133,12 +29151,14 @@
 		"csc_plus_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, \n"
 		"    int Bi, double Bx, std::vector<(int)> Cp, \n"
 		"    std::vector<(int)> Ci, std::vector<(double)> Cx)\n"
-		"csc_plus_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, \n"
-		"    int Bp, int Bi, npy_cfloat Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Ci, std::vector<(npy_cfloat)> Cx)\n"
-		"csc_plus_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, \n"
-		"    int Bp, int Bi, npy_cdouble Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Ci, std::vector<(npy_cdouble)> 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"
+		"    std::vector<(int)> Cp, std::vector<(int)> Ci, \n"
+		"    std::vector<(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"
+		"    std::vector<(int)> Cp, std::vector<(int)> Ci, \n"
+		"    std::vector<(npy_cdouble_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, int Ax, int Bp, \n"
@@ -29153,12 +29173,14 @@
 		"csc_minus_csc(int n_row, int n_col, int Ap, int Ai, double Ax, int Bp, \n"
 		"    int Bi, double Bx, std::vector<(int)> Cp, \n"
 		"    std::vector<(int)> Ci, std::vector<(double)> Cx)\n"
-		"csc_minus_csc(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax, \n"
-		"    int Bp, int Bi, npy_cfloat Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Ci, std::vector<(npy_cfloat)> Cx)\n"
-		"csc_minus_csc(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax, \n"
-		"    int Bp, int Bi, npy_cdouble Bx, std::vector<(int)> Cp, \n"
-		"    std::vector<(int)> Ci, std::vector<(npy_cdouble)> 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"
+		"    std::vector<(int)> Cp, std::vector<(int)> Ci, \n"
+		"    std::vector<(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"
+		"    std::vector<(int)> Cp, std::vector<(int)> Ci, \n"
+		"    std::vector<(npy_cdouble_wrapper)> Cx)\n"
 		""},
 	 { (char *)"spdiags", _wrap_spdiags, METH_VARARGS, (char *)"\n"
 		"spdiags(int n_row, int n_col, int n_diag, int offsets, int diags, \n"
@@ -29173,22 +29195,22 @@
 		"spdiags(int n_row, int n_col, int n_diag, int offsets, double diags, \n"
 		"    std::vector<(int)> Ap, std::vector<(int)> Ai, \n"
 		"    std::vector<(double)> Ax)\n"
-		"spdiags(int n_row, int n_col, int n_diag, int offsets, npy_cfloat diags, \n"
-		"    std::vector<(int)> Ap, std::vector<(int)> Ai, \n"
-		"    std::vector<(npy_cfloat)> Ax)\n"
-		"spdiags(int n_row, int n_col, int n_diag, int offsets, npy_cdouble diags, \n"
-		"    std::vector<(int)> Ap, std::vector<(int)> Ai, \n"
-		"    std::vector<(npy_cdouble)> Ax)\n"
+		"spdiags(int n_row, int n_col, int n_diag, int offsets, npy_cfloat_wrapper diags, \n"
+		"    std::vector<(int)> Ap, \n"
+		"    std::vector<(int)> Ai, std::vector<(npy_cfloat_wrapper)> Ax)\n"
+		"spdiags(int n_row, int n_col, int n_diag, int offsets, npy_cdouble_wrapper diags, \n"
+		"    std::vector<(int)> Ap, \n"
+		"    std::vector<(int)> Ai, std::vector<(npy_cdouble_wrapper)> Ax)\n"
 		""},
 	 { (char *)"csrtodense", _wrap_csrtodense, METH_VARARGS, (char *)"\n"
 		"csrtodense(int n_row, int n_col, int Ap, int Aj, int Ax, int Mx)\n"
 		"csrtodense(int n_row, int n_col, int Ap, int Aj, long Ax, long Mx)\n"
 		"csrtodense(int n_row, int n_col, int Ap, int Aj, float Ax, float Mx)\n"
 		"csrtodense(int n_row, int n_col, int Ap, int Aj, double Ax, double Mx)\n"
-		"csrtodense(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax, \n"
-		"    npy_cfloat Mx)\n"
-		"csrtodense(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax, \n"
-		"    npy_cdouble Mx)\n"
+		"csrtodense(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax, \n"
+		"    npy_cfloat_wrapper Mx)\n"
+		"csrtodense(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax, \n"
+		"    npy_cdouble_wrapper Mx)\n"
 		""},
 	 { (char *)"densetocsr", _wrap_densetocsr, METH_VARARGS, (char *)"\n"
 		"densetocsr(int n_row, int n_col, int Mx, std::vector<(int)> Ap, \n"
@@ -29199,42 +29221,42 @@
 		"    std::vector<(int)> Aj, std::vector<(float)> Ax)\n"
 		"densetocsr(int n_row, int n_col, double Mx, std::vector<(int)> Ap, \n"
 		"    std::vector<(int)> Aj, std::vector<(double)> Ax)\n"
-		"densetocsr(int n_row, int n_col, npy_cfloat Mx, std::vector<(int)> Ap, \n"
-		"    std::vector<(int)> Aj, std::vector<(npy_cfloat)> Ax)\n"
-		"densetocsr(int n_row, int n_col, npy_cdouble Mx, std::vector<(int)> Ap, \n"
-		"    std::vector<(int)> Aj, std::vector<(npy_cdouble)> Ax)\n"
+		"densetocsr(int n_row, int n_col, npy_cfloat_wrapper Mx, std::vector<(int)> Ap, \n"
+		"    std::vector<(int)> Aj, std::vector<(npy_cfloat_wrapper)> Ax)\n"
+		"densetocsr(int n_row, int n_col, npy_cdouble_wrapper Mx, std::vector<(int)> Ap, \n"
+		"    std::vector<(int)> Aj, std::vector<(npy_cdouble_wrapper)> Ax)\n"
 		""},
 	 { (char *)"sort_csr_indices", _wrap_sort_csr_indices, METH_VARARGS, (char *)"\n"
 		"sort_csr_indices(int n_row, int n_col, int Ap, int Aj, int Ax)\n"
 		"sort_csr_indices(int n_row, int n_col, int Ap, int Aj, long Ax)\n"
 		"sort_csr_indices(int n_row, int n_col, int Ap, int Aj, float Ax)\n"
 		"sort_csr_indices(int n_row, int n_col, int Ap, int Aj, double Ax)\n"
-		"sort_csr_indices(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax)\n"
-		"sort_csr_indices(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax)\n"
+		"sort_csr_indices(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax)\n"
+		"sort_csr_indices(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax)\n"
 		""},
 	 { (char *)"sort_csc_indices", _wrap_sort_csc_indices, METH_VARARGS, (char *)"\n"
 		"sort_csc_indices(int n_row, int n_col, int Ap, int Ai, int Ax)\n"
 		"sort_csc_indices(int n_row, int n_col, int Ap, int Ai, long Ax)\n"
 		"sort_csc_indices(int n_row, int n_col, int Ap, int Ai, float Ax)\n"
 		"sort_csc_indices(int n_row, int n_col, int Ap, int Ai, double Ax)\n"
-		"sort_csc_indices(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax)\n"
-		"sort_csc_indices(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax)\n"
+		"sort_csc_indices(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax)\n"
+		"sort_csc_indices(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax)\n"
 		""},
 	 { (char *)"sum_csr_duplicates", _wrap_sum_csr_duplicates, METH_VARARGS, (char *)"\n"
 		"sum_csr_duplicates(int n_row, int n_col, int Ap, int Aj, int Ax)\n"
 		"sum_csr_duplicates(int n_row, int n_col, int Ap, int Aj, long Ax)\n"
 		"sum_csr_duplicates(int n_row, int n_col, int Ap, int Aj, float Ax)\n"
 		"sum_csr_duplicates(int n_row, int n_col, int Ap, int Aj, double Ax)\n"
-		"sum_csr_duplicates(int n_row, int n_col, int Ap, int Aj, npy_cfloat Ax)\n"
-		"sum_csr_duplicates(int n_row, int n_col, int Ap, int Aj, npy_cdouble Ax)\n"
+		"sum_csr_duplicates(int n_row, int n_col, int Ap, int Aj, npy_cfloat_wrapper Ax)\n"
+		"sum_csr_duplicates(int n_row, int n_col, int Ap, int Aj, npy_cdouble_wrapper Ax)\n"
 		""},
 	 { (char *)"sum_csc_duplicates", _wrap_sum_csc_duplicates, METH_VARARGS, (char *)"\n"
 		"sum_csc_duplicates(int n_row, int n_col, int Ap, int Ai, int Ax)\n"
 		"sum_csc_duplicates(int n_row, int n_col, int Ap, int Ai, long Ax)\n"
 		"sum_csc_duplicates(int n_row, int n_col, int Ap, int Ai, float Ax)\n"
 		"sum_csc_duplicates(int n_row, int n_col, int Ap, int Ai, double Ax)\n"
-		"sum_csc_duplicates(int n_row, int n_col, int Ap, int Ai, npy_cfloat Ax)\n"
-		"sum_csc_duplicates(int n_row, int n_col, int Ap, int Ai, npy_cdouble Ax)\n"
+		"sum_csc_duplicates(int n_row, int n_col, int Ap, int Ai, npy_cfloat_wrapper Ax)\n"
+		"sum_csc_duplicates(int n_row, int n_col, int Ap, int Ai, npy_cdouble_wrapper Ax)\n"
 		""},
 	 { NULL, NULL, 0, NULL }
 };
@@ -29248,8 +29270,8 @@
 static swig_type_info _swigt__p_std__vectorTfloat_t = {"_p_std__vectorTfloat_t", "std::vector<float > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__vectorTint_t = {"_p_std__vectorTint_t", "std::vector<int > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__vectorTlong_t = {"_p_std__vectorTlong_t", "std::vector<long > *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_std__vectorTnpy_cdouble_t = {"_p_std__vectorTnpy_cdouble_t", "std::vector<npy_cdouble > *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_std__vectorTnpy_cfloat_t = {"_p_std__vectorTnpy_cfloat_t", "std::vector<npy_cfloat > *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_std__vectorTnpy_cdouble_wrapper_t = {"_p_std__vectorTnpy_cdouble_wrapper_t", "std::vector<npy_cdouble_wrapper > *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_std__vectorTnpy_cfloat_wrapper_t = {"_p_std__vectorTnpy_cfloat_wrapper_t", "std::vector<npy_cfloat_wrapper > *", 0, 0, (void*)0, 0};
 
 static swig_type_info *swig_type_initial[] = {
   &_swigt__p_char,
@@ -29258,8 +29280,8 @@
   &_swigt__p_std__vectorTfloat_t,
   &_swigt__p_std__vectorTint_t,
   &_swigt__p_std__vectorTlong_t,
-  &_swigt__p_std__vectorTnpy_cdouble_t,
-  &_swigt__p_std__vectorTnpy_cfloat_t,
+  &_swigt__p_std__vectorTnpy_cdouble_wrapper_t,
+  &_swigt__p_std__vectorTnpy_cfloat_wrapper_t,
 };
 
 static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
@@ -29268,8 +29290,8 @@
 static swig_cast_info _swigc__p_std__vectorTfloat_t[] = {  {&_swigt__p_std__vectorTfloat_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__vectorTint_t[] = {  {&_swigt__p_std__vectorTint_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__vectorTlong_t[] = {  {&_swigt__p_std__vectorTlong_t, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_std__vectorTnpy_cdouble_t[] = {  {&_swigt__p_std__vectorTnpy_cdouble_t, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_std__vectorTnpy_cfloat_t[] = {  {&_swigt__p_std__vectorTnpy_cfloat_t, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_std__vectorTnpy_cdouble_wrapper_t[] = {  {&_swigt__p_std__vectorTnpy_cdouble_wrapper_t, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_std__vectorTnpy_cfloat_wrapper_t[] = {  {&_swigt__p_std__vectorTnpy_cfloat_wrapper_t, 0, 0, 0},{0, 0, 0, 0}};
 
 static swig_cast_info *swig_cast_initial[] = {
   _swigc__p_char,
@@ -29278,8 +29300,8 @@
   _swigc__p_std__vectorTfloat_t,
   _swigc__p_std__vectorTint_t,
   _swigc__p_std__vectorTlong_t,
-  _swigc__p_std__vectorTnpy_cdouble_t,
-  _swigc__p_std__vectorTnpy_cfloat_t,
+  _swigc__p_std__vectorTnpy_cdouble_wrapper_t,
+  _swigc__p_std__vectorTnpy_cfloat_wrapper_t,
 };
 
 



More information about the Scipy-svn mailing list