[Scipy-svn] r6413 - in trunk/scipy/io/matlab: . tests

scipy-svn at scipy.org scipy-svn at scipy.org
Wed May 26 15:29:33 EDT 2010


Author: matthew.brett at gmail.com
Date: 2010-05-26 14:29:32 -0500 (Wed, 26 May 2010)
New Revision: 6413

Modified:
   trunk/scipy/io/matlab/mio4.py
   trunk/scipy/io/matlab/mio5_utils.c
   trunk/scipy/io/matlab/mio5_utils.pyx
   trunk/scipy/io/matlab/mio_utils.c
   trunk/scipy/io/matlab/mio_utils.pyx
   trunk/scipy/io/matlab/tests/test_mio_utils.py
Log:
RF - simplify post-processing code

Modified: trunk/scipy/io/matlab/mio4.py
===================================================================
--- trunk/scipy/io/matlab/mio4.py	2010-05-25 05:55:08 UTC (rev 6412)
+++ trunk/scipy/io/matlab/mio4.py	2010-05-26 19:29:32 UTC (rev 6413)
@@ -11,7 +11,7 @@
      read_dtype, convert_dtypes, arr_to_chars, arr_dtype_number, \
      MatWriteError
 
-from mio_utils import process_element
+from mio_utils import squeeze_element, chars_to_strings
 
 
 SYS_LITTLE_ENDIAN = sys.byteorder == 'little'
@@ -121,15 +121,15 @@
             arr = self.read_full_array(hdr)
         elif mclass == mxCHAR_CLASS:
             arr = self.read_char_array(hdr)
+            if process and self.chars_as_strings:
+                arr = chars_to_strings(arr)
         elif mclass == mxSPARSE_CLASS:
             # no current processing (below) makes sense for sparse
             return self.read_sparse_array(hdr)
         else:
             raise TypeError, 'No reader for class code %s' % mclass
-        if process:
-            return process_element(arr,
-                               self.chars_as_strings,
-                               self.squeeze_me)
+        if process and self.squeeze_me:
+            return squeeze_element(arr)
         return arr
     
     def read_sub_array(self, hdr, copy=True):

Modified: trunk/scipy/io/matlab/mio5_utils.c
===================================================================
--- trunk/scipy/io/matlab/mio5_utils.c	2010-05-25 05:55:08 UTC (rev 6412)
+++ trunk/scipy/io/matlab/mio5_utils.c	2010-05-26 19:29:32 UTC (rev 6413)
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.11.3 on Wed Jan  6 10:21:24 2010 */
+/* Generated by Cython 0.12.1 on Wed May 26 12:20:26 2010 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
@@ -6,6 +6,7 @@
 #ifndef Py_PYTHON_H
     #error Python headers needed to compile C extensions, please install development version of Python.
 #else
+
 #ifndef PY_LONG_LONG
   #define PY_LONG_LONG LONG_LONG
 #endif
@@ -15,7 +16,9 @@
 #if PY_VERSION_HEX < 0x02040000
   #define METH_COEXIST 0
   #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
+  #define PyDict_Contains(d,o)   PySequence_Contains(d,o)
 #endif
+
 #if PY_VERSION_HEX < 0x02050000
   typedef int Py_ssize_t;
   #define PY_SSIZE_T_MAX INT_MAX
@@ -25,7 +28,9 @@
   #define PyInt_AsSsize_t(o)   PyInt_AsLong(o)
   #define PyNumber_Index(o)    PyNumber_Int(o)
   #define PyIndex_Check(o)     PyNumber_Check(o)
+  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
 #endif
+
 #if PY_VERSION_HEX < 0x02060000
   #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
   #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
@@ -35,17 +40,17 @@
   #define PyType_Modified(t)
 
   typedef struct {
-       void *buf;
-       PyObject *obj;
-       Py_ssize_t len;
-       Py_ssize_t itemsize;
-       int readonly;
-       int ndim;
-       char *format;
-       Py_ssize_t *shape;
-       Py_ssize_t *strides;
-       Py_ssize_t *suboffsets;
-       void *internal;
+     void *buf;
+     PyObject *obj;
+     Py_ssize_t len;
+     Py_ssize_t itemsize;
+     int readonly;
+     int ndim;
+     char *format;
+     Py_ssize_t *shape;
+     Py_ssize_t *strides;
+     Py_ssize_t *suboffsets;
+     void *internal;
   } Py_buffer;
 
   #define PyBUF_SIMPLE 0
@@ -59,22 +64,32 @@
   #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
 
 #endif
+
 #if PY_MAJOR_VERSION < 3
   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
 #else
   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
 #endif
+
 #if PY_MAJOR_VERSION >= 3
   #define Py_TPFLAGS_CHECKTYPES 0
   #define Py_TPFLAGS_HAVE_INDEX 0
 #endif
+
 #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
 #endif
+
 #if PY_MAJOR_VERSION >= 3
   #define PyBaseString_Type            PyUnicode_Type
-  #define PyString_Type                PyBytes_Type
-  #define PyString_CheckExact          PyBytes_CheckExact
+  #define PyString_Type                PyUnicode_Type
+  #define PyString_CheckExact          PyUnicode_CheckExact
+#else
+  #define PyBytes_Type                 PyString_Type
+  #define PyBytes_CheckExact           PyString_CheckExact
+#endif
+
+#if PY_MAJOR_VERSION >= 3
   #define PyInt_Type                   PyLong_Type
   #define PyInt_Check(op)              PyLong_Check(op)
   #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
@@ -89,13 +104,17 @@
   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
 #else
   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
-  #define PyBytes_Type                 PyString_Type
+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
+
 #endif
+
 #if PY_MAJOR_VERSION >= 3
   #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
 #endif
+
 #if !defined(WIN32) && !defined(MS_WINDOWS)
   #ifndef __stdcall
     #define __stdcall
@@ -109,6 +128,7 @@
 #else
   #define _USE_MATH_DEFINES
 #endif
+
 #if PY_VERSION_HEX < 0x02050000
   #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
   #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
@@ -118,6 +138,7 @@
   #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
   #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
 #endif
+
 #if PY_VERSION_HEX < 0x02050000
   #define __Pyx_NAMESTR(n) ((char *)(n))
   #define __Pyx_DOCSTR(n)  ((char *)(n))
@@ -132,28 +153,25 @@
 #endif
 #include <math.h>
 #define __PYX_HAVE_API__scipy__io__matlab__mio5_utils
+#include "stdio.h"
 #include "stdlib.h"
-#include "stdio.h"
 #include "numpy/arrayobject.h"
+#include "numpy/ufuncobject.h"
 #include "numpy_rephrasing.h"
-#define __PYX_USE_C99_COMPLEX defined(_Complex_I)
 
-
-#ifdef __GNUC__
-#define INLINE __inline__
-#elif _WIN32
-#define INLINE __inline
-#else
-#define INLINE 
+#ifndef CYTHON_INLINE
+  #if defined(__GNUC__)
+    #define CYTHON_INLINE __inline__
+  #elif defined(_MSC_VER)
+    #define CYTHON_INLINE __inline
+  #else
+    #define CYTHON_INLINE 
+  #endif
 #endif
 
-typedef struct {PyObject **p; char *s; long n; char is_unicode; char intern; char is_identifier;} __Pyx_StringTabEntry; /*proto*/
+typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
 
 
-
-static int __pyx_skip_dispatch = 0;
-
-
 /* Type Conversion Predeclarations */
 
 #if PY_MAJOR_VERSION < 3
@@ -170,8 +188,8 @@
 #define __Pyx_PyBytes_AsUString(s)        ((unsigned char*) __Pyx_PyBytes_AsString(s))
 
 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
-static INLINE int __Pyx_PyObject_IsTrue(PyObject*);
-static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
 
 #if !defined(T_PYSSIZET)
 #if PY_VERSION_HEX < 0x02050000
@@ -235,9 +253,9 @@
 #endif
 #endif
 
-static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
-static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
-static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
 
 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
 
@@ -266,469 +284,30 @@
 static const char *__pyx_filename;
 static const char **__pyx_f;
 
-static char __pyx_mdoc[] = " Cython mio5 utility routines (-*- python -*- like)\n\n";
 
-
-#ifdef CYTHON_REFNANNY
-typedef struct {
-  void (*INCREF)(void*, PyObject*, int);
-  void (*DECREF)(void*, PyObject*, int);
-  void (*GOTREF)(void*, PyObject*, int);
-  void (*GIVEREF)(void*, PyObject*, int);
-  void* (*NewContext)(const char*, int, const char*);
-  void (*FinishContext)(void**);
-} __Pyx_RefnannyAPIStruct;
-static __Pyx_RefnannyAPIStruct *__Pyx_Refnanny = NULL;
-#define __Pyx_ImportRefcountAPI(name)   (__Pyx_RefnannyAPIStruct *) PyCObject_Import((char *)name, (char *)"RefnannyAPI")
-#define __Pyx_INCREF(r) __Pyx_Refnanny->INCREF(__pyx_refchk, (PyObject *)(r), __LINE__)
-#define __Pyx_DECREF(r) __Pyx_Refnanny->DECREF(__pyx_refchk, (PyObject *)(r), __LINE__)
-#define __Pyx_GOTREF(r) __Pyx_Refnanny->GOTREF(__pyx_refchk, (PyObject *)(r), __LINE__)
-#define __Pyx_GIVEREF(r) __Pyx_Refnanny->GIVEREF(__pyx_refchk, (PyObject *)(r), __LINE__)
-#define __Pyx_XDECREF(r) if((r) == NULL) ; else __Pyx_DECREF(r)
-#define __Pyx_SetupRefcountContext(name)   void* __pyx_refchk = __Pyx_Refnanny->NewContext((name), __LINE__, __FILE__)
-#define __Pyx_FinishRefcountContext()   __Pyx_Refnanny->FinishContext(&__pyx_refchk)
-#else
-#define __Pyx_INCREF(r) Py_INCREF(r)
-#define __Pyx_DECREF(r) Py_DECREF(r)
-#define __Pyx_GOTREF(r)
-#define __Pyx_GIVEREF(r)
-#define __Pyx_XDECREF(r) Py_XDECREF(r)
-#define __Pyx_SetupRefcountContext(name)
-#define __Pyx_FinishRefcountContext()
-#endif /* CYTHON_REFNANNY */
-#define __Pyx_XGIVEREF(r) if((r) == NULL) ; else __Pyx_GIVEREF(r)
-#define __Pyx_XGOTREF(r) if((r) == NULL) ; else __Pyx_GOTREF(r)
-
-static void __Pyx_RaiseDoubleKeywordsError(
-    const char* func_name, PyObject* kw_name); /*proto*/
-
-static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
-    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
-
-static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/
-
-static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
-
-
-static INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
-    PyObject *r;
-    if (!j) return NULL;
-    r = PyObject_GetItem(o, j);
-    Py_DECREF(j);
-    return r;
-}
-
-
-#define __Pyx_GetItemInt_List(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_GetItemInt_List_Fast(o, i, size <= sizeof(long)) : \
-                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
-
-static INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
-    if (likely(o != Py_None)) {
-        if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
-            PyObject *r = PyList_GET_ITEM(o, i);
-            Py_INCREF(r);
-            return r;
-        }
-        else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
-            PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
-            Py_INCREF(r);
-            return r;
-        }
-    }
-    return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
-}
-
-#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_GetItemInt_Tuple_Fast(o, i, size <= sizeof(long)) : \
-                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
-
-static INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
-    if (likely(o != Py_None)) {
-        if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
-            PyObject *r = PyTuple_GET_ITEM(o, i);
-            Py_INCREF(r);
-            return r;
-        }
-        else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
-            PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
-            Py_INCREF(r);
-            return r;
-        }
-    }
-    return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
-}
-
-
-#define __Pyx_GetItemInt(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_GetItemInt_Fast(o, i, size <= sizeof(long)) : \
-                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
-
-static INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
-    PyObject *r;
-    if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
-        r = PyList_GET_ITEM(o, i);
-        Py_INCREF(r);
-    }
-    else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
-        r = PyTuple_GET_ITEM(o, i);
-        Py_INCREF(r);
-    }
-    else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) {
-        r = PySequence_GetItem(o, i);
-    }
-    else {
-        r = __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
-    }
-    return r;
-}
-
-/* Run-time type information about structs used with buffers */
-struct __Pyx_StructField_;
-
-typedef struct {
-  const char* name; /* for error messages only */
-  struct __Pyx_StructField_* fields;
-  size_t size;     /* sizeof(type) */
-  char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject */
-} __Pyx_TypeInfo;
-
-typedef struct __Pyx_StructField_ {
-  __Pyx_TypeInfo* type;
-  const char* name;
-  size_t offset;
-} __Pyx_StructField;
-
-typedef struct {
-  __Pyx_StructField* field;
-  size_t parent_offset;
-} __Pyx_BufFmt_StackElem;
-
-
-static INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);
-static int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);
-
-static void __Pyx_RaiseBufferFallbackError(void); /*proto*/
-static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/
-#define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0)
-
-static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
-static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
-
-static INLINE void __Pyx_RaiseNoneNotIterableError(void);
-
-static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
-
-static INLINE void __Pyx_RaiseTooManyValuesError(void);
-
-static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/
-
-static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
-    const char *name, int exact); /*proto*/
-#if PY_MAJOR_VERSION < 3
-static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
-static void __Pyx_ReleaseBuffer(Py_buffer *view);
-#else
-#define __Pyx_GetBuffer PyObject_GetBuffer
-#define __Pyx_ReleaseBuffer PyBuffer_Release
+#if !defined(CYTHON_CCOMPLEX)
+  #if defined(__cplusplus)
+    #define CYTHON_CCOMPLEX 1
+  #elif defined(_Complex_I)
+    #define CYTHON_CCOMPLEX 1
+  #else
+    #define CYTHON_CCOMPLEX 0
+  #endif
 #endif
 
-Py_ssize_t __Pyx_zeros[] = {0};
-Py_ssize_t __Pyx_minusones[] = {-1};
-
-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
-
-static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
-
-static INLINE PyObject *__Pyx_PyInt_to_py_npy_uint32(npy_uint32);
-
-static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
-static int __Pyx_EndUnpack(PyObject *); /*proto*/
-
-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
-
-static INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
-    if (likely(PyList_CheckExact(L))) {
-        if (PyList_Append(L, x) < 0) return NULL;
-        Py_INCREF(Py_None);
-        return Py_None; /* this is just to have an accurate signature */
-    }
-    else {
-        PyObject *r, *m;
-        m = __Pyx_GetAttrString(L, "append");
-        if (!m) return NULL;
-        r = PyObject_CallFunctionObjArgs(m, x, NULL);
-        Py_DECREF(m);
-        return r;
-    }
-}
-
-static INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32);
-
-#if __PYX_USE_C99_COMPLEX
-    #define __Pyx_REAL_PART(z) __real__(z)
-    #define __Pyx_IMAG_PART(z) __imag__(z)
-#else
-    #define __Pyx_REAL_PART(z) ((z).real)
-    #define __Pyx_IMAG_PART(z) ((z).imag)
+#if CYTHON_CCOMPLEX
+  #ifdef __cplusplus
+    #include <complex>
+  #else
+    #include <complex.h>
+  #endif
 #endif
 
-#define __pyx_PyObject_from_complex(z) PyComplex_FromDoubles((double)__Pyx_REAL_PART(z), (double)__Pyx_IMAG_PART(z))
-
-#if __PYX_USE_C99_COMPLEX
-
-    typedef double _Complex __pyx_t_double_complex;
-    static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
-      return x + y*(__pyx_t_double_complex)_Complex_I;
-    }
-    
-    #define __pyx_t_double_complex_is_zero(a) ((a) == 0)
-    #define __pyx_t_double_complex_eq(a, b) ((a) == (b))
-    #define __pyx_t_double_complex_add(a, b) ((a)+(b))
-    #define __pyx_t_double_complex_sub(a, b) ((a)-(b))
-    #define __pyx_t_double_complex_mul(a, b) ((a)*(b))
-    #define __pyx_t_double_complex_div(a, b) ((a)/(b))
-    #define __pyx_t_double_complex_neg(a) (-(a))
-
-#else
-
-    typedef struct { double real, imag; } __pyx_t_double_complex;
-    static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
-      __pyx_t_double_complex c; c.real = x; c.imag = y; return c;
-    }
-    
-    static INLINE int __pyx_t_double_complex_is_zero(__pyx_t_double_complex a) {
-       return (a.real == 0) & (a.imag == 0);
-    }
-
-    static INLINE int __pyx_t_double_complex_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) {
-       return (a.real == b.real) & (a.imag == b.imag);
-    }
-
-    static INLINE __pyx_t_double_complex __pyx_t_double_complex_add(__pyx_t_double_complex a, __pyx_t_double_complex b) {
-        __pyx_t_double_complex z;
-        z.real = a.real + b.real;
-        z.imag = a.imag + b.imag;
-        return z;
-    }
-
-    static INLINE __pyx_t_double_complex __pyx_t_double_complex_sub(__pyx_t_double_complex a, __pyx_t_double_complex b) {
-        __pyx_t_double_complex z;
-        z.real = a.real - b.real;
-        z.imag = a.imag - b.imag;
-        return z;
-    }
-
-    static INLINE __pyx_t_double_complex __pyx_t_double_complex_mul(__pyx_t_double_complex a, __pyx_t_double_complex b) {
-        __pyx_t_double_complex z;
-        z.real = a.real * b.real - a.imag * b.imag;
-        z.imag = a.real * b.imag + a.imag * b.real;
-        return z;
-    }
-
-    static INLINE __pyx_t_double_complex __pyx_t_double_complex_div(__pyx_t_double_complex a, __pyx_t_double_complex b) {
-        __pyx_t_double_complex z;
-        double denom = b.real*b.real + b.imag*b.imag;
-        z.real = (a.real * b.real + a.imag * b.imag) / denom;
-        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
-        return z;
-    }
-
-    static INLINE __pyx_t_double_complex __pyx_t_double_complex_neg(__pyx_t_double_complex a) {
-        __pyx_t_double_complex z;
-        z.real = -a.real;
-        z.imag = -a.imag;
-        return z;
-    }
-
+#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
+  #undef _Complex_I
+  #define _Complex_I 1.0fj
 #endif
 
-#if __PYX_USE_C99_COMPLEX
-
-    typedef float _Complex __pyx_t_float_complex;
-    static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
-      return x + y*(__pyx_t_float_complex)_Complex_I;
-    }
-    
-    #define __pyx_t_float_complex_is_zero(a) ((a) == 0)
-    #define __pyx_t_float_complex_eq(a, b) ((a) == (b))
-    #define __pyx_t_float_complex_add(a, b) ((a)+(b))
-    #define __pyx_t_float_complex_sub(a, b) ((a)-(b))
-    #define __pyx_t_float_complex_mul(a, b) ((a)*(b))
-    #define __pyx_t_float_complex_div(a, b) ((a)/(b))
-    #define __pyx_t_float_complex_neg(a) (-(a))
-
-#else
-
-    typedef struct { float real, imag; } __pyx_t_float_complex;
-    static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
-      __pyx_t_float_complex c; c.real = x; c.imag = y; return c;
-    }
-    
-    static INLINE int __pyx_t_float_complex_is_zero(__pyx_t_float_complex a) {
-       return (a.real == 0) & (a.imag == 0);
-    }
-
-    static INLINE int __pyx_t_float_complex_eq(__pyx_t_float_complex a, __pyx_t_float_complex b) {
-       return (a.real == b.real) & (a.imag == b.imag);
-    }
-
-    static INLINE __pyx_t_float_complex __pyx_t_float_complex_add(__pyx_t_float_complex a, __pyx_t_float_complex b) {
-        __pyx_t_float_complex z;
-        z.real = a.real + b.real;
-        z.imag = a.imag + b.imag;
-        return z;
-    }
-
-    static INLINE __pyx_t_float_complex __pyx_t_float_complex_sub(__pyx_t_float_complex a, __pyx_t_float_complex b) {
-        __pyx_t_float_complex z;
-        z.real = a.real - b.real;
-        z.imag = a.imag - b.imag;
-        return z;
-    }
-
-    static INLINE __pyx_t_float_complex __pyx_t_float_complex_mul(__pyx_t_float_complex a, __pyx_t_float_complex b) {
-        __pyx_t_float_complex z;
-        z.real = a.real * b.real - a.imag * b.imag;
-        z.imag = a.real * b.imag + a.imag * b.real;
-        return z;
-    }
-
-    static INLINE __pyx_t_float_complex __pyx_t_float_complex_div(__pyx_t_float_complex a, __pyx_t_float_complex b) {
-        __pyx_t_float_complex z;
-        float denom = b.real*b.real + b.imag*b.imag;
-        z.real = (a.real * b.real + a.imag * b.imag) / denom;
-        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
-        return z;
-    }
-
-    static INLINE __pyx_t_float_complex __pyx_t_float_complex_neg(__pyx_t_float_complex a) {
-        __pyx_t_float_complex z;
-        z.real = -a.real;
-        z.imag = -a.imag;
-        return z;
-    }
-
-#endif
-
-#if __PYX_USE_C99_COMPLEX
-
-    typedef long double _Complex __pyx_t_long__double_complex;
-    static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_from_parts(long double x, long double y) {
-      return x + y*(__pyx_t_long__double_complex)_Complex_I;
-    }
-    
-    #define __pyx_t_long__double_complex_is_zero(a) ((a) == 0)
-    #define __pyx_t_long__double_complex_eq(a, b) ((a) == (b))
-    #define __pyx_t_long__double_complex_add(a, b) ((a)+(b))
-    #define __pyx_t_long__double_complex_sub(a, b) ((a)-(b))
-    #define __pyx_t_long__double_complex_mul(a, b) ((a)*(b))
-    #define __pyx_t_long__double_complex_div(a, b) ((a)/(b))
-    #define __pyx_t_long__double_complex_neg(a) (-(a))
-
-#else
-
-    typedef struct { long double real, imag; } __pyx_t_long__double_complex;
-    static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_from_parts(long double x, long double y) {
-      __pyx_t_long__double_complex c; c.real = x; c.imag = y; return c;
-    }
-    
-    static INLINE int __pyx_t_long__double_complex_is_zero(__pyx_t_long__double_complex a) {
-       return (a.real == 0) & (a.imag == 0);
-    }
-
-    static INLINE int __pyx_t_long__double_complex_eq(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) {
-       return (a.real == b.real) & (a.imag == b.imag);
-    }
-
-    static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_add(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) {
-        __pyx_t_long__double_complex z;
-        z.real = a.real + b.real;
-        z.imag = a.imag + b.imag;
-        return z;
-    }
-
-    static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_sub(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) {
-        __pyx_t_long__double_complex z;
-        z.real = a.real - b.real;
-        z.imag = a.imag - b.imag;
-        return z;
-    }
-
-    static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_mul(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) {
-        __pyx_t_long__double_complex z;
-        z.real = a.real * b.real - a.imag * b.imag;
-        z.imag = a.real * b.imag + a.imag * b.real;
-        return z;
-    }
-
-    static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_div(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) {
-        __pyx_t_long__double_complex z;
-        long double denom = b.real*b.real + b.imag*b.imag;
-        z.real = (a.real * b.real + a.imag * b.imag) / denom;
-        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
-        return z;
-    }
-
-    static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_neg(__pyx_t_long__double_complex a) {
-        __pyx_t_long__double_complex z;
-        z.real = -a.real;
-        z.imag = -a.imag;
-        return z;
-    }
-
-#endif
-
-static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
-
-static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
-
-static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
-
-static INLINE char __Pyx_PyInt_AsChar(PyObject *);
-
-static INLINE short __Pyx_PyInt_AsShort(PyObject *);
-
-static INLINE int __Pyx_PyInt_AsInt(PyObject *);
-
-static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
-
-static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
-
-static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
-
-static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
-
-static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
-
-static INLINE long __Pyx_PyInt_AsLong(PyObject *);
-
-static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
-
-static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
-
-static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
-
-static INLINE npy_uint32 __Pyx_PyInt_from_py_npy_uint32(PyObject *);
-
-static void __Pyx_WriteUnraisable(const char *name); /*proto*/
-
-static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
-
-static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size);  /*proto*/
-
-static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
-
-static int __Pyx_GetVtable(PyObject *dict, void *vtabptr); /*proto*/
-
-static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/
-
-static void __Pyx_AddTraceback(const char *funcname); /*proto*/
-
-static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
-
-/* Type declarations */
-
 typedef npy_int8 __pyx_t_5numpy_int8_t;
 
 typedef npy_int16 __pyx_t_5numpy_int16_t;
@@ -749,14 +328,14 @@
 
 typedef npy_float64 __pyx_t_5numpy_float64_t;
 
-typedef __pyx_t_float_complex __pyx_t_5numpy_complex64_t;
-
-typedef __pyx_t_double_complex __pyx_t_5numpy_complex128_t;
-
 typedef npy_long __pyx_t_5numpy_int_t;
 
 typedef npy_longlong __pyx_t_5numpy_long_t;
 
+typedef npy_intp __pyx_t_5numpy_intp_t;
+
+typedef npy_uintp __pyx_t_5numpy_uintp_t;
+
 typedef npy_ulong __pyx_t_5numpy_uint_t;
 
 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
@@ -767,6 +346,28 @@
 
 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
 
+#if CYTHON_CCOMPLEX
+  #ifdef __cplusplus
+    typedef ::std::complex< double > __pyx_t_double_complex;
+  #else
+    typedef double _Complex __pyx_t_double_complex;
+  #endif
+#else
+    typedef struct { double real, imag; } __pyx_t_double_complex;
+#endif
+
+#if CYTHON_CCOMPLEX
+  #ifdef __cplusplus
+    typedef ::std::complex< float > __pyx_t_float_complex;
+  #else
+    typedef float _Complex __pyx_t_float_complex;
+  #endif
+#else
+    typedef struct { float real, imag; } __pyx_t_float_complex;
+#endif
+
+/* Type declarations */
+
 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
 
 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
@@ -775,7 +376,7 @@
 
 typedef npy_cdouble __pyx_t_5numpy_complex_t;
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/streams.pxd":6
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/streams.pxd":6
  *     cdef object fobj
  * 
  *     cpdef int seek(self, long int offset, int whence=*) except -1             # <<<<<<<<<<<<<<
@@ -788,7 +389,7 @@
   int whence;
 };
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/streams.pxd":9
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/streams.pxd":9
  *     cpdef long int tell(self) except -1
  *     cdef int read_into(self, void *buf, size_t n) except -1
  *     cdef object read_string(self, size_t n, void **pp, int copy=*)             # <<<<<<<<<<<<<<
@@ -801,7 +402,7 @@
   int copy;
 };
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":64
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":64
  * 
  * 
  * cdef enum:             # <<<<<<<<<<<<<<
@@ -827,7 +428,7 @@
   __pyx_e_5scipy_2io_6matlab_10mio5_utils_miUTF32 = 18
 };
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":81
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":81
  *     miUTF32 = 18
  * 
  * cdef enum: # see comments in mio5_params             # <<<<<<<<<<<<<<
@@ -856,7 +457,7 @@
   __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxOBJECT_CLASS_FROM_MATRIX_H = 18
 };
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":288
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":288
  *         return 1
  * 
  *     cdef object read_element(self,             # <<<<<<<<<<<<<<
@@ -869,7 +470,7 @@
   int copy;
 };
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":383
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":383
  *                 self.cstream.seek(8 - mod8, 1)
  * 
  *     cpdef inline cnp.ndarray read_numeric(self, int copy=True):             # <<<<<<<<<<<<<<
@@ -882,7 +483,7 @@
   int copy;
 };
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":561
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":561
  *         return size
  * 
  *     cdef read_mi_matrix(self, int process=1):             # <<<<<<<<<<<<<<
@@ -895,7 +496,7 @@
   int process;
 };
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":593
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":593
  *         return self.array_from_header(header, process)
  * 
  *     cpdef array_from_header(self, VarHeader5 header, int process=1):             # <<<<<<<<<<<<<<
@@ -908,7 +509,7 @@
   int process;
 };
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/streams.pxd":3
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/streams.pxd":3
  * # -*- python -*- or rather like
  * 
  * cdef class GenericStream:             # <<<<<<<<<<<<<<
@@ -922,7 +523,7 @@
   PyObject *fobj;
 };
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":115
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":115
  * 
  * 
  * cdef class VarHeader5:             # <<<<<<<<<<<<<<
@@ -943,7 +544,7 @@
   size_t nzmax;
 };
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":127
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":127
  * 
  * 
  * cdef class VarReader5:             # <<<<<<<<<<<<<<
@@ -971,7 +572,7 @@
 };
 
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/streams.pxd":3
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/streams.pxd":3
  * # -*- python -*- or rather like
  * 
  * cdef class GenericStream:             # <<<<<<<<<<<<<<
@@ -988,7 +589,7 @@
 static struct __pyx_vtabstruct_5scipy_2io_6matlab_7streams_GenericStream *__pyx_vtabptr_5scipy_2io_6matlab_7streams_GenericStream;
 
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":127
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":127
  * 
  * 
  * cdef class VarReader5:             # <<<<<<<<<<<<<<
@@ -1017,6 +618,356 @@
   PyArrayObject *(*read_opaque)(struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *, struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *, int __pyx_skip_dispatch);
 };
 static struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *__pyx_vtabptr_5scipy_2io_6matlab_10mio5_utils_VarReader5;
+
+#ifndef CYTHON_REFNANNY
+  #define CYTHON_REFNANNY 0
+#endif
+
+#if CYTHON_REFNANNY
+  typedef struct {
+    void (*INCREF)(void*, PyObject*, int);
+    void (*DECREF)(void*, PyObject*, int);
+    void (*GOTREF)(void*, PyObject*, int);
+    void (*GIVEREF)(void*, PyObject*, int);
+    void* (*SetupContext)(const char*, int, const char*);
+    void (*FinishContext)(void**);
+  } __Pyx_RefNannyAPIStruct;
+  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
+  static __Pyx_RefNannyAPIStruct * __Pyx_RefNannyImportAPI(const char *modname) {
+    PyObject *m = NULL, *p = NULL;
+    void *r = NULL;
+    m = PyImport_ImportModule((char *)modname);
+    if (!m) goto end;
+    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
+    if (!p) goto end;
+    r = PyLong_AsVoidPtr(p);
+  end:
+    Py_XDECREF(p);
+    Py_XDECREF(m);
+    return (__Pyx_RefNannyAPIStruct *)r;
+  }
+  #define __Pyx_RefNannySetupContext(name)           void *__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+  #define __Pyx_RefNannyFinishContext()           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
+  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0)
+#else
+  #define __Pyx_RefNannySetupContext(name)
+  #define __Pyx_RefNannyFinishContext()
+  #define __Pyx_INCREF(r) Py_INCREF(r)
+  #define __Pyx_DECREF(r) Py_DECREF(r)
+  #define __Pyx_GOTREF(r)
+  #define __Pyx_GIVEREF(r)
+  #define __Pyx_XDECREF(r) Py_XDECREF(r)
+#endif /* CYTHON_REFNANNY */
+#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
+#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)
+
+static void __Pyx_RaiseDoubleKeywordsError(
+    const char* func_name, PyObject* kw_name); /*proto*/
+
+static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
+    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
+
+static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/
+
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
+
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void);
+
+static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
+static int __Pyx_EndUnpack(PyObject *); /*proto*/
+
+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
+
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
+    if (likely(PyList_CheckExact(L))) {
+        if (PyList_Append(L, x) < 0) return NULL;
+        Py_INCREF(Py_None);
+        return Py_None; /* this is just to have an accurate signature */
+    }
+    else {
+        PyObject *r, *m;
+        m = __Pyx_GetAttrString(L, "append");
+        if (!m) return NULL;
+        r = PyObject_CallFunctionObjArgs(m, x, NULL);
+        Py_DECREF(m);
+        return r;
+    }
+}
+
+
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+    PyObject *r;
+    if (!j) return NULL;
+    r = PyObject_GetItem(o, j);
+    Py_DECREF(j);
+    return r;
+}
+
+
+#define __Pyx_GetItemInt_List(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
+                                                    __Pyx_GetItemInt_List_Fast(o, i, size <= sizeof(long)) : \
+                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
+
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
+    if (likely(o != Py_None)) {
+        if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
+            PyObject *r = PyList_GET_ITEM(o, i);
+            Py_INCREF(r);
+            return r;
+        }
+        else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
+            PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
+            Py_INCREF(r);
+            return r;
+        }
+    }
+    return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
+}
+
+#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
+                                                    __Pyx_GetItemInt_Tuple_Fast(o, i, size <= sizeof(long)) : \
+                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
+
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
+    if (likely(o != Py_None)) {
+        if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
+            PyObject *r = PyTuple_GET_ITEM(o, i);
+            Py_INCREF(r);
+            return r;
+        }
+        else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
+            PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
+            Py_INCREF(r);
+            return r;
+        }
+    }
+    return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
+}
+
+
+#define __Pyx_GetItemInt(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
+                                                    __Pyx_GetItemInt_Fast(o, i, size <= sizeof(long)) : \
+                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
+
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
+    PyObject *r;
+    if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
+        r = PyList_GET_ITEM(o, i);
+        Py_INCREF(r);
+    }
+    else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
+        r = PyTuple_GET_ITEM(o, i);
+        Py_INCREF(r);
+    }
+    else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) {
+        r = PySequence_GetItem(o, i);
+    }
+    else {
+        r = __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
+    }
+    return r;
+}
+
+static CYTHON_INLINE long __Pyx_NegateNonNeg(long b) { return unlikely(b < 0) ? b : !b; }
+static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) {
+    return unlikely(b < 0) ? NULL : __Pyx_PyBool_FromLong(b);
+}
+
+/* Run-time type information about structs used with buffers */
+struct __Pyx_StructField_;
+
+typedef struct {
+  const char* name; /* for error messages only */
+  struct __Pyx_StructField_* fields;
+  size_t size;     /* sizeof(type) */
+  char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject */
+} __Pyx_TypeInfo;
+
+typedef struct __Pyx_StructField_ {
+  __Pyx_TypeInfo* type;
+  const char* name;
+  size_t offset;
+} __Pyx_StructField;
+
+typedef struct {
+  __Pyx_StructField* field;
+  size_t parent_offset;
+} __Pyx_BufFmt_StackElem;
+
+
+static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);
+static int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);
+
+static void __Pyx_RaiseBufferFallbackError(void); /*proto*/
+static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/
+#define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0)
+
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+
+static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* proto */
+
+#define UNARY_NEG_WOULD_OVERFLOW(x)		(((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
+
+static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
+
+static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/
+
+static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
+    const char *name, int exact); /*proto*/
+#if PY_MAJOR_VERSION < 3
+static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
+static void __Pyx_ReleaseBuffer(Py_buffer *view);
+#else
+#define __Pyx_GetBuffer PyObject_GetBuffer
+#define __Pyx_ReleaseBuffer PyBuffer_Release
+#endif
+
+Py_ssize_t __Pyx_zeros[] = {0};
+Py_ssize_t __Pyx_minusones[] = {-1};
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
+
+static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
+
+static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_uint32(npy_uint32);
+
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+
+static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32);
+
+#if CYTHON_CCOMPLEX
+  #ifdef __cplusplus
+    #define __Pyx_CREAL(z) ((z).real())
+    #define __Pyx_CIMAG(z) ((z).imag())
+  #else
+    #define __Pyx_CREAL(z) (__real__(z))
+    #define __Pyx_CIMAG(z) (__imag__(z))
+  #endif
+#else
+    #define __Pyx_CREAL(z) ((z).real)
+    #define __Pyx_CIMAG(z) ((z).imag)
+#endif
+
+#if defined(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX
+    #define __Pyx_SET_CREAL(z,x) ((z).real(x))
+    #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
+#else
+    #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
+    #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
+#endif
+
+static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
+
+#if CYTHON_CCOMPLEX
+    #define __Pyx_c_eq(a, b)   ((a)==(b))
+    #define __Pyx_c_sum(a, b)  ((a)+(b))
+    #define __Pyx_c_diff(a, b) ((a)-(b))
+    #define __Pyx_c_prod(a, b) ((a)*(b))
+    #define __Pyx_c_quot(a, b) ((a)/(b))
+    #define __Pyx_c_neg(a)     (-(a))
+  #ifdef __cplusplus
+    #define __Pyx_c_is_zero(z) ((z)==(double)0)
+    #define __Pyx_c_conj(z)    (::std::conj(z))
+    /*#define __Pyx_c_abs(z)     (::std::abs(z))*/
+  #else
+    #define __Pyx_c_is_zero(z) ((z)==0)
+    #define __Pyx_c_conj(z)    (conj(z))
+    /*#define __Pyx_c_abs(z)     (cabs(z))*/
+ #endif
+#else
+    static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex);
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex);
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex);
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex);
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex);
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex);
+    static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex);
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex);
+    /*static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex);*/
+#endif
+
+static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
+
+#if CYTHON_CCOMPLEX
+    #define __Pyx_c_eqf(a, b)   ((a)==(b))
+    #define __Pyx_c_sumf(a, b)  ((a)+(b))
+    #define __Pyx_c_difff(a, b) ((a)-(b))
+    #define __Pyx_c_prodf(a, b) ((a)*(b))
+    #define __Pyx_c_quotf(a, b) ((a)/(b))
+    #define __Pyx_c_negf(a)     (-(a))
+  #ifdef __cplusplus
+    #define __Pyx_c_is_zerof(z) ((z)==(float)0)
+    #define __Pyx_c_conjf(z)    (::std::conj(z))
+    /*#define __Pyx_c_absf(z)     (::std::abs(z))*/
+  #else
+    #define __Pyx_c_is_zerof(z) ((z)==0)
+    #define __Pyx_c_conjf(z)    (conjf(z))
+    /*#define __Pyx_c_absf(z)     (cabsf(z))*/
+ #endif
+#else
+    static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex);
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex);
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex);
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex);
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex);
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex);
+    static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex);
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex);
+    /*static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex);*/
+#endif
+
+static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
+
+static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
+
+static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
+
+static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
+
+static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
+
+static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
+
+static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
+
+static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
+
+static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
+
+static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
+
+static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
+
+static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
+
+static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
+
+static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
+
+static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
+
+static CYTHON_INLINE npy_uint32 __Pyx_PyInt_from_py_npy_uint32(PyObject *);
+
+static void __Pyx_WriteUnraisable(const char *name); /*proto*/
+
+static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
+
+static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size, int strict);  /*proto*/
+
+static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
+
+static int __Pyx_GetVtable(PyObject *dict, void *vtabptr); /*proto*/
+
+static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/
+
+static void __Pyx_AddTraceback(const char *funcname); /*proto*/
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
 /* Module declarations from python_version */
 
 /* Module declarations from python_ref */
@@ -1031,6 +982,8 @@
 
 /* Module declarations from python_list */
 
+/* Module declarations from stdio */
+
 /* Module declarations from python_object */
 
 /* Module declarations from python_sequence */
@@ -1047,6 +1000,8 @@
 
 /* Module declarations from python_bool */
 
+/* Module declarations from python_unicode */
+
 /* Module declarations from python_long */
 
 /* Module declarations from python_float */
@@ -1055,8 +1010,6 @@
 
 /* Module declarations from python_string */
 
-/* Module declarations from python_unicode */
-
 /* Module declarations from python_dict */
 
 /* Module declarations from python_instance */
@@ -1065,16 +1018,26 @@
 
 /* Module declarations from python_method */
 
+/* Module declarations from python_weakref */
+
+/* Module declarations from python_getargs */
+
+/* Module declarations from python_cobject */
+
+/* Module declarations from python_oldbuffer */
+
 /* Module declarations from python_set */
 
+/* Module declarations from python_buffer */
+
+/* Module declarations from python_bytes */
+
+/* Module declarations from python_pycapsule */
+
 /* Module declarations from python */
 
-/* Module declarations from python_buffer */
-
 /* Module declarations from stdlib */
 
-/* Module declarations from stdio */
-
 /* Module declarations from numpy */
 
 /* Module declarations from numpy */
@@ -1083,7 +1046,15 @@
 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
-static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
+static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *, PyObject *); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *, PyObject *, PyObject *); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
+static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
+static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *, PyObject *); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *); /*proto*/
 /* Module declarations from scipy.io.matlab.streams */
 
 static PyTypeObject *__pyx_ptype_5scipy_2io_6matlab_7streams_GenericStream = 0;
@@ -1099,267 +1070,345 @@
 int __pyx_module_is_main_scipy__io__matlab__mio5_utils = 0;
 
 /* Implementation of scipy.io.matlab.mio5_utils */
-static char __pyx_k_40[] = "<";
-static char __pyx_k_41[] = ">";
-static char __pyx_k_42[] = ">";
-static char __pyx_k_43[] = "<";
-static PyObject *__pyx_int_neg_1;
-static PyObject *__pyx_int_1;
-static char __pyx_k___main__[] = "__main__";
-static PyObject *__pyx_kp___main__;
-static char __pyx_k_31[] = "byteswap_u4";
-static PyObject *__pyx_kp_31;
-static char __pyx_k___cinit__[] = "__cinit__";
-static PyObject *__pyx_kp___cinit__;
-static char __pyx_k_set_stream[] = "set_stream";
-static PyObject *__pyx_kp_set_stream;
-static char __pyx_k_read_tag[] = "read_tag";
-static PyObject *__pyx_kp_read_tag;
-static char __pyx_k_read_numeric[] = "read_numeric";
-static PyObject *__pyx_kp_read_numeric;
-static char __pyx_k_read_full_tag[] = "read_full_tag";
-static PyObject *__pyx_kp_read_full_tag;
-static char __pyx_k_read_header[] = "read_header";
-static PyObject *__pyx_kp_read_header;
-static char __pyx_k_array_from_header[] = "array_from_header";
-static PyObject *__pyx_kp_array_from_header;
-static char __pyx_k_read_real_complex[] = "read_real_complex";
-static PyObject *__pyx_kp_read_real_complex;
-static char __pyx_k_read_char[] = "read_char";
-static PyObject *__pyx_kp_read_char;
-static char __pyx_k_read_cells[] = "read_cells";
-static PyObject *__pyx_kp_read_cells;
-static char __pyx_k_read_fieldnames[] = "read_fieldnames";
-static PyObject *__pyx_kp_read_fieldnames;
-static char __pyx_k_read_struct[] = "read_struct";
-static PyObject *__pyx_kp_read_struct;
-static char __pyx_k_read_opaque[] = "read_opaque";
-static PyObject *__pyx_kp_read_opaque;
-static char __pyx_k_32[] = "u4";
-static PyObject *__pyx_kp_32;
-static char __pyx_k_preader[] = "preader";
-static PyObject *__pyx_kp_preader;
-static char __pyx_k_fobj[] = "fobj";
-static PyObject *__pyx_kp_fobj;
-static char __pyx_k_copy[] = "copy";
-static PyObject *__pyx_kp_copy;
-static char __pyx_k_header[] = "header";
-static PyObject *__pyx_kp_header;
-static char __pyx_k_process[] = "process";
-static PyObject *__pyx_kp_process;
-static char __pyx_k_hdr[] = "hdr";
-static PyObject *__pyx_kp_hdr;
-static char __pyx_k_sys[] = "sys";
-static PyObject *__pyx_kp_sys;
-static char __pyx_k_pycopy[] = "pycopy";
-static PyObject *__pyx_kp_pycopy;
-static char __pyx_k_numpy[] = "numpy";
-static PyObject *__pyx_kp_numpy;
-static char __pyx_k_np[] = "np";
-static PyObject *__pyx_kp_np;
-static char __pyx_k_33[] = "scipy.io.matlab.miobase";
-static PyObject *__pyx_kp_33;
-static char __pyx_k_34[] = "*";
-static PyObject *__pyx_kp_34;
-static char __pyx_k_miob[] = "miob";
-static PyObject *__pyx_kp_miob;
-static char __pyx_k_35[] = "scipy.io.matlab.mio_utils";
-static PyObject *__pyx_kp_35;
-static char __pyx_k_process_element[] = "process_element";
-static PyObject *__pyx_kp_process_element;
-static char __pyx_k_36[] = "scipy.io.matlab.mio5_params";
-static PyObject *__pyx_kp_36;
-static char __pyx_k_37[] = "mio5p";
-static PyObject *__pyx_kp_37;
-static char __pyx_k_38[] = "scipy.sparse";
-static PyObject *__pyx_kp_38;
-static char __pyx_k_scipy[] = "scipy";
-static PyObject *__pyx_kp_scipy;
-static char __pyx_k_byteorder[] = "byteorder";
-static PyObject *__pyx_kp_byteorder;
-static char __pyx_k_39[] = "little";
-static PyObject *__pyx_kp_39;
-static char __pyx_k_sys_is_le[] = "sys_is_le";
-static PyObject *__pyx_kp_sys_is_le;
-static char __pyx_k_native_code[] = "native_code";
-static PyObject *__pyx_kp_native_code;
-static char __pyx_k_swapped_code[] = "swapped_code";
-static PyObject *__pyx_kp_swapped_code;
-static char __pyx_k_OPAQUE_DTYPE[] = "OPAQUE_DTYPE";
-static PyObject *__pyx_kp_OPAQUE_DTYPE;
-static char __pyx_k_byte_order[] = "byte_order";
-static PyObject *__pyx_kp_byte_order;
-static char __pyx_k_struct_as_record[] = "struct_as_record";
-static PyObject *__pyx_kp_struct_as_record;
-static char __pyx_k_codecs[] = "codecs";
-static PyObject *__pyx_kp_codecs;
-static char __pyx_k_44[] = "uint16_codec";
-static PyObject *__pyx_kp_44;
-static char __pyx_k_mat_stream[] = "mat_stream";
-static PyObject *__pyx_kp_mat_stream;
-static char __pyx_k_mat_dtype[] = "mat_dtype";
-static PyObject *__pyx_kp_mat_dtype;
-static char __pyx_k_chars_as_strings[] = "chars_as_strings";
-static PyObject *__pyx_kp_chars_as_strings;
-static char __pyx_k_squeeze_me[] = "squeeze_me";
-static PyObject *__pyx_kp_squeeze_me;
-static char __pyx_k_dtypes[] = "dtypes";
-static PyObject *__pyx_kp_dtypes;
-static char __pyx_k_items[] = "items";
-static PyObject *__pyx_kp_items;
-static char __pyx_k_basestring[] = "basestring";
-static PyObject *__pyx_kp_basestring;
-static char __pyx_k_class_dtypes[] = "class_dtypes";
-static PyObject *__pyx_kp_class_dtypes;
-static char __pyx_k_dtype[] = "dtype";
-static PyObject *__pyx_kp_dtype;
-static char __pyx_k_47[] = "bool";
-static PyObject *__pyx_kp_47;
-static char __pyx_k_ValueError[] = "ValueError";
-static PyObject *__pyx_kp_ValueError;
-static char __pyx_k_TypeError[] = "TypeError";
-static PyObject *__pyx_kp_TypeError;
-static char __pyx_k_range[] = "range";
-static PyObject *__pyx_kp_range;
-static char __pyx_k_append[] = "append";
-static PyObject *__pyx_kp_append;
-static char __pyx_k_array[] = "array";
-static PyObject *__pyx_kp_array;
-static char __pyx_k_astype[] = "astype";
-static PyObject *__pyx_kp_astype;
-static char __pyx_k_MatlabObject[] = "MatlabObject";
-static PyObject *__pyx_kp_MatlabObject;
-static char __pyx_k_MatlabFunction[] = "MatlabFunction";
-static PyObject *__pyx_kp_MatlabFunction;
-static char __pyx_k_MatlabOpaque[] = "MatlabOpaque";
-static PyObject *__pyx_kp_MatlabOpaque;
-static char __pyx_k_reshape[] = "reshape";
-static PyObject *__pyx_kp_reshape;
-static char __pyx_k_T[] = "T";
-static PyObject *__pyx_kp_T;
-static char __pyx_k_sparse[] = "sparse";
-static PyObject *__pyx_kp_sparse;
-static char __pyx_k_csc_matrix[] = "csc_matrix";
-static PyObject *__pyx_kp_csc_matrix;
-static char __pyx_k_shape[] = "shape";
-static PyObject *__pyx_kp_shape;
-static char __pyx_k_53[] = "uint16_len";
-static PyObject *__pyx_kp_53;
-static char __pyx_k_ndarray[] = "ndarray";
-static PyObject *__pyx_kp_ndarray;
-static char __pyx_k_buffer[] = "buffer";
-static PyObject *__pyx_kp_buffer;
-static char __pyx_k_54[] = "uint8";
-static PyObject *__pyx_kp_54;
-static char __pyx_k_tostring[] = "tostring";
-static PyObject *__pyx_kp_tostring;
-static char __pyx_k_55[] = "ascii";
-static PyObject *__pyx_kp_55;
-static char __pyx_k_decode[] = "decode";
-static PyObject *__pyx_kp_decode;
-static char __pyx_k_order[] = "order";
-static PyObject *__pyx_kp_order;
-static char __pyx_k_58[] = "F";
-static PyObject *__pyx_kp_58;
-static char __pyx_k_empty[] = "empty";
-static PyObject *__pyx_kp_empty;
-static char __pyx_k_object[] = "object";
-static PyObject *__pyx_kp_object;
-static char __pyx_k_mat_struct[] = "mat_struct";
-static PyObject *__pyx_kp_mat_struct;
-static char __pyx_k__fieldnames[] = "_fieldnames";
-static PyObject *__pyx_kp__fieldnames;
-static char __pyx_k___dict__[] = "__dict__";
-static PyObject *__pyx_kp___dict__;
-static char __pyx_k_60[] = "s0";
-static PyObject *__pyx_kp_60;
-static char __pyx_k_61[] = "s1";
-static PyObject *__pyx_kp_61;
-static char __pyx_k_62[] = "s2";
-static PyObject *__pyx_kp_62;
-static char __pyx_k_63[] = "arr";
-static PyObject *__pyx_kp_63;
-static PyObject *__pyx_kp_40;
-static PyObject *__pyx_kp_41;
-static PyObject *__pyx_kp_42;
-static PyObject *__pyx_kp_43;
 static PyObject *__pyx_builtin_basestring;
 static PyObject *__pyx_builtin_ValueError;
 static PyObject *__pyx_builtin_TypeError;
 static PyObject *__pyx_builtin_range;
 static PyObject *__pyx_builtin_object;
-static PyObject *__pyx_kp_45;
-static PyObject *__pyx_kp_46;
-static char __pyx_k_45[] = "<U1";
-static char __pyx_k_46[] = ">U1";
-static PyObject *__pyx_kp_48;
-static char __pyx_k_48[] = "Error in SDE format data";
-static PyObject *__pyx_kp_49;
-static char __pyx_k_49[] = "Expecting miINT8 as data type";
-static PyObject *__pyx_kp_50;
-static char __pyx_k_50[] = "Expecting miINT32 as data type";
-static PyObject *__pyx_kp_51;
-static char __pyx_k_51[] = "Too many dimensions (%d) for numpy arrays";
-static PyObject *__pyx_kp_52;
-static char __pyx_k_52[] = "Expecting matrix here";
-static PyObject *__pyx_kp_56;
-static PyObject *__pyx_kp_57;
-static char __pyx_k_56[] = "Do not support encoding %d";
-static char __pyx_k_57[] = "Type %d does not appear to be char type";
-static PyObject *__pyx_kp_59;
-static char __pyx_k_59[] = "Only one value for namelength";
+static PyObject *__pyx_builtin_RuntimeError;
+static char __pyx_k_1[] = "<U1";
+static char __pyx_k_2[] = ">U1";
+static char __pyx_k_3[] = "Error in SDE format data";
+static char __pyx_k_4[] = "Expecting miINT8 as data type";
+static char __pyx_k_5[] = "Expecting miINT32 as data type";
+static char __pyx_k_6[] = "Too many dimensions (%d) for numpy arrays";
+static char __pyx_k_7[] = "Expecting matrix here";
+static char __pyx_k_8[] = "Do not support encoding %d";
+static char __pyx_k_9[] = "Type %d does not appear to be char type";
+static char __pyx_k_10[] = "Only one value for namelength";
+static char __pyx_k_11[] = "ndarray is not C contiguous";
+static char __pyx_k_12[] = "ndarray is not Fortran contiguous";
+static char __pyx_k_13[] = "Non-native byte order not supported";
+static char __pyx_k_14[] = "unknown dtype code in numpy.pxd (%d)";
+static char __pyx_k_15[] = "Format string allocated too short, see comment in numpy.pxd";
+static char __pyx_k_16[] = "Format string allocated too short.";
+static char __pyx_k_17[] = " Cython mio5 utility routines (-*- python -*- like)\n\n";
+static char __pyx_k_18[] = "scipy.io.matlab.miobase";
+static char __pyx_k_19[] = "*";
+static char __pyx_k_20[] = "scipy.io.matlab.mio_utils";
+static char __pyx_k_21[] = "scipy.io.matlab.mio5_params";
+static char __pyx_k_22[] = "scipy.sparse";
+static char __pyx_k_23[] = "<";
+static char __pyx_k_24[] = ">";
+static char __pyx_k_25[] = "VarReader5.set_stream (line 185)";
+static char __pyx_k_26[] = "VarReader5.read_tag (line 192)";
+static char __pyx_k_27[] = "VarReader5.read_numeric (line 383)";
+static char __pyx_k_28[] = "VarReader5.read_full_tag (line 459)";
+static char __pyx_k_29[] = "VarReader5.read_header (line 492)";
+static char __pyx_k_30[] = "VarReader5.array_from_header (line 593)";
+static char __pyx_k_31[] = "VarReader5.read_real_complex (line 659)";
+static char __pyx_k_32[] = "VarReader5.read_char (line 706)";
+static char __pyx_k_33[] = "VarReader5.read_cells (line 767)";
+static char __pyx_k_34[] = "VarReader5.read_fieldnames (line 780)";
+static char __pyx_k_35[] = "VarReader5.read_struct (line 808)";
+static char __pyx_k_36[] = "VarReader5.read_opaque (line 848)";
+static char __pyx_k__B[] = "B";
+static char __pyx_k__F[] = "F";
+static char __pyx_k__H[] = "H";
+static char __pyx_k__I[] = "I";
+static char __pyx_k__L[] = "L";
+static char __pyx_k__O[] = "O";
+static char __pyx_k__Q[] = "Q";
+static char __pyx_k__T[] = "T";
+static char __pyx_k__b[] = "b";
+static char __pyx_k__d[] = "d";
+static char __pyx_k__f[] = "f";
+static char __pyx_k__g[] = "g";
+static char __pyx_k__h[] = "h";
+static char __pyx_k__i[] = "i";
+static char __pyx_k__l[] = "l";
+static char __pyx_k__q[] = "q";
+static char __pyx_k__Zd[] = "Zd";
+static char __pyx_k__Zf[] = "Zf";
+static char __pyx_k__Zg[] = "Zg";
+static char __pyx_k__np[] = "np";
+static char __pyx_k__s0[] = "s0";
+static char __pyx_k__s1[] = "s1";
+static char __pyx_k__s2[] = "s2";
+static char __pyx_k__arr[] = "arr";
+static char __pyx_k__buf[] = "buf";
+static char __pyx_k__obj[] = "obj";
+static char __pyx_k__sys[] = "sys";
+static char __pyx_k__base[] = "base";
+static char __pyx_k__bool[] = "bool";
+static char __pyx_k__copy[] = "copy";
+static char __pyx_k__dims[] = "dims";
+static char __pyx_k__miob[] = "miob";
+static char __pyx_k__name[] = "name";
+static char __pyx_k__ndim[] = "ndim";
+static char __pyx_k__seek[] = "seek";
+static char __pyx_k__array[] = "array";
+static char __pyx_k__ascii[] = "ascii";
+static char __pyx_k__descr[] = "descr";
+static char __pyx_k__dtype[] = "dtype";
+static char __pyx_k__empty[] = "empty";
+static char __pyx_k__items[] = "items";
+static char __pyx_k__mio5p[] = "mio5p";
+static char __pyx_k__names[] = "names";
+static char __pyx_k__numpy[] = "numpy";
+static char __pyx_k__nzmax[] = "nzmax";
+static char __pyx_k__order[] = "order";
+static char __pyx_k__range[] = "range";
+static char __pyx_k__scipy[] = "scipy";
+static char __pyx_k__shape[] = "shape";
+static char __pyx_k__uint8[] = "uint8";
+static char __pyx_k__astype[] = "astype";
+static char __pyx_k__buffer[] = "buffer";
+static char __pyx_k__codecs[] = "codecs";
+static char __pyx_k__decode[] = "decode";
+static char __pyx_k__dtypes[] = "dtypes";
+static char __pyx_k__fields[] = "fields";
+static char __pyx_k__format[] = "format";
+static char __pyx_k__header[] = "header";
+static char __pyx_k__little[] = "little";
+static char __pyx_k__mclass[] = "mclass";
+static char __pyx_k__n_dims[] = "n_dims";
+static char __pyx_k__object[] = "object";
+static char __pyx_k__pycopy[] = "pycopy";
+static char __pyx_k__sparse[] = "sparse";
+static char __pyx_k__cstream[] = "cstream";
+static char __pyx_k__ndarray[] = "ndarray";
+static char __pyx_k__preader[] = "preader";
+static char __pyx_k__process[] = "process";
+static char __pyx_k__reshape[] = "reshape";
+static char __pyx_k__strides[] = "strides";
+static char __pyx_k__U1_dtype[] = "U1_dtype";
+static char __pyx_k____dict__[] = "__dict__";
+static char __pyx_k____main__[] = "__main__";
+static char __pyx_k____test__[] = "__test__";
+static char __pyx_k__dims_ptr[] = "dims_ptr";
+static char __pyx_k__itemsize[] = "itemsize";
+static char __pyx_k__read_tag[] = "read_tag";
+static char __pyx_k__readonly[] = "readonly";
+static char __pyx_k__tostring[] = "tostring";
+static char __pyx_k__type_num[] = "type_num";
+static char __pyx_k__TypeError[] = "TypeError";
+static char __pyx_k__byteorder[] = "byteorder";
+static char __pyx_k__cread_tag[] = "cread_tag";
+static char __pyx_k__is_global[] = "is_global";
+static char __pyx_k__mat_dtype[] = "mat_dtype";
+static char __pyx_k__read_char[] = "read_char";
+static char __pyx_k__read_into[] = "read_into";
+static char __pyx_k__sys_is_le[] = "sys_is_le";
+static char __pyx_k__ValueError[] = "ValueError";
+static char __pyx_k__VarReader5[] = "VarReader5";
+static char __pyx_k__basestring[] = "basestring";
+static char __pyx_k__bool_dtype[] = "bool_dtype";
+static char __pyx_k__byte_order[] = "byte_order";
+static char __pyx_k__csc_matrix[] = "csc_matrix";
+static char __pyx_k__is_complex[] = "is_complex";
+static char __pyx_k__is_logical[] = "is_logical";
+static char __pyx_k__is_swapped[] = "is_swapped";
+static char __pyx_k__mat_stream[] = "mat_stream";
+static char __pyx_k__mat_struct[] = "mat_struct";
+static char __pyx_k__read_cells[] = "read_cells";
+static char __pyx_k__set_stream[] = "set_stream";
+static char __pyx_k__squeeze_me[] = "squeeze_me";
+static char __pyx_k__suboffsets[] = "suboffsets";
+static char __pyx_k__uint16_len[] = "uint16_len";
+static char __pyx_k___fieldnames[] = "_fieldnames";
+static char __pyx_k__native_code[] = "native_code";
+static char __pyx_k__read_header[] = "read_header";
+static char __pyx_k__read_opaque[] = "read_opaque";
+static char __pyx_k__read_sparse[] = "read_sparse";
+static char __pyx_k__read_string[] = "read_string";
+static char __pyx_k__read_struct[] = "read_struct";
+static char __pyx_k__MatlabObject[] = "MatlabObject";
+static char __pyx_k__MatlabOpaque[] = "MatlabOpaque";
+static char __pyx_k__OPAQUE_DTYPE[] = "OPAQUE_DTYPE";
+static char __pyx_k__RuntimeError[] = "RuntimeError";
+static char __pyx_k__class_dtypes[] = "class_dtypes";
+static char __pyx_k__read_element[] = "read_element";
+static char __pyx_k__read_numeric[] = "read_numeric";
+static char __pyx_k__swapped_code[] = "swapped_code";
+static char __pyx_k__uint16_codec[] = "uint16_codec";
+static char __pyx_k__little_endian[] = "little_endian";
+static char __pyx_k__read_full_tag[] = "read_full_tag";
+static char __pyx_k__MatlabFunction[] = "MatlabFunction";
+static char __pyx_k__cread_full_tag[] = "cread_full_tag";
+static char __pyx_k__read_mi_matrix[] = "read_mi_matrix";
+static char __pyx_k__read_fieldnames[] = "read_fieldnames";
+static char __pyx_k__squeeze_element[] = "squeeze_element";
+static char __pyx_k__chars_as_strings[] = "chars_as_strings";
+static char __pyx_k__chars_to_strings[] = "chars_to_strings";
+static char __pyx_k__cread_fieldnames[] = "cread_fieldnames";
+static char __pyx_k__read_int8_string[] = "read_int8_string";
+static char __pyx_k__read_into_int32s[] = "read_into_int32s";
+static char __pyx_k__size_from_header[] = "size_from_header";
+static char __pyx_k__struct_as_record[] = "struct_as_record";
+static char __pyx_k__array_from_header[] = "array_from_header";
+static char __pyx_k__read_element_into[] = "read_element_into";
+static char __pyx_k__read_real_complex[] = "read_real_complex";
+static PyObject *__pyx_kp_s_1;
+static PyObject *__pyx_kp_s_10;
+static PyObject *__pyx_kp_u_11;
+static PyObject *__pyx_kp_u_12;
+static PyObject *__pyx_kp_u_13;
+static PyObject *__pyx_kp_u_14;
+static PyObject *__pyx_kp_u_15;
+static PyObject *__pyx_kp_u_16;
+static PyObject *__pyx_n_s_18;
+static PyObject *__pyx_n_s_19;
+static PyObject *__pyx_kp_s_2;
+static PyObject *__pyx_n_s_20;
+static PyObject *__pyx_n_s_21;
+static PyObject *__pyx_n_s_22;
+static PyObject *__pyx_kp_s_23;
+static PyObject *__pyx_kp_s_24;
+static PyObject *__pyx_kp_u_25;
+static PyObject *__pyx_kp_u_26;
+static PyObject *__pyx_kp_u_27;
+static PyObject *__pyx_kp_u_28;
+static PyObject *__pyx_kp_u_29;
+static PyObject *__pyx_kp_s_3;
+static PyObject *__pyx_kp_u_30;
+static PyObject *__pyx_kp_u_31;
+static PyObject *__pyx_kp_u_32;
+static PyObject *__pyx_kp_u_33;
+static PyObject *__pyx_kp_u_34;
+static PyObject *__pyx_kp_u_35;
+static PyObject *__pyx_kp_u_36;
+static PyObject *__pyx_kp_s_4;
+static PyObject *__pyx_kp_s_5;
+static PyObject *__pyx_kp_s_6;
+static PyObject *__pyx_kp_s_7;
+static PyObject *__pyx_kp_s_8;
+static PyObject *__pyx_kp_s_9;
+static PyObject *__pyx_n_s__F;
+static PyObject *__pyx_n_s__MatlabFunction;
+static PyObject *__pyx_n_s__MatlabObject;
+static PyObject *__pyx_n_s__MatlabOpaque;
+static PyObject *__pyx_n_s__OPAQUE_DTYPE;
+static PyObject *__pyx_n_s__RuntimeError;
+static PyObject *__pyx_n_s__T;
+static PyObject *__pyx_n_s__TypeError;
+static PyObject *__pyx_n_s__U1_dtype;
+static PyObject *__pyx_n_s__ValueError;
+static PyObject *__pyx_n_s__VarReader5;
+static PyObject *__pyx_n_s____dict__;
+static PyObject *__pyx_n_s____main__;
+static PyObject *__pyx_n_s____test__;
+static PyObject *__pyx_n_s___fieldnames;
+static PyObject *__pyx_n_s__arr;
+static PyObject *__pyx_n_s__array;
+static PyObject *__pyx_n_s__array_from_header;
+static PyObject *__pyx_n_s__ascii;
+static PyObject *__pyx_n_s__astype;
+static PyObject *__pyx_n_s__base;
+static PyObject *__pyx_n_s__basestring;
+static PyObject *__pyx_n_s__bool;
+static PyObject *__pyx_n_s__bool_dtype;
+static PyObject *__pyx_n_s__buf;
+static PyObject *__pyx_n_s__buffer;
+static PyObject *__pyx_n_s__byte_order;
+static PyObject *__pyx_n_s__byteorder;
+static PyObject *__pyx_n_s__chars_as_strings;
+static PyObject *__pyx_n_s__chars_to_strings;
+static PyObject *__pyx_n_s__class_dtypes;
+static PyObject *__pyx_n_s__codecs;
+static PyObject *__pyx_n_s__copy;
+static PyObject *__pyx_n_s__cread_fieldnames;
+static PyObject *__pyx_n_s__cread_full_tag;
+static PyObject *__pyx_n_s__cread_tag;
+static PyObject *__pyx_n_s__csc_matrix;
+static PyObject *__pyx_n_s__cstream;
+static PyObject *__pyx_n_s__decode;
+static PyObject *__pyx_n_s__descr;
+static PyObject *__pyx_n_s__dims;
+static PyObject *__pyx_n_s__dims_ptr;
+static PyObject *__pyx_n_s__dtype;
+static PyObject *__pyx_n_s__dtypes;
+static PyObject *__pyx_n_s__empty;
+static PyObject *__pyx_n_s__fields;
+static PyObject *__pyx_n_s__format;
+static PyObject *__pyx_n_s__header;
+static PyObject *__pyx_n_s__is_complex;
+static PyObject *__pyx_n_s__is_global;
+static PyObject *__pyx_n_s__is_logical;
+static PyObject *__pyx_n_s__is_swapped;
+static PyObject *__pyx_n_s__items;
+static PyObject *__pyx_n_s__itemsize;
+static PyObject *__pyx_n_s__little;
+static PyObject *__pyx_n_s__little_endian;
+static PyObject *__pyx_n_s__mat_dtype;
+static PyObject *__pyx_n_s__mat_stream;
+static PyObject *__pyx_n_s__mat_struct;
+static PyObject *__pyx_n_s__mclass;
+static PyObject *__pyx_n_s__mio5p;
+static PyObject *__pyx_n_s__miob;
+static PyObject *__pyx_n_s__n_dims;
+static PyObject *__pyx_n_s__name;
+static PyObject *__pyx_n_s__names;
+static PyObject *__pyx_n_s__native_code;
+static PyObject *__pyx_n_s__ndarray;
+static PyObject *__pyx_n_s__ndim;
+static PyObject *__pyx_n_s__np;
+static PyObject *__pyx_n_s__numpy;
+static PyObject *__pyx_n_s__nzmax;
+static PyObject *__pyx_n_s__obj;
+static PyObject *__pyx_n_s__object;
+static PyObject *__pyx_n_s__order;
+static PyObject *__pyx_n_s__preader;
+static PyObject *__pyx_n_s__process;
+static PyObject *__pyx_n_s__pycopy;
+static PyObject *__pyx_n_s__range;
+static PyObject *__pyx_n_s__read_cells;
+static PyObject *__pyx_n_s__read_char;
+static PyObject *__pyx_n_s__read_element;
+static PyObject *__pyx_n_s__read_element_into;
+static PyObject *__pyx_n_s__read_fieldnames;
+static PyObject *__pyx_n_s__read_full_tag;
+static PyObject *__pyx_n_s__read_header;
+static PyObject *__pyx_n_s__read_int8_string;
+static PyObject *__pyx_n_s__read_into;
+static PyObject *__pyx_n_s__read_into_int32s;
+static PyObject *__pyx_n_s__read_mi_matrix;
+static PyObject *__pyx_n_s__read_numeric;
+static PyObject *__pyx_n_s__read_opaque;
+static PyObject *__pyx_n_s__read_real_complex;
+static PyObject *__pyx_n_s__read_sparse;
+static PyObject *__pyx_n_s__read_string;
+static PyObject *__pyx_n_s__read_struct;
+static PyObject *__pyx_n_s__read_tag;
+static PyObject *__pyx_n_s__readonly;
+static PyObject *__pyx_n_s__reshape;
+static PyObject *__pyx_n_s__s0;
+static PyObject *__pyx_n_s__s1;
+static PyObject *__pyx_n_s__s2;
+static PyObject *__pyx_n_s__scipy;
+static PyObject *__pyx_n_s__seek;
+static PyObject *__pyx_n_s__set_stream;
+static PyObject *__pyx_n_s__shape;
+static PyObject *__pyx_n_s__size_from_header;
+static PyObject *__pyx_n_s__sparse;
+static PyObject *__pyx_n_s__squeeze_element;
+static PyObject *__pyx_n_s__squeeze_me;
+static PyObject *__pyx_n_s__strides;
+static PyObject *__pyx_n_s__struct_as_record;
+static PyObject *__pyx_n_s__suboffsets;
+static PyObject *__pyx_n_s__swapped_code;
+static PyObject *__pyx_n_s__sys;
+static PyObject *__pyx_n_s__sys_is_le;
+static PyObject *__pyx_n_s__tostring;
+static PyObject *__pyx_n_s__type_num;
+static PyObject *__pyx_n_s__uint16_codec;
+static PyObject *__pyx_n_s__uint16_len;
+static PyObject *__pyx_n_s__uint8;
+static PyObject *__pyx_int_1;
+static PyObject *__pyx_int_neg_1;
 static PyObject *__pyx_int_15;
-static char __pyx_k___getbuffer__[] = "__getbuffer__";
-static PyObject *__pyx_kp___getbuffer__;
-static char __pyx_k___releasebuffer__[] = "__releasebuffer__";
-static PyObject *__pyx_kp___releasebuffer__;
-static char __pyx_k_info[] = "info";
-static PyObject *__pyx_kp_info;
-static char __pyx_k_flags[] = "flags";
-static PyObject *__pyx_kp_flags;
-static char __pyx_k_RuntimeError[] = "RuntimeError";
-static PyObject *__pyx_kp_RuntimeError;
-static PyObject *__pyx_kp_1;
-static PyObject *__pyx_kp_2;
-static PyObject *__pyx_kp_5;
-static PyObject *__pyx_kp_23;
-static PyObject *__pyx_builtin_RuntimeError;
-static char __pyx_k_1[] = "ndarray is not C contiguous";
-static char __pyx_k_2[] = "ndarray is not Fortran contiguous";
-static char __pyx_k_3[] = ">";
-static char __pyx_k_4[] = "<";
-static char __pyx_k_5[] = "Non-native byte order not supported";
-static char __pyx_k_6[] = "b";
-static char __pyx_k_7[] = "B";
-static char __pyx_k_8[] = "h";
-static char __pyx_k_9[] = "H";
-static char __pyx_k_10[] = "i";
-static char __pyx_k_11[] = "I";
-static char __pyx_k_12[] = "l";
-static char __pyx_k_13[] = "L";
-static char __pyx_k_14[] = "q";
-static char __pyx_k_15[] = "Q";
-static char __pyx_k_16[] = "f";
-static char __pyx_k_17[] = "d";
-static char __pyx_k_18[] = "g";
-static char __pyx_k_19[] = "Zf";
-static char __pyx_k_20[] = "Zd";
-static char __pyx_k_21[] = "Zg";
-static char __pyx_k_22[] = "O";
-static char __pyx_k_23[] = "unknown dtype code in numpy.pxd (%d)";
-static char __pyx_k_24[] = "^";
-static PyObject *__pyx_kp_25;
-static PyObject *__pyx_kp_28;
-static PyObject *__pyx_kp_29;
-static PyObject *__pyx_kp_30;
-static char __pyx_k_25[] = "Format string allocated too short, see comment in numpy.pxd";
-static char __pyx_k_26[] = ">";
-static char __pyx_k_27[] = "<";
-static char __pyx_k_28[] = "Non-native byte order not supported";
-static char __pyx_k_29[] = "Format string allocated too short.";
-static char __pyx_k_30[] = "unknown dtype code in numpy.pxd (%d)";
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":108
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":108
  * 
  * 
  * cpdef cnp.uint32_t byteswap_u4(cnp.uint32_t u4):             # <<<<<<<<<<<<<<
@@ -1370,9 +1419,9 @@
 static PyObject *__pyx_pf_5scipy_2io_6matlab_10mio5_utils_byteswap_u4(PyObject *__pyx_self, PyObject *__pyx_arg_u4); /*proto*/
 static  __pyx_t_5numpy_uint32_t __pyx_f_5scipy_2io_6matlab_10mio5_utils_byteswap_u4(__pyx_t_5numpy_uint32_t __pyx_v_u4, int __pyx_skip_dispatch) {
   __pyx_t_5numpy_uint32_t __pyx_r;
-  __Pyx_SetupRefcountContext("byteswap_u4");
+  __Pyx_RefNannySetupContext("byteswap_u4");
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":112
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":112
  *            ((u4 << 8) & 0xff0000U) |
  *            ((u4 >> 8 & 0xff00u)) |
  *            (u4 >> 24))             # <<<<<<<<<<<<<<
@@ -1384,11 +1433,11 @@
 
   __pyx_r = 0;
   __pyx_L0:;
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":108
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":108
  * 
  * 
  * cpdef cnp.uint32_t byteswap_u4(cnp.uint32_t u4):             # <<<<<<<<<<<<<<
@@ -1401,7 +1450,7 @@
   __pyx_t_5numpy_uint32_t __pyx_v_u4;
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
-  __Pyx_SetupRefcountContext("byteswap_u4");
+  __Pyx_RefNannySetupContext("byteswap_u4");
   __pyx_self = __pyx_self;
   assert(__pyx_arg_u4); {
     __pyx_v_u4 = __Pyx_PyInt_from_py_npy_uint32(__pyx_arg_u4); if (unlikely((__pyx_v_u4 == (npy_uint32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
@@ -1426,11 +1475,11 @@
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":148
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":148
  *         int chars_as_strings
  * 
  *     def __new__(self, preader):             # <<<<<<<<<<<<<<
@@ -1445,18 +1494,17 @@
   PyObject *__pyx_v_dt;
   PyObject *__pyx_v_bool_dtype;
   int __pyx_r;
-  PyObject *__pyx_1 = 0;
-  PyObject *__pyx_2 = 0;
-  PyObject *__pyx_3 = 0;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
+  PyObject *__pyx_t_3 = NULL;
   int __pyx_t_4;
-  PyObject *__pyx_t_5 = NULL;
+  int __pyx_t_5;
   Py_ssize_t __pyx_t_6;
-  Py_ssize_t __pyx_t_7;
-  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_preader,0};
-  __Pyx_SetupRefcountContext("__cinit__");
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  Py_ssize_t __pyx_t_9;
+  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__preader,0};
+  __Pyx_RefNannySetupContext("__cinit__");
   if (unlikely(__pyx_kwds)) {
     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
     PyObject* values[1] = {0};
@@ -1467,7 +1515,7 @@
     }
     switch (PyTuple_GET_SIZE(__pyx_args)) {
       case  0:
-      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_preader);
+      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__preader);
       if (likely(values[0])) kw_args--;
       else goto __pyx_L5_argtuple_error;
     }
@@ -1487,175 +1535,177 @@
   __Pyx_AddTraceback("scipy.io.matlab.mio5_utils.VarReader5.__cinit__");
   return -1;
   __pyx_L4_argument_unpacking_done:;
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
+  __Pyx_INCREF(__pyx_v_preader);
   __pyx_v_key = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_dt = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_bool_dtype = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":149
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":149
  * 
  *     def __new__(self, preader):
  *         self.is_swapped = preader.byte_order == swapped_code             # <<<<<<<<<<<<<<
  *         if self.is_swapped:
  *             self.little_endian = not sys_is_le
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_preader, __pyx_kp_byte_order); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_preader, __pyx_n_s__byte_order); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_swapped_code); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_1, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__swapped_code); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->is_swapped = __pyx_t_3;
+  __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->is_swapped = __pyx_t_4;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":150
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":150
  *     def __new__(self, preader):
  *         self.is_swapped = preader.byte_order == swapped_code
  *         if self.is_swapped:             # <<<<<<<<<<<<<<
  *             self.little_endian = not sys_is_le
  *         else:
  */
-  __pyx_t_3 = ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->is_swapped;
-  if (__pyx_t_3) {
+  __pyx_t_4 = ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->is_swapped;
+  if (__pyx_t_4) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":151
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":151
  *         self.is_swapped = preader.byte_order == swapped_code
  *         if self.is_swapped:
  *             self.little_endian = not sys_is_le             # <<<<<<<<<<<<<<
  *         else:
  *             self.little_endian = sys_is_le
  */
-    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_sys_is_le); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-    ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->little_endian = (!__pyx_t_4);
+    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys_is_le); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->little_endian = (!__pyx_t_5);
     goto __pyx_L6;
   }
   /*else*/ {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":153
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":153
  *             self.little_endian = not sys_is_le
  *         else:
  *             self.little_endian = sys_is_le             # <<<<<<<<<<<<<<
  *         # option affecting reading of matlab struct arrays
  *         self.struct_as_record = preader.struct_as_record
  */
-    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_sys_is_le); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-    ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->little_endian = __pyx_t_3;
+    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys_is_le); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->little_endian = __pyx_t_4;
   }
   __pyx_L6:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":155
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":155
  *             self.little_endian = sys_is_le
  *         # option affecting reading of matlab struct arrays
  *         self.struct_as_record = preader.struct_as_record             # <<<<<<<<<<<<<<
  *         # store codecs for text matrix reading
  *         self.codecs = preader.codecs
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_preader, __pyx_kp_struct_as_record); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->struct_as_record = __pyx_t_3;
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_preader, __pyx_n_s__struct_as_record); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->struct_as_record = __pyx_t_4;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":157
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":157
  *         self.struct_as_record = preader.struct_as_record
  *         # store codecs for text matrix reading
  *         self.codecs = preader.codecs             # <<<<<<<<<<<<<<
  *         self.uint16_codec = preader.uint16_codec
  *         # set c-optimized stream object from python file-like object
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_preader, __pyx_kp_codecs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_preader, __pyx_n_s__codecs); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
   __Pyx_GOTREF(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->codecs);
   __Pyx_DECREF(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->codecs);
-  ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->codecs = __pyx_t_2;
-  __pyx_t_2 = 0;
+  ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->codecs = __pyx_t_3;
+  __pyx_t_3 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":158
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":158
  *         # store codecs for text matrix reading
  *         self.codecs = preader.codecs
  *         self.uint16_codec = preader.uint16_codec             # <<<<<<<<<<<<<<
  *         # set c-optimized stream object from python file-like object
  *         self.set_stream(preader.mat_stream)
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_preader, __pyx_kp_44); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_preader, __pyx_n_s__uint16_codec); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
   __Pyx_GOTREF(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->uint16_codec);
   __Pyx_DECREF(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->uint16_codec);
-  ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->uint16_codec = __pyx_t_2;
-  __pyx_t_2 = 0;
+  ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->uint16_codec = __pyx_t_3;
+  __pyx_t_3 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":160
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":160
  *         self.uint16_codec = preader.uint16_codec
  *         # set c-optimized stream object from python file-like object
  *         self.set_stream(preader.mat_stream)             # <<<<<<<<<<<<<<
- *         # options for process_element
+ *         # options for element processing
  *         self.mat_dtype = preader.mat_dtype
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_set_stream); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__set_stream); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_preader, __pyx_n_s__mat_stream); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_preader, __pyx_kp_mat_stream); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
-  __Pyx_GIVEREF(__pyx_t_1);
-  __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":162
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":162
  *         self.set_stream(preader.mat_stream)
- *         # options for process_element
+ *         # options for element processing
  *         self.mat_dtype = preader.mat_dtype             # <<<<<<<<<<<<<<
  *         self.chars_as_strings = preader.chars_as_strings
  *         self.squeeze_me = preader.squeeze_me
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_preader, __pyx_kp_mat_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->mat_dtype = __pyx_t_3;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_preader, __pyx_n_s__mat_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->mat_dtype = __pyx_t_4;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":163
- *         # options for process_element
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":163
+ *         # options for element processing
  *         self.mat_dtype = preader.mat_dtype
  *         self.chars_as_strings = preader.chars_as_strings             # <<<<<<<<<<<<<<
  *         self.squeeze_me = preader.squeeze_me
  *         # copy refs to dtypes into object pointer array. Store preader
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_preader, __pyx_kp_chars_as_strings); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->chars_as_strings = __pyx_t_3;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_preader, __pyx_n_s__chars_as_strings); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->chars_as_strings = __pyx_t_4;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":164
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":164
  *         self.mat_dtype = preader.mat_dtype
  *         self.chars_as_strings = preader.chars_as_strings
  *         self.squeeze_me = preader.squeeze_me             # <<<<<<<<<<<<<<
  *         # copy refs to dtypes into object pointer array. Store preader
  *         # to keep preader.dtypes, class_dtypes alive. We only need the
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_preader, __pyx_kp_squeeze_me); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->squeeze_me = __pyx_t_3;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_preader, __pyx_n_s__squeeze_me); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->squeeze_me = __pyx_t_4;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":168
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":168
  *         # to keep preader.dtypes, class_dtypes alive. We only need the
  *         # integer-keyed dtypes
  *         self.preader = preader             # <<<<<<<<<<<<<<
@@ -1668,83 +1718,83 @@
   __Pyx_DECREF(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->preader);
   ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->preader = __pyx_v_preader;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":169
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":169
  *         # integer-keyed dtypes
  *         self.preader = preader
  *         for key, dt in preader.dtypes.items():             # <<<<<<<<<<<<<<
  *             if isinstance(key, basestring):
  *                 continue
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_preader, __pyx_kp_dtypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_preader, __pyx_n_s__dtypes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_kp_items); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
-    __pyx_t_6 = 0; __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5);
+  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
+    __pyx_t_6 = 0; __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
   } else {
-    __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
   }
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   for (;;) {
-    if (likely(PyList_CheckExact(__pyx_t_5))) {
-      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
-      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
-    } else if (likely(PyTuple_CheckExact(__pyx_t_5))) {
-      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
-      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
+    if (likely(PyList_CheckExact(__pyx_t_1))) {
+      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
+      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
+    } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
+      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
     } else {
-      __pyx_t_1 = PyIter_Next(__pyx_t_5);
-      if (!__pyx_t_1) {
+      __pyx_t_2 = PyIter_Next(__pyx_t_1);
+      if (!__pyx_t_2) {
         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
       }
-      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_GOTREF(__pyx_t_2);
     }
-    if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
-      PyObject* tuple = __pyx_t_1;
-      __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
-      __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
+      PyObject* tuple = __pyx_t_2;
+      __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
+      __pyx_t_7 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __Pyx_DECREF(__pyx_v_key);
-      __pyx_v_key = __pyx_2;
-      __pyx_2 = 0;
+      __pyx_v_key = __pyx_t_3;
+      __pyx_t_3 = 0;
       __Pyx_DECREF(__pyx_v_dt);
-      __pyx_v_dt = __pyx_3;
-      __pyx_3 = 0;
+      __pyx_v_dt = __pyx_t_7;
+      __pyx_t_7 = 0;
     } else {
-      __pyx_1 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_1);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_2);
-      __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_3);
-      if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+      __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_8, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_7 = __Pyx_UnpackItem(__pyx_t_8, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      if (__Pyx_EndUnpack(__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
       __Pyx_DECREF(__pyx_v_key);
-      __pyx_v_key = __pyx_2;
-      __pyx_2 = 0;
+      __pyx_v_key = __pyx_t_3;
+      __pyx_t_3 = 0;
       __Pyx_DECREF(__pyx_v_dt);
-      __pyx_v_dt = __pyx_3;
-      __pyx_3 = 0;
+      __pyx_v_dt = __pyx_t_7;
+      __pyx_t_7 = 0;
     }
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":170
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":170
  *         self.preader = preader
  *         for key, dt in preader.dtypes.items():
  *             if isinstance(key, basestring):             # <<<<<<<<<<<<<<
  *                 continue
  *             self.dtypes[key] = <PyObject*>dt
  */
-    __pyx_t_4 = PyObject_IsInstance(__pyx_v_key, __pyx_builtin_basestring); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_4) {
+    __pyx_t_5 = PyObject_IsInstance(__pyx_v_key, __pyx_builtin_basestring); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_5) {
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":171
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":171
  *         for key, dt in preader.dtypes.items():
  *             if isinstance(key, basestring):
  *                 continue             # <<<<<<<<<<<<<<
@@ -1756,96 +1806,96 @@
     }
     __pyx_L9:;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":172
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":172
  *             if isinstance(key, basestring):
  *                 continue
  *             self.dtypes[key] = <PyObject*>dt             # <<<<<<<<<<<<<<
  *         # copy refs to class_dtypes into object pointer array
  *         for key, dt in preader.class_dtypes.items():
  */
-    __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_key); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    (((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->dtypes[__pyx_t_7]) = ((PyObject *)__pyx_v_dt);
+    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_key); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    (((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->dtypes[__pyx_t_9]) = ((PyObject *)__pyx_v_dt);
     __pyx_L7_continue:;
   }
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":174
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":174
  *             self.dtypes[key] = <PyObject*>dt
  *         # copy refs to class_dtypes into object pointer array
  *         for key, dt in preader.class_dtypes.items():             # <<<<<<<<<<<<<<
  *             if isinstance(key, basestring):
  *                 continue
  */
-  __pyx_t_5 = PyObject_GetAttr(__pyx_v_preader, __pyx_kp_class_dtypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_kp_items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_preader, __pyx_n_s__class_dtypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__items); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
-    __pyx_t_6 = 0; __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1);
+  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
+    __pyx_t_6 = 0; __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2);
   } else {
-    __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
   }
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   for (;;) {
-    if (likely(PyList_CheckExact(__pyx_t_1))) {
-      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
-      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++;
-    } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
-      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
-      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++;
+    if (likely(PyList_CheckExact(__pyx_t_2))) {
+      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
+      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
+    } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
+      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
     } else {
-      __pyx_t_5 = PyIter_Next(__pyx_t_1);
-      if (!__pyx_t_5) {
+      __pyx_t_1 = PyIter_Next(__pyx_t_2);
+      if (!__pyx_t_1) {
         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
       }
-      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_GOTREF(__pyx_t_1);
     }
-    if (PyTuple_CheckExact(__pyx_t_5) && likely(PyTuple_GET_SIZE(__pyx_t_5) == 2)) {
-      PyObject* tuple = __pyx_t_5;
-      __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
-      __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
+      PyObject* tuple = __pyx_t_1;
+      __pyx_t_7 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_7);
+      __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       __Pyx_DECREF(__pyx_v_key);
-      __pyx_v_key = __pyx_2;
-      __pyx_2 = 0;
+      __pyx_v_key = __pyx_t_7;
+      __pyx_t_7 = 0;
       __Pyx_DECREF(__pyx_v_dt);
-      __pyx_v_dt = __pyx_3;
-      __pyx_3 = 0;
+      __pyx_v_dt = __pyx_t_3;
+      __pyx_t_3 = 0;
     } else {
-      __pyx_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_1);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_2);
-      __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_3);
-      if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+      __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_7 = __Pyx_UnpackItem(__pyx_t_8, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_8, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      if (__Pyx_EndUnpack(__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
       __Pyx_DECREF(__pyx_v_key);
-      __pyx_v_key = __pyx_2;
-      __pyx_2 = 0;
+      __pyx_v_key = __pyx_t_7;
+      __pyx_t_7 = 0;
       __Pyx_DECREF(__pyx_v_dt);
-      __pyx_v_dt = __pyx_3;
-      __pyx_3 = 0;
+      __pyx_v_dt = __pyx_t_3;
+      __pyx_t_3 = 0;
     }
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":175
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":175
  *         # copy refs to class_dtypes into object pointer array
  *         for key, dt in preader.class_dtypes.items():
  *             if isinstance(key, basestring):             # <<<<<<<<<<<<<<
  *                 continue
  *             self.class_dtypes[key] = <PyObject*>dt
  */
-    __pyx_t_4 = PyObject_IsInstance(__pyx_v_key, __pyx_builtin_basestring); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_4) {
+    __pyx_t_5 = PyObject_IsInstance(__pyx_v_key, __pyx_builtin_basestring); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_5) {
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":176
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":176
  *         for key, dt in preader.class_dtypes.items():
  *             if isinstance(key, basestring):
  *                 continue             # <<<<<<<<<<<<<<
@@ -1857,82 +1907,82 @@
     }
     __pyx_L12:;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":177
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":177
  *             if isinstance(key, basestring):
  *                 continue
  *             self.class_dtypes[key] = <PyObject*>dt             # <<<<<<<<<<<<<<
  *         # cache correctly byte ordered dtypes
  *         if self.little_endian:
  */
-    __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_key); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    (((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->class_dtypes[__pyx_t_7]) = ((PyObject *)__pyx_v_dt);
+    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_key); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    (((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->class_dtypes[__pyx_t_9]) = ((PyObject *)__pyx_v_dt);
     __pyx_L10_continue:;
   }
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":179
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":179
  *             self.class_dtypes[key] = <PyObject*>dt
  *         # cache correctly byte ordered dtypes
  *         if self.little_endian:             # <<<<<<<<<<<<<<
  *             self.U1_dtype = np.dtype('<U1')
  *         else:
  */
-  __pyx_t_3 = ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->little_endian;
-  if (__pyx_t_3) {
+  __pyx_t_4 = ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->little_endian;
+  if (__pyx_t_4) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":180
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":180
  *         # cache correctly byte ordered dtypes
  *         if self.little_endian:
  *             self.U1_dtype = np.dtype('<U1')             # <<<<<<<<<<<<<<
  *         else:
  *             self.U1_dtype = np.dtype('>U1')
  */
-    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-    __Pyx_INCREF(__pyx_kp_45);
-    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_45);
-    __Pyx_GIVEREF(__pyx_kp_45);
-    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
+    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_1));
+    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
+    __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-    if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_dtype))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GIVEREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GIVEREF(__pyx_t_3);
     __Pyx_GOTREF(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->U1_dtype);
     __Pyx_DECREF(((PyObject *)((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->U1_dtype));
-    ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->U1_dtype = ((PyArray_Descr *)__pyx_t_2);
-    __pyx_t_2 = 0;
+    ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->U1_dtype = ((PyArray_Descr *)__pyx_t_3);
+    __pyx_t_3 = 0;
     goto __pyx_L13;
   }
   /*else*/ {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":182
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":182
  *             self.U1_dtype = np.dtype('<U1')
  *         else:
  *             self.U1_dtype = np.dtype('>U1')             # <<<<<<<<<<<<<<
  *         bool_dtype = np.dtype('bool')
  * 
  */
-    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_2);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_2, __pyx_kp_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-    __Pyx_INCREF(__pyx_kp_46);
-    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_46);
-    __Pyx_GIVEREF(__pyx_kp_46);
-    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
+    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_2));
+    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
+    __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-    if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_dtype))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GIVEREF(__pyx_t_1);
     __Pyx_GOTREF(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->U1_dtype);
     __Pyx_DECREF(((PyObject *)((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->U1_dtype));
@@ -1941,27 +1991,27 @@
   }
   __pyx_L13:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":183
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":183
  *         else:
  *             self.U1_dtype = np.dtype('>U1')
  *         bool_dtype = np.dtype('bool')             # <<<<<<<<<<<<<<
  * 
  *     def set_stream(self, fobj):
  */
-  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_3);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_3, __pyx_kp_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-  __Pyx_INCREF(__pyx_kp_47);
-  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_47);
-  __Pyx_GIVEREF(__pyx_kp_47);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__bool));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__bool));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bool));
+  __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
   __Pyx_DECREF(__pyx_v_bool_dtype);
   __pyx_v_bool_dtype = __pyx_t_2;
   __pyx_t_2 = 0;
@@ -1969,23 +2019,24 @@
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_1);
-  __Pyx_XDECREF(__pyx_2);
-  __Pyx_XDECREF(__pyx_3);
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
   __Pyx_AddTraceback("scipy.io.matlab.mio5_utils.VarReader5.__cinit__");
   __pyx_r = -1;
   __pyx_L0:;
   __Pyx_DECREF(__pyx_v_key);
   __Pyx_DECREF(__pyx_v_dt);
   __Pyx_DECREF(__pyx_v_bool_dtype);
-  __Pyx_FinishRefcountContext();
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
+  __Pyx_DECREF(__pyx_v_preader);
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":185
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":185
  *         bool_dtype = np.dtype('bool')
  * 
  *     def set_stream(self, fobj):             # <<<<<<<<<<<<<<
@@ -1998,9 +2049,9 @@
 static PyObject *__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_set_stream(PyObject *__pyx_v_self, PyObject *__pyx_v_fobj) {
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
-  __Pyx_SetupRefcountContext("set_stream");
+  __Pyx_RefNannySetupContext("set_stream");
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":190
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":190
  *         Called from Python when initiating a variable read
  *         '''
  *         self.cstream = streams.make_stream(fobj)             # <<<<<<<<<<<<<<
@@ -2023,11 +2074,11 @@
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":192
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":192
  *         self.cstream = streams.make_stream(fobj)
  * 
  *     def read_tag(self):             # <<<<<<<<<<<<<<
@@ -2044,15 +2095,15 @@
   int __pyx_v_tag_res;
   PyObject *__pyx_v_tag_data = 0;
   PyObject *__pyx_r = NULL;
-  PyObject *__pyx_1 = 0;
   int __pyx_t_1;
   int __pyx_t_2;
   PyObject *__pyx_t_3 = NULL;
   PyObject *__pyx_t_4 = NULL;
   PyObject *__pyx_t_5 = NULL;
-  __Pyx_SetupRefcountContext("read_tag");
+  __Pyx_RefNannySetupContext("read_tag");
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":213
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":213
  *         cdef char tag_ptr[4]
  *         cdef int tag_res
  *         cdef object tag_data = None             # <<<<<<<<<<<<<<
@@ -2062,7 +2113,7 @@
   __Pyx_INCREF(Py_None);
   __pyx_v_tag_data = Py_None;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":214
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":214
  *         cdef int tag_res
  *         cdef object tag_data = None
  *         tag_res = self.cread_tag(&mdtype, &byte_count, tag_ptr)             # <<<<<<<<<<<<<<
@@ -2072,7 +2123,7 @@
   __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->__pyx_vtab)->cread_tag(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self), (&__pyx_v_mdtype), (&__pyx_v_byte_count), __pyx_v_tag_ptr); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_tag_res = __pyx_t_1;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":215
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":215
  *         cdef object tag_data = None
  *         tag_res = self.cread_tag(&mdtype, &byte_count, tag_ptr)
  *         if tag_res == 2: # sde format             # <<<<<<<<<<<<<<
@@ -2082,23 +2133,23 @@
   __pyx_t_2 = (__pyx_v_tag_res == 2);
   if (__pyx_t_2) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":216
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":216
  *         tag_res = self.cread_tag(&mdtype, &byte_count, tag_ptr)
  *         if tag_res == 2: # sde format
  *             tag_data = tag_ptr[:byte_count]             # <<<<<<<<<<<<<<
  *         return (mdtype, byte_count, tag_data)
  * 
  */
-    __pyx_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_tag_ptr + 0, __pyx_v_byte_count - 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_1));
+    __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_tag_ptr + 0, __pyx_v_byte_count - 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
     __Pyx_DECREF(__pyx_v_tag_data);
-    __pyx_v_tag_data = ((PyObject *)__pyx_1);
-    __pyx_1 = 0;
+    __pyx_v_tag_data = ((PyObject *)__pyx_t_3);
+    __pyx_t_3 = 0;
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":217
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":217
  *         if tag_res == 2: # sde format
  *             tag_data = tag_ptr[:byte_count]
  *         return (mdtype, byte_count, tag_data)             # <<<<<<<<<<<<<<
@@ -2111,7 +2162,7 @@
   __pyx_t_4 = __Pyx_PyInt_to_py_npy_uint32(__pyx_v_byte_count); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
+  __Pyx_GOTREF(__pyx_t_5);
   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
   __Pyx_GIVEREF(__pyx_t_3);
   PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
@@ -2121,14 +2172,13 @@
   __Pyx_GIVEREF(__pyx_v_tag_data);
   __pyx_t_3 = 0;
   __pyx_t_4 = 0;
-  __pyx_r = ((PyObject *)__pyx_t_5);
+  __pyx_r = __pyx_t_5;
   __pyx_t_5 = 0;
   goto __pyx_L0;
 
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_1);
   __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_4);
   __Pyx_XDECREF(__pyx_t_5);
@@ -2136,12 +2186,13 @@
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XDECREF(__pyx_v_tag_data);
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":219
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":219
  *         return (mdtype, byte_count, tag_data)
  * 
  *     cdef int cread_tag(self,             # <<<<<<<<<<<<<<
@@ -2161,9 +2212,10 @@
   int __pyx_t_3;
   PyObject *__pyx_t_4 = NULL;
   PyObject *__pyx_t_5 = NULL;
-  __Pyx_SetupRefcountContext("cread_tag");
+  __Pyx_RefNannySetupContext("cread_tag");
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":234
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":234
  *         cdef cnp.uint16_t mdtype_sde, byte_count_sde
  *         cdef cnp.uint32_t mdtype
  *         cdef cnp.uint32_t* u4_ptr = <cnp.uint32_t*>data_ptr             # <<<<<<<<<<<<<<
@@ -2172,7 +2224,7 @@
  */
   __pyx_v_u4_ptr = ((__pyx_t_5numpy_uint32_t *)__pyx_v_data_ptr);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":262
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":262
  *         # first four bytes are two little-endian uint16 values, first
  *         # ``mdtype`` and second ``byte_count``.
  *         self.cstream.read_into(<void *>u4s, 8)             # <<<<<<<<<<<<<<
@@ -2181,7 +2233,7 @@
  */
   __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_7streams_GenericStream *)__pyx_v_self->cstream->__pyx_vtab)->read_into(__pyx_v_self->cstream, ((void *)__pyx_v_u4s), 8); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":263
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":263
  *         # ``mdtype`` and second ``byte_count``.
  *         self.cstream.read_into(<void *>u4s, 8)
  *         if self.is_swapped:             # <<<<<<<<<<<<<<
@@ -2191,7 +2243,7 @@
   __pyx_t_1 = __pyx_v_self->is_swapped;
   if (__pyx_t_1) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":264
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":264
  *         self.cstream.read_into(<void *>u4s, 8)
  *         if self.is_swapped:
  *             mdtype = byteswap_u4(u4s[0])             # <<<<<<<<<<<<<<
@@ -2203,7 +2255,7 @@
   }
   /*else*/ {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":266
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":266
  *             mdtype = byteswap_u4(u4s[0])
  *         else:
  *             mdtype = u4s[0]             # <<<<<<<<<<<<<<
@@ -2214,7 +2266,7 @@
   }
   __pyx_L3:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":269
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":269
  *         # The most significant two bytes of a U4 *mdtype* will always be
  *         # 0, if they are not, this must be SDE format
  *         byte_count_sde = mdtype >> 16             # <<<<<<<<<<<<<<
@@ -2223,7 +2275,7 @@
  */
   __pyx_v_byte_count_sde = (__pyx_v_mdtype >> 16);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":270
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":270
  *         # 0, if they are not, this must be SDE format
  *         byte_count_sde = mdtype >> 16
  *         if byte_count_sde: # small data element format             # <<<<<<<<<<<<<<
@@ -2233,7 +2285,7 @@
   __pyx_t_2 = __pyx_v_byte_count_sde;
   if (__pyx_t_2) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":271
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":271
  *         byte_count_sde = mdtype >> 16
  *         if byte_count_sde: # small data element format
  *             mdtype_sde = mdtype & 0xffff             # <<<<<<<<<<<<<<
@@ -2242,7 +2294,7 @@
  */
     __pyx_v_mdtype_sde = (__pyx_v_mdtype & 0xffff);
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":272
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":272
  *         if byte_count_sde: # small data element format
  *             mdtype_sde = mdtype & 0xffff
  *             if byte_count_sde > 4:             # <<<<<<<<<<<<<<
@@ -2252,7 +2304,7 @@
     __pyx_t_3 = (__pyx_v_byte_count_sde > 4);
     if (__pyx_t_3) {
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":273
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":273
  *             mdtype_sde = mdtype & 0xffff
  *             if byte_count_sde > 4:
  *                 raise ValueError('Error in SDE format data')             # <<<<<<<<<<<<<<
@@ -2260,18 +2312,18 @@
  *             u4_ptr[0] = u4s[1]
  */
       __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-      __Pyx_INCREF(__pyx_kp_48);
-      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_48);
-      __Pyx_GIVEREF(__pyx_kp_48);
-      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
+      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_3));
+      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
+      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
       __Pyx_Raise(__pyx_t_5, 0, 0);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":274
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":274
  *             if byte_count_sde > 4:
  *                 raise ValueError('Error in SDE format data')
  *                 return -1             # <<<<<<<<<<<<<<
@@ -2284,7 +2336,7 @@
     }
     __pyx_L5:;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":275
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":275
  *                 raise ValueError('Error in SDE format data')
  *                 return -1
  *             u4_ptr[0] = u4s[1]             # <<<<<<<<<<<<<<
@@ -2293,7 +2345,7 @@
  */
     (__pyx_v_u4_ptr[0]) = (__pyx_v_u4s[1]);
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":276
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":276
  *                 return -1
  *             u4_ptr[0] = u4s[1]
  *             mdtype_ptr[0] = mdtype_sde             # <<<<<<<<<<<<<<
@@ -2302,7 +2354,7 @@
  */
     (__pyx_v_mdtype_ptr[0]) = __pyx_v_mdtype_sde;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":277
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":277
  *             u4_ptr[0] = u4s[1]
  *             mdtype_ptr[0] = mdtype_sde
  *             byte_count_ptr[0] = byte_count_sde             # <<<<<<<<<<<<<<
@@ -2311,7 +2363,7 @@
  */
     (__pyx_v_byte_count_ptr[0]) = __pyx_v_byte_count_sde;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":278
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":278
  *             mdtype_ptr[0] = mdtype_sde
  *             byte_count_ptr[0] = byte_count_sde
  *             return 2             # <<<<<<<<<<<<<<
@@ -2324,7 +2376,7 @@
   }
   __pyx_L4:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":280
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":280
  *             return 2
  *         # regular element
  *         if self.is_swapped:             # <<<<<<<<<<<<<<
@@ -2334,7 +2386,7 @@
   __pyx_t_1 = __pyx_v_self->is_swapped;
   if (__pyx_t_1) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":281
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":281
  *         # regular element
  *         if self.is_swapped:
  *             byte_count_ptr[0] = byteswap_u4(u4s[1])             # <<<<<<<<<<<<<<
@@ -2346,7 +2398,7 @@
   }
   /*else*/ {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":283
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":283
  *             byte_count_ptr[0] = byteswap_u4(u4s[1])
  *         else:
  *             byte_count_ptr[0] = u4s[1]             # <<<<<<<<<<<<<<
@@ -2357,7 +2409,7 @@
   }
   __pyx_L6:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":284
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":284
  *         else:
  *             byte_count_ptr[0] = u4s[1]
  *         mdtype_ptr[0] = mdtype             # <<<<<<<<<<<<<<
@@ -2366,7 +2418,7 @@
  */
   (__pyx_v_mdtype_ptr[0]) = __pyx_v_mdtype;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":285
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":285
  *             byte_count_ptr[0] = u4s[1]
  *         mdtype_ptr[0] = mdtype
  *         u4_ptr[0] = 0             # <<<<<<<<<<<<<<
@@ -2375,7 +2427,7 @@
  */
   (__pyx_v_u4_ptr[0]) = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":286
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":286
  *         mdtype_ptr[0] = mdtype
  *         u4_ptr[0] = 0
  *         return 1             # <<<<<<<<<<<<<<
@@ -2393,11 +2445,12 @@
   __Pyx_AddTraceback("scipy.io.matlab.mio5_utils.VarReader5.cread_tag");
   __pyx_r = -1;
   __pyx_L0:;
-  __Pyx_FinishRefcountContext();
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":288
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":288
  *         return 1
  * 
  *     cdef object read_element(self,             # <<<<<<<<<<<<<<
@@ -2406,7 +2459,15 @@
  */
 
 static  PyObject *__pyx_f_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_element(struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *__pyx_v_self, __pyx_t_5numpy_uint32_t *__pyx_v_mdtype_ptr, __pyx_t_5numpy_uint32_t *__pyx_v_byte_count_ptr, void **__pyx_v_pp, struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_element *__pyx_optional_args) {
-  int __pyx_v_copy = 1;
+
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":292
+ *                              cnp.uint32_t *byte_count_ptr,
+ *                              void **pp,
+ *                              int copy=True):             # <<<<<<<<<<<<<<
+ *         ''' Read data element into string buffer, return buffer
+ * 
+ */
+  int __pyx_v_copy = ((int)1);
   __pyx_t_5numpy_uint32_t __pyx_v_mdtype;
   __pyx_t_5numpy_uint32_t __pyx_v_byte_count;
   char __pyx_v_tag_data[4];
@@ -2414,21 +2475,22 @@
   int __pyx_v_mod8;
   int __pyx_v_tag_res;
   PyObject *__pyx_r = NULL;
-  struct __pyx_opt_args_5scipy_2io_6matlab_7streams_13GenericStream_read_string __pyx_1;
-  struct __pyx_opt_args_5scipy_2io_6matlab_7streams_13GenericStream_seek __pyx_2;
   int __pyx_t_1;
   int __pyx_t_2;
   PyObject *__pyx_t_3 = NULL;
-  char *__pyx_t_4;
-  __Pyx_SetupRefcountContext("read_element");
+  struct __pyx_opt_args_5scipy_2io_6matlab_7streams_13GenericStream_read_string __pyx_t_4;
+  struct __pyx_opt_args_5scipy_2io_6matlab_7streams_13GenericStream_seek __pyx_t_5;
+  char *__pyx_t_6;
+  __Pyx_RefNannySetupContext("read_element");
   if (__pyx_optional_args) {
     if (__pyx_optional_args->__pyx_n > 0) {
       __pyx_v_copy = __pyx_optional_args->copy;
     }
   }
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
   __pyx_v_data = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":328
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":328
  *         cdef int tag_res = self.cread_tag(mdtype_ptr,
  *                                           byte_count_ptr,
  *                                           tag_data)             # <<<<<<<<<<<<<<
@@ -2438,7 +2500,7 @@
   __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->cread_tag(__pyx_v_self, __pyx_v_mdtype_ptr, __pyx_v_byte_count_ptr, __pyx_v_tag_data); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_tag_res = __pyx_t_1;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":329
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":329
  *                                           byte_count_ptr,
  *                                           tag_data)
  *         mdtype = mdtype_ptr[0]             # <<<<<<<<<<<<<<
@@ -2447,7 +2509,7 @@
  */
   __pyx_v_mdtype = (__pyx_v_mdtype_ptr[0]);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":330
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":330
  *                                           tag_data)
  *         mdtype = mdtype_ptr[0]
  *         byte_count = byte_count_ptr[0]             # <<<<<<<<<<<<<<
@@ -2456,7 +2518,7 @@
  */
   __pyx_v_byte_count = (__pyx_v_byte_count_ptr[0]);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":331
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":331
  *         mdtype = mdtype_ptr[0]
  *         byte_count = byte_count_ptr[0]
  *         if tag_res == 1: # full format             # <<<<<<<<<<<<<<
@@ -2466,22 +2528,22 @@
   __pyx_t_2 = (__pyx_v_tag_res == 1);
   if (__pyx_t_2) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":335
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":335
  *                 byte_count,
  *                 pp,
  *                 copy)             # <<<<<<<<<<<<<<
  *             # Seek to next 64-bit boundary
  *             mod8 = byte_count % 8
  */
-    __pyx_1.__pyx_n = 1;
-    __pyx_1.copy = __pyx_v_copy;
-    __pyx_t_3 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_7streams_GenericStream *)__pyx_v_self->cstream->__pyx_vtab)->read_string(__pyx_v_self->cstream, __pyx_v_byte_count, __pyx_v_pp, &__pyx_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4.__pyx_n = 1;
+    __pyx_t_4.copy = __pyx_v_copy;
+    __pyx_t_3 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_7streams_GenericStream *)__pyx_v_self->cstream->__pyx_vtab)->read_string(__pyx_v_self->cstream, __pyx_v_byte_count, __pyx_v_pp, &__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_v_data);
     __pyx_v_data = __pyx_t_3;
     __pyx_t_3 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":337
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":337
  *                 copy)
  *             # Seek to next 64-bit boundary
  *             mod8 = byte_count % 8             # <<<<<<<<<<<<<<
@@ -2490,7 +2552,7 @@
  */
     __pyx_v_mod8 = (__pyx_v_byte_count % 8);
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":338
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":338
  *             # Seek to next 64-bit boundary
  *             mod8 = byte_count % 8
  *             if mod8:             # <<<<<<<<<<<<<<
@@ -2500,16 +2562,16 @@
     __pyx_t_1 = __pyx_v_mod8;
     if (__pyx_t_1) {
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":339
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":339
  *             mod8 = byte_count % 8
  *             if mod8:
  *                 self.cstream.seek(8 - mod8, 1)             # <<<<<<<<<<<<<<
  *         else: # SDE format, make safer home for data
  *             data = PyString_FromStringAndSize(tag_data, byte_count)
  */
-      __pyx_2.__pyx_n = 1;
-      __pyx_2.whence = 1;
-      __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_7streams_GenericStream *)__pyx_v_self->cstream->__pyx_vtab)->seek(__pyx_v_self->cstream, (8 - __pyx_v_mod8), 0, &__pyx_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5.__pyx_n = 1;
+      __pyx_t_5.whence = 1;
+      __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_7streams_GenericStream *)__pyx_v_self->cstream->__pyx_vtab)->seek(__pyx_v_self->cstream, (8 - __pyx_v_mod8), 0, &__pyx_t_5); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L4;
     }
     __pyx_L4:;
@@ -2517,7 +2579,7 @@
   }
   /*else*/ {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":341
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":341
  *                 self.cstream.seek(8 - mod8, 1)
  *         else: # SDE format, make safer home for data
  *             data = PyString_FromStringAndSize(tag_data, byte_count)             # <<<<<<<<<<<<<<
@@ -2530,19 +2592,19 @@
     __pyx_v_data = __pyx_t_3;
     __pyx_t_3 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":342
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":342
  *         else: # SDE format, make safer home for data
  *             data = PyString_FromStringAndSize(tag_data, byte_count)
  *             pp[0] = <char *>data             # <<<<<<<<<<<<<<
  *         return data
  * 
  */
-    __pyx_t_4 = __Pyx_PyBytes_AsString(__pyx_v_data); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    (__pyx_v_pp[0]) = ((char *)__pyx_t_4);
+    __pyx_t_6 = __Pyx_PyBytes_AsString(__pyx_v_data); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    (__pyx_v_pp[0]) = ((char *)__pyx_t_6);
   }
   __pyx_L3:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":343
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":343
  *             data = PyString_FromStringAndSize(tag_data, byte_count)
  *             pp[0] = <char *>data
  *         return data             # <<<<<<<<<<<<<<
@@ -2562,12 +2624,13 @@
   __pyx_r = 0;
   __pyx_L0:;
   __Pyx_DECREF(__pyx_v_data);
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":345
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":345
  *         return data
  * 
  *     cdef void read_element_into(self,             # <<<<<<<<<<<<<<
@@ -2579,12 +2642,13 @@
   int __pyx_v_mod8;
   int __pyx_v_res;
   __pyx_t_5numpy_uint32_t __pyx_v_byte_count;
-  struct __pyx_opt_args_5scipy_2io_6matlab_7streams_13GenericStream_seek __pyx_1;
   int __pyx_t_1;
   int __pyx_t_2;
-  __Pyx_SetupRefcountContext("read_element_into");
+  struct __pyx_opt_args_5scipy_2io_6matlab_7streams_13GenericStream_seek __pyx_t_3;
+  __Pyx_RefNannySetupContext("read_element_into");
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":374
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":374
  *             mdtype_ptr,
  *             byte_count_ptr,
  *             <char *>ptr)             # <<<<<<<<<<<<<<
@@ -2594,7 +2658,7 @@
   __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->cread_tag(__pyx_v_self, __pyx_v_mdtype_ptr, __pyx_v_byte_count_ptr, ((char *)__pyx_v_ptr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_res = __pyx_t_1;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":375
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":375
  *             byte_count_ptr,
  *             <char *>ptr)
  *         cdef cnp.uint32_t byte_count = byte_count_ptr[0]             # <<<<<<<<<<<<<<
@@ -2603,7 +2667,7 @@
  */
   __pyx_v_byte_count = (__pyx_v_byte_count_ptr[0]);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":376
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":376
  *             <char *>ptr)
  *         cdef cnp.uint32_t byte_count = byte_count_ptr[0]
  *         if res == 1: # full format             # <<<<<<<<<<<<<<
@@ -2613,7 +2677,7 @@
   __pyx_t_2 = (__pyx_v_res == 1);
   if (__pyx_t_2) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":377
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":377
  *         cdef cnp.uint32_t byte_count = byte_count_ptr[0]
  *         if res == 1: # full format
  *             res = self.cstream.read_into(ptr, byte_count)             # <<<<<<<<<<<<<<
@@ -2623,7 +2687,7 @@
     __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_7streams_GenericStream *)__pyx_v_self->cstream->__pyx_vtab)->read_into(__pyx_v_self->cstream, __pyx_v_ptr, __pyx_v_byte_count); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_v_res = __pyx_t_1;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":379
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":379
  *             res = self.cstream.read_into(ptr, byte_count)
  *             # Seek to next 64-bit boundary
  *             mod8 = byte_count % 8             # <<<<<<<<<<<<<<
@@ -2632,7 +2696,7 @@
  */
     __pyx_v_mod8 = (__pyx_v_byte_count % 8);
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":380
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":380
  *             # Seek to next 64-bit boundary
  *             mod8 = byte_count % 8
  *             if mod8:             # <<<<<<<<<<<<<<
@@ -2642,16 +2706,16 @@
     __pyx_t_1 = __pyx_v_mod8;
     if (__pyx_t_1) {
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":381
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":381
  *             mod8 = byte_count % 8
  *             if mod8:
  *                 self.cstream.seek(8 - mod8, 1)             # <<<<<<<<<<<<<<
  * 
  *     cpdef inline cnp.ndarray read_numeric(self, int copy=True):
  */
-      __pyx_1.__pyx_n = 1;
-      __pyx_1.whence = 1;
-      __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_7streams_GenericStream *)__pyx_v_self->cstream->__pyx_vtab)->seek(__pyx_v_self->cstream, (8 - __pyx_v_mod8), 0, &__pyx_1); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3.__pyx_n = 1;
+      __pyx_t_3.whence = 1;
+      __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_7streams_GenericStream *)__pyx_v_self->cstream->__pyx_vtab)->seek(__pyx_v_self->cstream, (8 - __pyx_v_mod8), 0, &__pyx_t_3); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L4;
     }
     __pyx_L4:;
@@ -2663,10 +2727,11 @@
   __pyx_L1_error:;
   __Pyx_WriteUnraisable("scipy.io.matlab.mio5_utils.VarReader5.read_element_into");
   __pyx_L0:;
-  __Pyx_FinishRefcountContext();
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
+  __Pyx_RefNannyFinishContext();
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":383
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":383
  *                 self.cstream.seek(8 - mod8, 1)
  * 
  *     cpdef inline cnp.ndarray read_numeric(self, int copy=True):             # <<<<<<<<<<<<<<
@@ -2675,8 +2740,8 @@
  */
 
 static PyObject *__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_numeric(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static INLINE PyArrayObject *__pyx_f_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_numeric(struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_numeric *__pyx_optional_args) {
-  int __pyx_v_copy = 1;
+static CYTHON_INLINE PyArrayObject *__pyx_f_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_numeric(struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_numeric *__pyx_optional_args) {
+  int __pyx_v_copy = ((int)1);
   __pyx_t_5numpy_uint32_t __pyx_v_mdtype;
   __pyx_t_5numpy_uint32_t __pyx_v_byte_count;
   void *__pyx_v_data_ptr;
@@ -2686,81 +2751,86 @@
   PyArray_Descr *__pyx_v_dt = 0;
   int __pyx_v_flags;
   PyArrayObject *__pyx_r = NULL;
-  PyObject *__pyx_1 = 0;
-  struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_element __pyx_2;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3;
-  int __pyx_t_4;
-  __Pyx_SetupRefcountContext("read_numeric");
+  PyObject *__pyx_t_3 = NULL;
+  struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_element __pyx_t_4;
+  PyObject *__pyx_t_5;
+  int __pyx_t_6;
+  __Pyx_RefNannySetupContext("read_numeric");
   if (__pyx_optional_args) {
     if (__pyx_optional_args->__pyx_n > 0) {
       __pyx_v_copy = __pyx_optional_args->copy;
     }
   }
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
   __pyx_v_el = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
   /* Check if called by wrapper */
   if (unlikely(__pyx_skip_dispatch)) ;
   /* Check if overriden in Python */
   else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
-    __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_kp_read_numeric); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    if (!PyCFunction_Check(__pyx_1) || (PyCFunction_GET_FUNCTION(__pyx_1) != (void *)&__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_numeric)) {
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__read_numeric); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_numeric)) {
       __Pyx_XDECREF(((PyObject *)__pyx_r));
-      __pyx_t_1 = PyInt_FromLong(__pyx_v_copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
-      __Pyx_GIVEREF(__pyx_t_1);
-      __pyx_t_1 = 0;
-      __pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_r = ((PyArrayObject *)__pyx_t_1);
-      __pyx_t_1 = 0;
+      __pyx_t_2 = PyInt_FromLong(__pyx_v_copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
+      __pyx_t_2 = 0;
+      __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_r = ((PyArrayObject *)__pyx_t_2);
+      __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       goto __pyx_L0;
     }
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":396
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":396
  *         cdef cnp.ndarray el
  *         cdef object data = self.read_element(
  *             &mdtype, &byte_count, <void **>&data_ptr, copy)             # <<<<<<<<<<<<<<
  *         cdef cnp.dtype dt = <cnp.dtype>self.dtypes[mdtype]
  *         el_count = byte_count // dt.itemsize
  */
-  __pyx_2.__pyx_n = 1;
-  __pyx_2.copy = __pyx_v_copy;
-  __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_element(__pyx_v_self, (&__pyx_v_mdtype), (&__pyx_v_byte_count), ((void **)(&__pyx_v_data_ptr)), &__pyx_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4.__pyx_n = 1;
+  __pyx_t_4.copy = __pyx_v_copy;
+  __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_element(__pyx_v_self, (&__pyx_v_mdtype), (&__pyx_v_byte_count), ((void **)(&__pyx_v_data_ptr)), &__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_v_data = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":397
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":397
  *         cdef object data = self.read_element(
  *             &mdtype, &byte_count, <void **>&data_ptr, copy)
  *         cdef cnp.dtype dt = <cnp.dtype>self.dtypes[mdtype]             # <<<<<<<<<<<<<<
  *         el_count = byte_count // dt.itemsize
  *         cdef int flags = 0
  */
-  __pyx_t_3 = (__pyx_v_self->dtypes[__pyx_v_mdtype]);
-  __Pyx_INCREF(((PyObject *)((PyArray_Descr *)__pyx_t_3)));
-  __pyx_v_dt = ((PyArray_Descr *)__pyx_t_3);
+  __pyx_t_5 = (__pyx_v_self->dtypes[__pyx_v_mdtype]);
+  __Pyx_INCREF(((PyObject *)((PyArray_Descr *)__pyx_t_5)));
+  __pyx_v_dt = ((PyArray_Descr *)__pyx_t_5);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":398
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":398
  *             &mdtype, &byte_count, <void **>&data_ptr, copy)
  *         cdef cnp.dtype dt = <cnp.dtype>self.dtypes[mdtype]
  *         el_count = byte_count // dt.itemsize             # <<<<<<<<<<<<<<
  *         cdef int flags = 0
  *         if copy:
  */
+  if (unlikely(__pyx_v_dt->elsize == 0)) {
+    PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
   __pyx_v_el_count = (__pyx_v_byte_count / __pyx_v_dt->elsize);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":399
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":399
  *         cdef cnp.dtype dt = <cnp.dtype>self.dtypes[mdtype]
  *         el_count = byte_count // dt.itemsize
  *         cdef int flags = 0             # <<<<<<<<<<<<<<
@@ -2769,17 +2839,17 @@
  */
   __pyx_v_flags = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":400
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":400
  *         el_count = byte_count // dt.itemsize
  *         cdef int flags = 0
  *         if copy:             # <<<<<<<<<<<<<<
  *             flags = cnp.NPY_WRITEABLE
  *         Py_INCREF(<object> dt)
  */
-  __pyx_t_4 = __pyx_v_copy;
-  if (__pyx_t_4) {
+  __pyx_t_6 = __pyx_v_copy;
+  if (__pyx_t_6) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":401
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":401
  *         cdef int flags = 0
  *         if copy:
  *             flags = cnp.NPY_WRITEABLE             # <<<<<<<<<<<<<<
@@ -2791,7 +2861,7 @@
   }
   __pyx_L3:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":402
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":402
  *         if copy:
  *             flags = cnp.NPY_WRITEABLE
  *         Py_INCREF(<object> dt)             # <<<<<<<<<<<<<<
@@ -2800,7 +2870,7 @@
  */
   Py_INCREF(((PyObject *)__pyx_v_dt));
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":410
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":410
  *                                    <void*>data_ptr,
  *                                    flags,
  *                                    <object>NULL)             # <<<<<<<<<<<<<<
@@ -2813,7 +2883,7 @@
   __pyx_v_el = ((PyArrayObject *)__pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":411
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":411
  *                                    flags,
  *                                    <object>NULL)
  *         Py_INCREF(<object> data)             # <<<<<<<<<<<<<<
@@ -2822,7 +2892,7 @@
  */
   Py_INCREF(__pyx_v_data);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":412
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":412
  *                                    <object>NULL)
  *         Py_INCREF(<object> data)
  *         PyArray_Set_BASE(el, data)             # <<<<<<<<<<<<<<
@@ -2831,7 +2901,7 @@
  */
   PyArray_Set_BASE(__pyx_v_el, __pyx_v_data);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":413
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":413
  *         Py_INCREF(<object> data)
  *         PyArray_Set_BASE(el, data)
  *         return el             # <<<<<<<<<<<<<<
@@ -2846,21 +2916,22 @@
   __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_1);
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
   __Pyx_AddTraceback("scipy.io.matlab.mio5_utils.VarReader5.read_numeric");
   __pyx_r = 0;
   __pyx_L0:;
   __Pyx_DECREF((PyObject *)__pyx_v_el);
   __Pyx_XDECREF(__pyx_v_data);
   __Pyx_XDECREF((PyObject *)__pyx_v_dt);
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
   __Pyx_XGIVEREF((PyObject *)__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":383
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":383
  *                 self.cstream.seek(8 - mod8, 1)
  * 
  *     cpdef inline cnp.ndarray read_numeric(self, int copy=True):             # <<<<<<<<<<<<<<
@@ -2873,10 +2944,10 @@
 static PyObject *__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_numeric(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   int __pyx_v_copy;
   PyObject *__pyx_r = NULL;
-  struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_numeric __pyx_1;
   PyObject *__pyx_t_1 = NULL;
-  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_copy,0};
-  __Pyx_SetupRefcountContext("read_numeric");
+  struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_numeric __pyx_t_2;
+  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__copy,0};
+  __Pyx_RefNannySetupContext("read_numeric");
   if (unlikely(__pyx_kwds)) {
     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
     PyObject* values[1] = {0};
@@ -2888,7 +2959,7 @@
     switch (PyTuple_GET_SIZE(__pyx_args)) {
       case  0:
       if (kw_args > 1) {
-        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_copy);
+        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__copy);
         if (unlikely(value)) { values[0] = value; kw_args--; }
       }
     }
@@ -2898,10 +2969,10 @@
     if (values[0]) {
       __pyx_v_copy = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_copy == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
     } else {
-      __pyx_v_copy = 1;
+      __pyx_v_copy = ((int)1);
     }
   } else {
-    __pyx_v_copy = 1;
+    __pyx_v_copy = ((int)1);
     switch (PyTuple_GET_SIZE(__pyx_args)) {
       case  1: __pyx_v_copy = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_copy == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       case  0: break;
@@ -2916,9 +2987,9 @@
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __Pyx_XDECREF(__pyx_r);
-  __pyx_1.__pyx_n = 1;
-  __pyx_1.copy = __pyx_v_copy;
-  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->__pyx_vtab)->read_numeric(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self), 1, &__pyx_1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2.__pyx_n = 1;
+  __pyx_t_2.copy = __pyx_v_copy;
+  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->__pyx_vtab)->read_numeric(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
@@ -2932,11 +3003,11 @@
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":415
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":415
  *         return el
  * 
  *     cdef inline object read_int8_string(self):             # <<<<<<<<<<<<<<
@@ -2944,7 +3015,7 @@
  * 
  */
 
-static INLINE PyObject *__pyx_f_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_int8_string(struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *__pyx_v_self) {
+static CYTHON_INLINE PyObject *__pyx_f_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_int8_string(struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *__pyx_v_self) {
   __pyx_t_5numpy_uint32_t __pyx_v_mdtype;
   __pyx_t_5numpy_uint32_t __pyx_v_byte_count;
   void *__pyx_v_ptr;
@@ -2953,10 +3024,11 @@
   PyObject *__pyx_t_1 = NULL;
   int __pyx_t_2;
   PyObject *__pyx_t_3 = NULL;
-  __Pyx_SetupRefcountContext("read_int8_string");
+  __Pyx_RefNannySetupContext("read_int8_string");
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
   __pyx_v_data = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":427
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":427
  *             void *ptr
  *             object data
  *         data = self.read_element(&mdtype, &byte_count, &ptr)             # <<<<<<<<<<<<<<
@@ -2969,7 +3041,7 @@
   __pyx_v_data = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":428
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":428
  *             object data
  *         data = self.read_element(&mdtype, &byte_count, &ptr)
  *         if mdtype != miINT8:             # <<<<<<<<<<<<<<
@@ -2979,7 +3051,7 @@
   __pyx_t_2 = (__pyx_v_mdtype != __pyx_e_5scipy_2io_6matlab_10mio5_utils_miINT8);
   if (__pyx_t_2) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":429
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":429
  *         data = self.read_element(&mdtype, &byte_count, &ptr)
  *         if mdtype != miINT8:
  *             raise TypeError('Expecting miINT8 as data type')             # <<<<<<<<<<<<<<
@@ -2987,13 +3059,13 @@
  * 
  */
     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-    __Pyx_INCREF(__pyx_kp_49);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_49);
-    __Pyx_GIVEREF(__pyx_kp_49);
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
+    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_4));
+    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __Pyx_Raise(__pyx_t_3, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -3001,7 +3073,7 @@
   }
   __pyx_L3:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":430
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":430
  *         if mdtype != miINT8:
  *             raise TypeError('Expecting miINT8 as data type')
  *         return data             # <<<<<<<<<<<<<<
@@ -3022,12 +3094,13 @@
   __pyx_r = 0;
   __pyx_L0:;
   __Pyx_DECREF(__pyx_v_data);
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":432
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":432
  *         return data
  * 
  *     cdef int read_into_int32s(self, cnp.int32_t *int32p) except -1:             # <<<<<<<<<<<<<<
@@ -3045,9 +3118,11 @@
   PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
   int __pyx_t_4;
-  __Pyx_SetupRefcountContext("read_into_int32s");
+  int __pyx_t_5;
+  __Pyx_RefNannySetupContext("read_into_int32s");
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":449
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":449
  *             cnp.uint32_t mdtype, byte_count
  *             int i
  *         self.read_element_into(&mdtype, &byte_count, <void *>int32p)             # <<<<<<<<<<<<<<
@@ -3056,7 +3131,7 @@
  */
   ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_element_into(__pyx_v_self, (&__pyx_v_mdtype), (&__pyx_v_byte_count), ((void *)__pyx_v_int32p));
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":450
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":450
  *             int i
  *         self.read_element_into(&mdtype, &byte_count, <void *>int32p)
  *         if mdtype != miINT32:             # <<<<<<<<<<<<<<
@@ -3066,7 +3141,7 @@
   __pyx_t_1 = (__pyx_v_mdtype != __pyx_e_5scipy_2io_6matlab_10mio5_utils_miINT32);
   if (__pyx_t_1) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":451
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":451
  *         self.read_element_into(&mdtype, &byte_count, <void *>int32p)
  *         if mdtype != miINT32:
  *             raise TypeError('Expecting miINT32 as data type')             # <<<<<<<<<<<<<<
@@ -3074,18 +3149,18 @@
  *         cdef int n_ints = byte_count // 4
  */
     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __Pyx_INCREF(__pyx_kp_50);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_50);
-    __Pyx_GIVEREF(__pyx_kp_50);
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
+    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5));
+    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_Raise(__pyx_t_3, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":452
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":452
  *         if mdtype != miINT32:
  *             raise TypeError('Expecting miINT32 as data type')
  *             return -1             # <<<<<<<<<<<<<<
@@ -3098,7 +3173,7 @@
   }
   __pyx_L3:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":453
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":453
  *             raise TypeError('Expecting miINT32 as data type')
  *             return -1
  *         cdef int n_ints = byte_count // 4             # <<<<<<<<<<<<<<
@@ -3107,7 +3182,7 @@
  */
   __pyx_v_n_ints = (__pyx_v_byte_count / 4);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":454
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":454
  *             return -1
  *         cdef int n_ints = byte_count // 4
  *         if self.is_swapped:             # <<<<<<<<<<<<<<
@@ -3117,17 +3192,18 @@
   __pyx_t_4 = __pyx_v_self->is_swapped;
   if (__pyx_t_4) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":455
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":455
  *         cdef int n_ints = byte_count // 4
  *         if self.is_swapped:
  *             for i in range(n_ints):             # <<<<<<<<<<<<<<
  *                 int32p[i] = byteswap_u4(int32p[i])
  *         return n_ints
  */
-    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_v_n_ints; __pyx_t_4+=1) {
-      __pyx_v_i = __pyx_t_4;
+    __pyx_t_4 = __pyx_v_n_ints;
+    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
+      __pyx_v_i = __pyx_t_5;
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":456
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":456
  *         if self.is_swapped:
  *             for i in range(n_ints):
  *                 int32p[i] = byteswap_u4(int32p[i])             # <<<<<<<<<<<<<<
@@ -3140,7 +3216,7 @@
   }
   __pyx_L4:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":457
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":457
  *             for i in range(n_ints):
  *                 int32p[i] = byteswap_u4(int32p[i])
  *         return n_ints             # <<<<<<<<<<<<<<
@@ -3158,11 +3234,12 @@
   __Pyx_AddTraceback("scipy.io.matlab.mio5_utils.VarReader5.read_into_int32s");
   __pyx_r = -1;
   __pyx_L0:;
-  __Pyx_FinishRefcountContext();
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":459
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":459
  *         return n_ints
  * 
  *     def read_full_tag(self):             # <<<<<<<<<<<<<<
@@ -3179,9 +3256,9 @@
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
-  __Pyx_SetupRefcountContext("read_full_tag");
+  __Pyx_RefNannySetupContext("read_full_tag");
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":476
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":476
  *         '''
  *         cdef cnp.uint32_t mdtype, byte_count
  *         self.cread_full_tag(&mdtype, &byte_count)             # <<<<<<<<<<<<<<
@@ -3190,7 +3267,7 @@
  */
   ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->__pyx_vtab)->cread_full_tag(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self), (&__pyx_v_mdtype), (&__pyx_v_byte_count));
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":477
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":477
  *         cdef cnp.uint32_t mdtype, byte_count
  *         self.cread_full_tag(&mdtype, &byte_count)
  *         return mdtype, byte_count             # <<<<<<<<<<<<<<
@@ -3203,14 +3280,14 @@
   __pyx_t_2 = __Pyx_PyInt_to_py_npy_uint32(__pyx_v_byte_count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+  __Pyx_GOTREF(__pyx_t_3);
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
   __Pyx_GIVEREF(__pyx_t_1);
   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
   __pyx_t_1 = 0;
   __pyx_t_2 = 0;
-  __pyx_r = ((PyObject *)__pyx_t_3);
+  __pyx_r = __pyx_t_3;
   __pyx_t_3 = 0;
   goto __pyx_L0;
 
@@ -3224,11 +3301,11 @@
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":479
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":479
  *         return mdtype, byte_count
  * 
  *     cdef void cread_full_tag(self,             # <<<<<<<<<<<<<<
@@ -3239,9 +3316,10 @@
 static  void __pyx_f_5scipy_2io_6matlab_10mio5_utils_10VarReader5_cread_full_tag(struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *__pyx_v_self, __pyx_t_5numpy_uint32_t *__pyx_v_mdtype, __pyx_t_5numpy_uint32_t *__pyx_v_byte_count) {
   __pyx_t_5numpy_uint32_t __pyx_v_u4s[2];
   int __pyx_t_1;
-  __Pyx_SetupRefcountContext("cread_full_tag");
+  __Pyx_RefNannySetupContext("cread_full_tag");
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":484
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":484
  *         ''' C method for reading full u4, u4 tag from stream'''
  *         cdef cnp.uint32_t u4s[2]
  *         self.cstream.read_into(<void *>u4s, 8)             # <<<<<<<<<<<<<<
@@ -3250,7 +3328,7 @@
  */
   __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_7streams_GenericStream *)__pyx_v_self->cstream->__pyx_vtab)->read_into(__pyx_v_self->cstream, ((void *)__pyx_v_u4s), 8); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":485
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":485
  *         cdef cnp.uint32_t u4s[2]
  *         self.cstream.read_into(<void *>u4s, 8)
  *         if self.is_swapped:             # <<<<<<<<<<<<<<
@@ -3260,7 +3338,7 @@
   __pyx_t_1 = __pyx_v_self->is_swapped;
   if (__pyx_t_1) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":486
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":486
  *         self.cstream.read_into(<void *>u4s, 8)
  *         if self.is_swapped:
  *             mdtype[0] = byteswap_u4(u4s[0])             # <<<<<<<<<<<<<<
@@ -3269,7 +3347,7 @@
  */
     (__pyx_v_mdtype[0]) = __pyx_f_5scipy_2io_6matlab_10mio5_utils_byteswap_u4((__pyx_v_u4s[0]), 0);
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":487
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":487
  *         if self.is_swapped:
  *             mdtype[0] = byteswap_u4(u4s[0])
  *             byte_count[0] = byteswap_u4(u4s[1])             # <<<<<<<<<<<<<<
@@ -3281,7 +3359,7 @@
   }
   /*else*/ {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":489
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":489
  *             byte_count[0] = byteswap_u4(u4s[1])
  *         else:
  *             mdtype[0] = u4s[0]             # <<<<<<<<<<<<<<
@@ -3290,7 +3368,7 @@
  */
     (__pyx_v_mdtype[0]) = (__pyx_v_u4s[0]);
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":490
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":490
  *         else:
  *             mdtype[0] = u4s[0]
  *             byte_count[0] = u4s[1]             # <<<<<<<<<<<<<<
@@ -3305,10 +3383,11 @@
   __pyx_L1_error:;
   __Pyx_WriteUnraisable("scipy.io.matlab.mio5_utils.VarReader5.cread_full_tag");
   __pyx_L0:;
-  __Pyx_FinishRefcountContext();
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
+  __Pyx_RefNannyFinishContext();
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":492
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":492
  *             byte_count[0] = u4s[1]
  * 
  *     cpdef VarHeader5 read_header(self):             # <<<<<<<<<<<<<<
@@ -3325,61 +3404,62 @@
   int __pyx_v_i;
   struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *__pyx_v_header;
   struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *__pyx_r = NULL;
-  PyObject *__pyx_1 = 0;
   PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
+  PyObject *__pyx_t_2 = NULL;
   int __pyx_t_3;
-  PyObject *__pyx_t_4 = NULL;
-  __Pyx_SetupRefcountContext("read_header");
+  int __pyx_t_4;
+  int __pyx_t_5;
+  __Pyx_RefNannySetupContext("read_header");
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
   __pyx_v_header = ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *)Py_None); __Pyx_INCREF(Py_None);
   /* Check if called by wrapper */
   if (unlikely(__pyx_skip_dispatch)) ;
   /* Check if overriden in Python */
   else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
-    __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_kp_read_header); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    if (!PyCFunction_Check(__pyx_1) || (PyCFunction_GET_FUNCTION(__pyx_1) != (void *)&__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_header)) {
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__read_header); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_header)) {
       __Pyx_XDECREF(((PyObject *)__pyx_r));
-      __pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-      if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5scipy_2io_6matlab_10mio5_utils_VarHeader5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_r = ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *)__pyx_t_1);
-      __pyx_t_1 = 0;
+      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5scipy_2io_6matlab_10mio5_utils_VarHeader5))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_r = ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *)__pyx_t_2);
+      __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       goto __pyx_L0;
     }
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":506
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":506
  *             VarHeader5 header
  *         # Read and discard mdtype and byte_count
  *         self.cstream.read_into(<void *>u4s, 8)             # <<<<<<<<<<<<<<
  *         # get array flags and nzmax
  *         self.cstream.read_into(<void *>u4s, 8)
  */
-  __pyx_t_2 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_7streams_GenericStream *)__pyx_v_self->cstream->__pyx_vtab)->read_into(__pyx_v_self->cstream, ((void *)__pyx_v_u4s), 8); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_7streams_GenericStream *)__pyx_v_self->cstream->__pyx_vtab)->read_into(__pyx_v_self->cstream, ((void *)__pyx_v_u4s), 8); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":508
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":508
  *         self.cstream.read_into(<void *>u4s, 8)
  *         # get array flags and nzmax
  *         self.cstream.read_into(<void *>u4s, 8)             # <<<<<<<<<<<<<<
  *         if self.is_swapped:
  *             flags_class = byteswap_u4(u4s[0])
  */
-  __pyx_t_2 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_7streams_GenericStream *)__pyx_v_self->cstream->__pyx_vtab)->read_into(__pyx_v_self->cstream, ((void *)__pyx_v_u4s), 8); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_7streams_GenericStream *)__pyx_v_self->cstream->__pyx_vtab)->read_into(__pyx_v_self->cstream, ((void *)__pyx_v_u4s), 8); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":509
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":509
  *         # get array flags and nzmax
  *         self.cstream.read_into(<void *>u4s, 8)
  *         if self.is_swapped:             # <<<<<<<<<<<<<<
  *             flags_class = byteswap_u4(u4s[0])
  *             nzmax = byteswap_u4(u4s[1])
  */
-  __pyx_t_2 = __pyx_v_self->is_swapped;
-  if (__pyx_t_2) {
+  __pyx_t_3 = __pyx_v_self->is_swapped;
+  if (__pyx_t_3) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":510
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":510
  *         self.cstream.read_into(<void *>u4s, 8)
  *         if self.is_swapped:
  *             flags_class = byteswap_u4(u4s[0])             # <<<<<<<<<<<<<<
@@ -3388,7 +3468,7 @@
  */
     __pyx_v_flags_class = __pyx_f_5scipy_2io_6matlab_10mio5_utils_byteswap_u4((__pyx_v_u4s[0]), 0);
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":511
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":511
  *         if self.is_swapped:
  *             flags_class = byteswap_u4(u4s[0])
  *             nzmax = byteswap_u4(u4s[1])             # <<<<<<<<<<<<<<
@@ -3400,7 +3480,7 @@
   }
   /*else*/ {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":513
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":513
  *             nzmax = byteswap_u4(u4s[1])
  *         else:
  *             flags_class = u4s[0]             # <<<<<<<<<<<<<<
@@ -3409,7 +3489,7 @@
  */
     __pyx_v_flags_class = (__pyx_v_u4s[0]);
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":514
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":514
  *         else:
  *             flags_class = u4s[0]
  *             nzmax = u4s[1]             # <<<<<<<<<<<<<<
@@ -3420,7 +3500,7 @@
   }
   __pyx_L3:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":515
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":515
  *             flags_class = u4s[0]
  *             nzmax = u4s[1]
  *         header = VarHeader5()             # <<<<<<<<<<<<<<
@@ -3429,12 +3509,11 @@
  */
   __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5scipy_2io_6matlab_10mio5_utils_VarHeader5)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5scipy_2io_6matlab_10mio5_utils_VarHeader5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(((PyObject *)__pyx_v_header));
   __pyx_v_header = ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *)__pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":516
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":516
  *             nzmax = u4s[1]
  *         header = VarHeader5()
  *         mc = flags_class & 0xFF             # <<<<<<<<<<<<<<
@@ -3443,7 +3522,7 @@
  */
   __pyx_v_mc = (__pyx_v_flags_class & 0xFF);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":517
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":517
  *         header = VarHeader5()
  *         mc = flags_class & 0xFF
  *         header.mclass = mc             # <<<<<<<<<<<<<<
@@ -3452,7 +3531,7 @@
  */
   __pyx_v_header->mclass = __pyx_v_mc;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":518
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":518
  *         mc = flags_class & 0xFF
  *         header.mclass = mc
  *         header.is_logical = flags_class >> 9 & 1             # <<<<<<<<<<<<<<
@@ -3461,7 +3540,7 @@
  */
   __pyx_v_header->is_logical = ((__pyx_v_flags_class >> 9) & 1);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":519
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":519
  *         header.mclass = mc
  *         header.is_logical = flags_class >> 9 & 1
  *         header.is_global = flags_class >> 10 & 1             # <<<<<<<<<<<<<<
@@ -3470,7 +3549,7 @@
  */
   __pyx_v_header->is_global = ((__pyx_v_flags_class >> 10) & 1);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":520
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":520
  *         header.is_logical = flags_class >> 9 & 1
  *         header.is_global = flags_class >> 10 & 1
  *         header.is_complex = flags_class >> 11 & 1             # <<<<<<<<<<<<<<
@@ -3479,7 +3558,7 @@
  */
   __pyx_v_header->is_complex = ((__pyx_v_flags_class >> 11) & 1);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":521
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":521
  *         header.is_global = flags_class >> 10 & 1
  *         header.is_complex = flags_class >> 11 & 1
  *         header.nzmax = nzmax             # <<<<<<<<<<<<<<
@@ -3488,17 +3567,17 @@
  */
   __pyx_v_header->nzmax = __pyx_v_nzmax;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":524
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":524
  *         # all miMATRIX types except the mxOPAQUE_CLASS have dims and a
  *         # name.
  *         if mc == mxOPAQUE_CLASS:             # <<<<<<<<<<<<<<
  *             header.name = None
  *             header.dims = None
  */
-  __pyx_t_3 = (__pyx_v_mc == __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxOPAQUE_CLASS);
-  if (__pyx_t_3) {
+  __pyx_t_4 = (__pyx_v_mc == __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxOPAQUE_CLASS);
+  if (__pyx_t_4) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":525
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":525
  *         # name.
  *         if mc == mxOPAQUE_CLASS:
  *             header.name = None             # <<<<<<<<<<<<<<
@@ -3511,7 +3590,7 @@
     __Pyx_DECREF(__pyx_v_header->name);
     __pyx_v_header->name = Py_None;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":526
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":526
  *         if mc == mxOPAQUE_CLASS:
  *             header.name = None
  *             header.dims = None             # <<<<<<<<<<<<<<
@@ -3524,7 +3603,7 @@
     __Pyx_DECREF(__pyx_v_header->dims);
     __pyx_v_header->dims = Py_None;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":527
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":527
  *             header.name = None
  *             header.dims = None
  *             return header             # <<<<<<<<<<<<<<
@@ -3539,27 +3618,27 @@
   }
   __pyx_L4:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":528
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":528
  *             header.dims = None
  *             return header
  *         header.n_dims = self.read_into_int32s(header.dims_ptr)             # <<<<<<<<<<<<<<
  *         if header.n_dims > _MAT_MAXDIMS:
  *             raise ValueError('Too many dimensions (%d) for numpy arrays'
  */
-  __pyx_t_2 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_into_int32s(__pyx_v_self, __pyx_v_header->dims_ptr); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_header->n_dims = __pyx_t_2;
+  __pyx_t_3 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_into_int32s(__pyx_v_self, __pyx_v_header->dims_ptr); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_header->n_dims = __pyx_t_3;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":529
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":529
  *             return header
  *         header.n_dims = self.read_into_int32s(header.dims_ptr)
  *         if header.n_dims > _MAT_MAXDIMS:             # <<<<<<<<<<<<<<
  *             raise ValueError('Too many dimensions (%d) for numpy arrays'
  *                              % header.n_dims)
  */
-  __pyx_t_3 = (__pyx_v_header->n_dims > 32);
-  if (__pyx_t_3) {
+  __pyx_t_4 = (__pyx_v_header->n_dims > 32);
+  if (__pyx_t_4) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":531
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":531
  *         if header.n_dims > _MAT_MAXDIMS:
  *             raise ValueError('Too many dimensions (%d) for numpy arrays'
  *                              % header.n_dims)             # <<<<<<<<<<<<<<
@@ -3568,65 +3647,66 @@
  */
     __pyx_t_1 = PyInt_FromLong(__pyx_v_header->n_dims); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_4 = PyNumber_Remainder(__pyx_kp_51, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_6), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
-    __Pyx_GIVEREF(__pyx_t_4);
-    __pyx_t_4 = 0;
-    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __Pyx_Raise(__pyx_t_4, 0, 0);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_GOTREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    __pyx_t_2 = 0;
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_Raise(__pyx_t_2, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":533
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":533
  *                              % header.n_dims)
  *         # convert dims to list
  *         header.dims = []             # <<<<<<<<<<<<<<
  *         for i in range(header.n_dims):
  *             header.dims.append(header.dims_ptr[i])
  */
-  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
+  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
   __Pyx_GOTREF(__pyx_v_header->dims);
   __Pyx_DECREF(__pyx_v_header->dims);
-  __pyx_v_header->dims = ((PyObject *)__pyx_t_4);
-  __pyx_t_4 = 0;
+  __pyx_v_header->dims = ((PyObject *)__pyx_t_2);
+  __pyx_t_2 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":534
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":534
  *         # convert dims to list
  *         header.dims = []
  *         for i in range(header.n_dims):             # <<<<<<<<<<<<<<
  *             header.dims.append(header.dims_ptr[i])
  *         header.name = self.read_int8_string()
  */
-  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_v_header->n_dims; __pyx_t_2+=1) {
-    __pyx_v_i = __pyx_t_2;
+  __pyx_t_3 = __pyx_v_header->n_dims;
+  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_3; __pyx_t_5+=1) {
+    __pyx_v_i = __pyx_t_5;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":535
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":535
  *         header.dims = []
  *         for i in range(header.n_dims):
  *             header.dims.append(header.dims_ptr[i])             # <<<<<<<<<<<<<<
  *         header.name = self.read_int8_string()
  *         return header
  */
-    __pyx_t_4 = __Pyx_PyInt_to_py_npy_int32((__pyx_v_header->dims_ptr[__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_header->dims, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32((__pyx_v_header->dims_ptr[__pyx_v_i])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_header->dims, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":536
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":536
  *         for i in range(header.n_dims):
  *             header.dims.append(header.dims_ptr[i])
  *         header.name = self.read_int8_string()             # <<<<<<<<<<<<<<
@@ -3641,7 +3721,7 @@
   __pyx_v_header->name = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":537
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":537
  *             header.dims.append(header.dims_ptr[i])
  *         header.name = self.read_int8_string()
  *         return header             # <<<<<<<<<<<<<<
@@ -3656,19 +3736,19 @@
   __pyx_r = ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *)Py_None); __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_1);
   __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_2);
   __Pyx_AddTraceback("scipy.io.matlab.mio5_utils.VarReader5.read_header");
   __pyx_r = 0;
   __pyx_L0:;
   __Pyx_DECREF((PyObject *)__pyx_v_header);
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
   __Pyx_XGIVEREF((PyObject *)__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":492
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":492
  *             byte_count[0] = u4s[1]
  * 
  *     cpdef VarHeader5 read_header(self):             # <<<<<<<<<<<<<<
@@ -3681,7 +3761,7 @@
 static PyObject *__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_header(PyObject *__pyx_v_self, PyObject *unused) {
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
-  __Pyx_SetupRefcountContext("read_header");
+  __Pyx_RefNannySetupContext("read_header");
   __Pyx_XDECREF(__pyx_r);
   __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->__pyx_vtab)->read_header(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self), 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
@@ -3697,11 +3777,11 @@
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":539
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":539
  *         return header
  * 
  *     cdef inline size_t size_from_header(self, VarHeader5 header):             # <<<<<<<<<<<<<<
@@ -3709,7 +3789,7 @@
  * 
  */
 
-static INLINE size_t __pyx_f_5scipy_2io_6matlab_10mio5_utils_10VarReader5_size_from_header(struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *__pyx_v_self, struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *__pyx_v_header) {
+static CYTHON_INLINE size_t __pyx_f_5scipy_2io_6matlab_10mio5_utils_10VarReader5_size_from_header(struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *__pyx_v_self, struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *__pyx_v_header) {
   size_t __pyx_v_size;
   PyObject *__pyx_v_i;
   size_t __pyx_r;
@@ -3717,10 +3797,12 @@
   PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
   Py_ssize_t __pyx_t_4;
-  __Pyx_SetupRefcountContext("size_from_header");
+  __Pyx_RefNannySetupContext("size_from_header");
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
+  __Pyx_INCREF((PyObject *)__pyx_v_header);
   __pyx_v_i = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":556
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":556
  *         '''
  *         # calculate number of items in array from dims product
  *         cdef size_t size = 1             # <<<<<<<<<<<<<<
@@ -3729,7 +3811,7 @@
  */
   __pyx_v_size = 1;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":557
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":557
  *         # calculate number of items in array from dims product
  *         cdef size_t size = 1
  *         for i in range(header.n_dims):             # <<<<<<<<<<<<<<
@@ -3739,13 +3821,13 @@
   __pyx_t_2 = PyInt_FromLong(__pyx_v_header->n_dims); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+  __Pyx_GOTREF(__pyx_t_3);
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
   __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
     __pyx_t_1 = 0; __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3);
   } else {
@@ -3772,7 +3854,7 @@
     __pyx_v_i = __pyx_t_2;
     __pyx_t_2 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":558
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":558
  *         cdef size_t size = 1
  *         for i in range(header.n_dims):
  *             size *= header.dims_ptr[i]             # <<<<<<<<<<<<<<
@@ -3784,7 +3866,7 @@
   }
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":559
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":559
  *         for i in range(header.n_dims):
  *             size *= header.dims_ptr[i]
  *         return size             # <<<<<<<<<<<<<<
@@ -3803,11 +3885,13 @@
   __pyx_r = 0;
   __pyx_L0:;
   __Pyx_DECREF(__pyx_v_i);
-  __Pyx_FinishRefcountContext();
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
+  __Pyx_DECREF((PyObject *)__pyx_v_header);
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":561
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":561
  *         return size
  * 
  *     cdef read_mi_matrix(self, int process=1):             # <<<<<<<<<<<<<<
@@ -3816,26 +3900,26 @@
  */
 
 static  PyObject *__pyx_f_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_mi_matrix(struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *__pyx_v_self, struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_mi_matrix *__pyx_optional_args) {
-  int __pyx_v_process = 1;
+  int __pyx_v_process = ((int)1);
   struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *__pyx_v_header;
   __pyx_t_5numpy_uint32_t __pyx_v_mdtype;
   __pyx_t_5numpy_uint32_t __pyx_v_byte_count;
   PyObject *__pyx_r = NULL;
-  PyObject *__pyx_1 = 0;
-  struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_array_from_header __pyx_2;
   int __pyx_t_1;
   PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
   PyObject *__pyx_t_4 = NULL;
-  __Pyx_SetupRefcountContext("read_mi_matrix");
+  struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_array_from_header __pyx_t_5;
+  __Pyx_RefNannySetupContext("read_mi_matrix");
   if (__pyx_optional_args) {
     if (__pyx_optional_args->__pyx_n > 0) {
       __pyx_v_process = __pyx_optional_args->process;
     }
   }
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
   __pyx_v_header = ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *)Py_None); __Pyx_INCREF(Py_None);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":582
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":582
  *             object arr
  *         # read full tag
  *         self.cread_full_tag(&mdtype, &byte_count)             # <<<<<<<<<<<<<<
@@ -3844,7 +3928,7 @@
  */
   ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->cread_full_tag(__pyx_v_self, (&__pyx_v_mdtype), (&__pyx_v_byte_count));
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":583
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":583
  *         # read full tag
  *         self.cread_full_tag(&mdtype, &byte_count)
  *         if mdtype != miMATRIX:             # <<<<<<<<<<<<<<
@@ -3854,7 +3938,7 @@
   __pyx_t_1 = (__pyx_v_mdtype != __pyx_e_5scipy_2io_6matlab_10mio5_utils_miMATRIX);
   if (__pyx_t_1) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":584
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":584
  *         self.cread_full_tag(&mdtype, &byte_count)
  *         if mdtype != miMATRIX:
  *             raise TypeError('Expecting matrix here')             # <<<<<<<<<<<<<<
@@ -3862,13 +3946,13 @@
  *             if process and self.squeeze_me:
  */
     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __Pyx_INCREF(__pyx_kp_52);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_52);
-    __Pyx_GIVEREF(__pyx_kp_52);
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_7));
+    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_7));
+    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_7));
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_Raise(__pyx_t_3, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -3876,7 +3960,7 @@
   }
   __pyx_L3:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":585
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":585
  *         if mdtype != miMATRIX:
  *             raise TypeError('Expecting matrix here')
  *         if byte_count == 0: # empty matrix             # <<<<<<<<<<<<<<
@@ -3886,7 +3970,7 @@
   __pyx_t_1 = (__pyx_v_byte_count == 0);
   if (__pyx_t_1) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":586
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":586
  *             raise TypeError('Expecting matrix here')
  *         if byte_count == 0: # empty matrix
  *             if process and self.squeeze_me:             # <<<<<<<<<<<<<<
@@ -3900,7 +3984,7 @@
     }
     if (__pyx_t_1) {
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":587
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":587
  *         if byte_count == 0: # empty matrix
  *             if process and self.squeeze_me:
  *                 return np.array([])             # <<<<<<<<<<<<<<
@@ -3908,30 +3992,30 @@
  *                 return np.array([[]])
  */
       __Pyx_XDECREF(__pyx_r);
-      __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_1);
-      __pyx_t_3 = PyObject_GetAttr(__pyx_1, __pyx_kp_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_2));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
-      __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-      __pyx_r = __pyx_t_2;
-      __pyx_t_2 = 0;
+      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3));
+      __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
+      __pyx_t_3 = 0;
+      __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_r = __pyx_t_3;
+      __pyx_t_3 = 0;
       goto __pyx_L0;
       goto __pyx_L5;
     }
     /*else*/ {
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":589
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":589
  *                 return np.array([])
  *             else:
  *                 return np.array([[]])             # <<<<<<<<<<<<<<
@@ -3939,29 +4023,29 @@
  *         return self.array_from_header(header, process)
  */
       __Pyx_XDECREF(__pyx_r);
-      __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_1);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-      PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
-      __pyx_t_4 = 0;
-      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3));
+      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+      PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
       __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
       __pyx_t_3 = 0;
-      __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-      __pyx_r = __pyx_t_3;
-      __pyx_t_3 = 0;
+      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
+      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+      __pyx_t_2 = 0;
+      __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_r = __pyx_t_2;
+      __pyx_t_2 = 0;
       goto __pyx_L0;
     }
     __pyx_L5:;
@@ -3969,20 +4053,20 @@
   }
   __pyx_L4:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":590
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":590
  *             else:
  *                 return np.array([[]])
  *         header = self.read_header()             # <<<<<<<<<<<<<<
  *         return self.array_from_header(header, process)
  * 
  */
-  __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_header(__pyx_v_self, 0)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_header(__pyx_v_self, 0)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(((PyObject *)__pyx_v_header));
-  __pyx_v_header = ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *)__pyx_t_3);
-  __pyx_t_3 = 0;
+  __pyx_v_header = ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *)__pyx_t_2);
+  __pyx_t_2 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":591
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":591
  *                 return np.array([[]])
  *         header = self.read_header()
  *         return self.array_from_header(header, process)             # <<<<<<<<<<<<<<
@@ -3990,18 +4074,17 @@
  *     cpdef array_from_header(self, VarHeader5 header, int process=1):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_2.__pyx_n = 1;
-  __pyx_2.process = __pyx_v_process;
-  __pyx_t_3 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->array_from_header(__pyx_v_self, __pyx_v_header, 0, &__pyx_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_r = __pyx_t_3;
-  __pyx_t_3 = 0;
+  __pyx_t_5.__pyx_n = 1;
+  __pyx_t_5.process = __pyx_v_process;
+  __pyx_t_2 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->array_from_header(__pyx_v_self, __pyx_v_header, 0, &__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
   goto __pyx_L0;
 
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_1);
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_4);
@@ -4009,12 +4092,13 @@
   __pyx_r = 0;
   __pyx_L0:;
   __Pyx_DECREF((PyObject *)__pyx_v_header);
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":593
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":593
  *         return self.array_from_header(header, process)
  * 
  *     cpdef array_from_header(self, VarHeader5 header, int process=1):             # <<<<<<<<<<<<<<
@@ -4024,25 +4108,26 @@
 
 static PyObject *__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_array_from_header(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static  PyObject *__pyx_f_5scipy_2io_6matlab_10mio5_utils_10VarReader5_array_from_header(struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *__pyx_v_self, struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *__pyx_v_header, int __pyx_skip_dispatch, struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_array_from_header *__pyx_optional_args) {
-  int __pyx_v_process = 1;
+  int __pyx_v_process = ((int)1);
   PyObject *__pyx_v_arr;
   PyArray_Descr *__pyx_v_mat_dtype;
   int __pyx_v_mc;
   PyObject *__pyx_v_classname;
   PyObject *__pyx_r = NULL;
-  PyObject *__pyx_1 = 0;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
+  PyObject *__pyx_t_3 = NULL;
   int __pyx_t_4;
-  PyObject *__pyx_t_5;
-  PyObject *__pyx_t_6 = NULL;
-  __Pyx_SetupRefcountContext("array_from_header");
+  int __pyx_t_5;
+  PyObject *__pyx_t_6;
+  __Pyx_RefNannySetupContext("array_from_header");
   if (__pyx_optional_args) {
     if (__pyx_optional_args->__pyx_n > 0) {
       __pyx_v_process = __pyx_optional_args->process;
     }
   }
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
+  __Pyx_INCREF((PyObject *)__pyx_v_header);
   __pyx_v_arr = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_mat_dtype = ((PyArray_Descr *)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_classname = Py_None; __Pyx_INCREF(Py_None);
@@ -4050,32 +4135,32 @@
   if (unlikely(__pyx_skip_dispatch)) ;
   /* Check if overriden in Python */
   else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
-    __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_kp_array_from_header); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    if (!PyCFunction_Check(__pyx_1) || (PyCFunction_GET_FUNCTION(__pyx_1) != (void *)&__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_array_from_header)) {
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__array_from_header); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_array_from_header)) {
       __Pyx_XDECREF(__pyx_r);
-      __pyx_t_1 = PyInt_FromLong(__pyx_v_process); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+      __pyx_t_2 = PyInt_FromLong(__pyx_v_process); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_INCREF(((PyObject *)__pyx_v_header));
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_header));
+      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_header));
       __Pyx_GIVEREF(((PyObject *)__pyx_v_header));
-      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
-      __Pyx_GIVEREF(__pyx_t_1);
-      __pyx_t_1 = 0;
-      __pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      __pyx_r = __pyx_t_1;
-      __pyx_t_1 = 0;
+      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
+      __pyx_t_2 = 0;
+      __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_r = __pyx_t_2;
+      __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       goto __pyx_L0;
     }
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":611
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":611
  *             object arr
  *             cnp.dtype mat_dtype
  *         cdef int mc = header.mclass             # <<<<<<<<<<<<<<
@@ -4084,7 +4169,7 @@
  */
   __pyx_v_mc = __pyx_v_header->mclass;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":612
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":612
  *             cnp.dtype mat_dtype
  *         cdef int mc = header.mclass
  *         if (mc == mxDOUBLE_CLASS             # <<<<<<<<<<<<<<
@@ -4093,7 +4178,7 @@
  */
   switch (__pyx_v_mc) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":613
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":613
  *         cdef int mc = header.mclass
  *         if (mc == mxDOUBLE_CLASS
  *             or mc == mxSINGLE_CLASS             # <<<<<<<<<<<<<<
@@ -4102,7 +4187,7 @@
  */
     case __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxDOUBLE_CLASS:
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":614
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":614
  *         if (mc == mxDOUBLE_CLASS
  *             or mc == mxSINGLE_CLASS
  *             or mc == mxINT8_CLASS             # <<<<<<<<<<<<<<
@@ -4111,7 +4196,7 @@
  */
     case __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxSINGLE_CLASS:
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":615
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":615
  *             or mc == mxSINGLE_CLASS
  *             or mc == mxINT8_CLASS
  *             or mc == mxUINT8_CLASS             # <<<<<<<<<<<<<<
@@ -4120,7 +4205,7 @@
  */
     case __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxINT8_CLASS:
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":616
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":616
  *             or mc == mxINT8_CLASS
  *             or mc == mxUINT8_CLASS
  *             or mc == mxINT16_CLASS             # <<<<<<<<<<<<<<
@@ -4129,7 +4214,7 @@
  */
     case __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxUINT8_CLASS:
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":617
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":617
  *             or mc == mxUINT8_CLASS
  *             or mc == mxINT16_CLASS
  *             or mc == mxUINT16_CLASS             # <<<<<<<<<<<<<<
@@ -4138,7 +4223,7 @@
  */
     case __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxINT16_CLASS:
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":618
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":618
  *             or mc == mxINT16_CLASS
  *             or mc == mxUINT16_CLASS
  *             or mc == mxINT32_CLASS             # <<<<<<<<<<<<<<
@@ -4147,7 +4232,7 @@
  */
     case __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxUINT16_CLASS:
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":619
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":619
  *             or mc == mxUINT16_CLASS
  *             or mc == mxINT32_CLASS
  *             or mc == mxUINT32_CLASS             # <<<<<<<<<<<<<<
@@ -4156,7 +4241,7 @@
  */
     case __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxINT32_CLASS:
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":620
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":620
  *             or mc == mxINT32_CLASS
  *             or mc == mxUINT32_CLASS
  *             or mc == mxINT64_CLASS             # <<<<<<<<<<<<<<
@@ -4165,7 +4250,7 @@
  */
     case __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxUINT32_CLASS:
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":621
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":621
  *             or mc == mxUINT32_CLASS
  *             or mc == mxINT64_CLASS
  *             or mc == mxUINT64_CLASS): # numeric matrix             # <<<<<<<<<<<<<<
@@ -4175,7 +4260,7 @@
     case __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxINT64_CLASS:
     case __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxUINT64_CLASS:
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":622
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":622
  *             or mc == mxINT64_CLASS
  *             or mc == mxUINT64_CLASS): # numeric matrix
  *             arr = self.read_real_complex(header)             # <<<<<<<<<<<<<<
@@ -4188,7 +4273,7 @@
     __pyx_v_arr = __pyx_t_1;
     __pyx_t_1 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":623
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":623
  *             or mc == mxUINT64_CLASS): # numeric matrix
  *             arr = self.read_real_complex(header)
  *             if process and self.mat_dtype: # might need to recast             # <<<<<<<<<<<<<<
@@ -4196,23 +4281,23 @@
  *                     mat_dtype = self.bool_dtype
  */
     if (__pyx_v_process) {
-      __pyx_t_3 = __pyx_v_self->mat_dtype;
+      __pyx_t_4 = __pyx_v_self->mat_dtype;
     } else {
-      __pyx_t_3 = __pyx_v_process;
+      __pyx_t_4 = __pyx_v_process;
     }
-    if (__pyx_t_3) {
+    if (__pyx_t_4) {
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":624
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":624
  *             arr = self.read_real_complex(header)
  *             if process and self.mat_dtype: # might need to recast
  *                 if header.is_logical:             # <<<<<<<<<<<<<<
  *                     mat_dtype = self.bool_dtype
  *                 else:
  */
-      __pyx_t_4 = __pyx_v_header->is_logical;
-      if (__pyx_t_4) {
+      __pyx_t_5 = __pyx_v_header->is_logical;
+      if (__pyx_t_5) {
 
-        /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":625
+        /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":625
  *             if process and self.mat_dtype: # might need to recast
  *                 if header.is_logical:
  *                     mat_dtype = self.bool_dtype             # <<<<<<<<<<<<<<
@@ -4226,48 +4311,48 @@
       }
       /*else*/ {
 
-        /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":627
+        /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":627
  *                     mat_dtype = self.bool_dtype
  *                 else:
  *                     mat_dtype = <object>self.class_dtypes[mc]             # <<<<<<<<<<<<<<
  *                 arr = arr.astype(mat_dtype)
  *         elif mc == mxSPARSE_CLASS:
  */
-        __pyx_t_5 = (__pyx_v_self->class_dtypes[__pyx_v_mc]);
-        if (!(__Pyx_TypeTest(((PyObject *)__pyx_t_5), __pyx_ptype_5numpy_dtype))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_INCREF(((PyObject *)__pyx_t_5));
+        __pyx_t_6 = (__pyx_v_self->class_dtypes[__pyx_v_mc]);
+        if (!(likely(((((PyObject *)__pyx_t_6)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_t_6), __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_INCREF(((PyObject *)__pyx_t_6));
         __Pyx_DECREF(((PyObject *)__pyx_v_mat_dtype));
-        __pyx_v_mat_dtype = ((PyArray_Descr *)((PyObject *)__pyx_t_5));
+        __pyx_v_mat_dtype = ((PyArray_Descr *)((PyObject *)__pyx_t_6));
       }
       __pyx_L4:;
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":628
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":628
  *                 else:
  *                     mat_dtype = <object>self.class_dtypes[mc]
  *                 arr = arr.astype(mat_dtype)             # <<<<<<<<<<<<<<
  *         elif mc == mxSPARSE_CLASS:
  *             arr = self.read_sparse(header)
  */
-      __pyx_t_1 = PyObject_GetAttr(__pyx_v_arr, __pyx_kp_astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyObject_GetAttr(__pyx_v_arr, __pyx_n_s__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+      __Pyx_GOTREF(__pyx_t_2);
       __Pyx_INCREF(((PyObject *)__pyx_v_mat_dtype));
       PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_mat_dtype));
       __Pyx_GIVEREF(((PyObject *)__pyx_v_mat_dtype));
-      __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __Pyx_DECREF(__pyx_v_arr);
-      __pyx_v_arr = __pyx_t_6;
-      __pyx_t_6 = 0;
+      __pyx_v_arr = __pyx_t_3;
+      __pyx_t_3 = 0;
       goto __pyx_L3;
     }
     __pyx_L3:;
     break;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":629
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":629
  *                     mat_dtype = <object>self.class_dtypes[mc]
  *                 arr = arr.astype(mat_dtype)
  *         elif mc == mxSPARSE_CLASS:             # <<<<<<<<<<<<<<
@@ -4276,20 +4361,20 @@
  */
     case __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxSPARSE_CLASS:
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":630
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":630
  *                 arr = arr.astype(mat_dtype)
  *         elif mc == mxSPARSE_CLASS:
  *             arr = self.read_sparse(header)             # <<<<<<<<<<<<<<
  *             # no current processing makes sense for sparse
  *             return arr
  */
-    __pyx_t_6 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_sparse(__pyx_v_self, __pyx_v_header); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_3 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_sparse(__pyx_v_self, __pyx_v_header); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_v_arr);
-    __pyx_v_arr = __pyx_t_6;
-    __pyx_t_6 = 0;
+    __pyx_v_arr = __pyx_t_3;
+    __pyx_t_3 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":632
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":632
  *             arr = self.read_sparse(header)
  *             # no current processing makes sense for sparse
  *             return arr             # <<<<<<<<<<<<<<
@@ -4302,53 +4387,92 @@
     goto __pyx_L0;
     break;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":633
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":633
  *             # no current processing makes sense for sparse
  *             return arr
  *         elif mc == mxCHAR_CLASS:             # <<<<<<<<<<<<<<
  *             arr = self.read_char(header)
- *         elif mc == mxCELL_CLASS:
+ *             if process and self.chars_as_strings:
  */
     case __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxCHAR_CLASS:
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":634
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":634
  *             return arr
  *         elif mc == mxCHAR_CLASS:
  *             arr = self.read_char(header)             # <<<<<<<<<<<<<<
+ *             if process and self.chars_as_strings:
+ *                 arr = chars_to_strings(arr)
+ */
+    __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_char(__pyx_v_self, __pyx_v_header, 0)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_v_arr);
+    __pyx_v_arr = __pyx_t_3;
+    __pyx_t_3 = 0;
+
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":635
+ *         elif mc == mxCHAR_CLASS:
+ *             arr = self.read_char(header)
+ *             if process and self.chars_as_strings:             # <<<<<<<<<<<<<<
+ *                 arr = chars_to_strings(arr)
  *         elif mc == mxCELL_CLASS:
+ */
+    if (__pyx_v_process) {
+      __pyx_t_4 = __pyx_v_self->chars_as_strings;
+    } else {
+      __pyx_t_4 = __pyx_v_process;
+    }
+    if (__pyx_t_4) {
+
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":636
+ *             arr = self.read_char(header)
+ *             if process and self.chars_as_strings:
+ *                 arr = chars_to_strings(arr)             # <<<<<<<<<<<<<<
+ *         elif mc == mxCELL_CLASS:
  *             arr = self.read_cells(header)
  */
-    __pyx_t_6 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_char(__pyx_v_self, __pyx_v_header, 0)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __Pyx_DECREF(__pyx_v_arr);
-    __pyx_v_arr = __pyx_t_6;
-    __pyx_t_6 = 0;
+      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__chars_to_strings); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_v_arr);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_arr);
+      __Pyx_GIVEREF(__pyx_v_arr);
+      __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_v_arr);
+      __pyx_v_arr = __pyx_t_1;
+      __pyx_t_1 = 0;
+      goto __pyx_L5;
+    }
+    __pyx_L5:;
     break;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":635
- *         elif mc == mxCHAR_CLASS:
- *             arr = self.read_char(header)
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":637
+ *             if process and self.chars_as_strings:
+ *                 arr = chars_to_strings(arr)
  *         elif mc == mxCELL_CLASS:             # <<<<<<<<<<<<<<
  *             arr = self.read_cells(header)
  *         elif mc == mxSTRUCT_CLASS:
  */
     case __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxCELL_CLASS:
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":636
- *             arr = self.read_char(header)
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":638
+ *                 arr = chars_to_strings(arr)
  *         elif mc == mxCELL_CLASS:
  *             arr = self.read_cells(header)             # <<<<<<<<<<<<<<
  *         elif mc == mxSTRUCT_CLASS:
  *             arr = self.read_struct(header)
  */
-    __pyx_t_6 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_cells(__pyx_v_self, __pyx_v_header, 0)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_cells(__pyx_v_self, __pyx_v_header, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_v_arr);
-    __pyx_v_arr = __pyx_t_6;
-    __pyx_t_6 = 0;
+    __pyx_v_arr = __pyx_t_1;
+    __pyx_t_1 = 0;
     break;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":637
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":639
  *         elif mc == mxCELL_CLASS:
  *             arr = self.read_cells(header)
  *         elif mc == mxSTRUCT_CLASS:             # <<<<<<<<<<<<<<
@@ -4357,21 +4481,21 @@
  */
     case __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxSTRUCT_CLASS:
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":638
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":640
  *             arr = self.read_cells(header)
  *         elif mc == mxSTRUCT_CLASS:
  *             arr = self.read_struct(header)             # <<<<<<<<<<<<<<
  *         elif mc == mxOBJECT_CLASS: # like structs, but with classname
  *             classname = self.read_int8_string()
  */
-    __pyx_t_6 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_struct(__pyx_v_self, __pyx_v_header, 0)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_struct(__pyx_v_self, __pyx_v_header, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_v_arr);
-    __pyx_v_arr = __pyx_t_6;
-    __pyx_t_6 = 0;
+    __pyx_v_arr = __pyx_t_1;
+    __pyx_t_1 = 0;
     break;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":639
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":641
  *         elif mc == mxSTRUCT_CLASS:
  *             arr = self.read_struct(header)
  *         elif mc == mxOBJECT_CLASS: # like structs, but with classname             # <<<<<<<<<<<<<<
@@ -4380,62 +4504,62 @@
  */
     case __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxOBJECT_CLASS:
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":640
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":642
  *             arr = self.read_struct(header)
  *         elif mc == mxOBJECT_CLASS: # like structs, but with classname
  *             classname = self.read_int8_string()             # <<<<<<<<<<<<<<
  *             arr = self.read_struct(header)
  *             arr = mio5p.MatlabObject(arr, classname)
  */
-    __pyx_t_6 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_int8_string(__pyx_v_self); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_int8_string(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_v_classname);
-    __pyx_v_classname = __pyx_t_6;
-    __pyx_t_6 = 0;
+    __pyx_v_classname = __pyx_t_1;
+    __pyx_t_1 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":641
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":643
  *         elif mc == mxOBJECT_CLASS: # like structs, but with classname
  *             classname = self.read_int8_string()
  *             arr = self.read_struct(header)             # <<<<<<<<<<<<<<
  *             arr = mio5p.MatlabObject(arr, classname)
  *         elif mc == mxFUNCTION_CLASS: # just a matrix of struct type
  */
-    __pyx_t_6 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_struct(__pyx_v_self, __pyx_v_header, 0)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_struct(__pyx_v_self, __pyx_v_header, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_v_arr);
-    __pyx_v_arr = __pyx_t_6;
-    __pyx_t_6 = 0;
+    __pyx_v_arr = __pyx_t_1;
+    __pyx_t_1 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":642
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":644
  *             classname = self.read_int8_string()
  *             arr = self.read_struct(header)
  *             arr = mio5p.MatlabObject(arr, classname)             # <<<<<<<<<<<<<<
  *         elif mc == mxFUNCTION_CLASS: # just a matrix of struct type
  *             arr = self.read_mi_matrix()
  */
-    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_37); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    __pyx_t_6 = PyObject_GetAttr(__pyx_1, __pyx_kp_MatlabObject); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__mio5p); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__MatlabObject); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_INCREF(__pyx_v_arr);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_arr);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_arr);
     __Pyx_GIVEREF(__pyx_v_arr);
     __Pyx_INCREF(__pyx_v_classname);
-    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_classname);
+    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_classname);
     __Pyx_GIVEREF(__pyx_v_classname);
-    __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __Pyx_DECREF(__pyx_v_arr);
-    __pyx_v_arr = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_v_arr = __pyx_t_3;
+    __pyx_t_3 = 0;
     break;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":643
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":645
  *             arr = self.read_struct(header)
  *             arr = mio5p.MatlabObject(arr, classname)
  *         elif mc == mxFUNCTION_CLASS: # just a matrix of struct type             # <<<<<<<<<<<<<<
@@ -4444,47 +4568,47 @@
  */
     case __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxFUNCTION_CLASS:
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":644
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":646
  *             arr = mio5p.MatlabObject(arr, classname)
  *         elif mc == mxFUNCTION_CLASS: # just a matrix of struct type
  *             arr = self.read_mi_matrix()             # <<<<<<<<<<<<<<
  *             arr = mio5p.MatlabFunction(arr)
- *             # to make them more re-writeable - don't process
+ *             # to make them more re-writeable - don't squeeze
  */
-    __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_mi_matrix(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_mi_matrix(__pyx_v_self, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_v_arr);
-    __pyx_v_arr = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_v_arr = __pyx_t_3;
+    __pyx_t_3 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":645
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":647
  *         elif mc == mxFUNCTION_CLASS: # just a matrix of struct type
  *             arr = self.read_mi_matrix()
  *             arr = mio5p.MatlabFunction(arr)             # <<<<<<<<<<<<<<
- *             # to make them more re-writeable - don't process
+ *             # to make them more re-writeable - don't squeeze
  *             return arr
  */
-    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_37); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_MatlabFunction); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__mio5p); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__MatlabFunction); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
     __Pyx_INCREF(__pyx_v_arr);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_arr);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_arr);
     __Pyx_GIVEREF(__pyx_v_arr);
-    __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __Pyx_DECREF(__pyx_v_arr);
-    __pyx_v_arr = __pyx_t_6;
-    __pyx_t_6 = 0;
+    __pyx_v_arr = __pyx_t_2;
+    __pyx_t_2 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":647
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":649
  *             arr = mio5p.MatlabFunction(arr)
- *             # to make them more re-writeable - don't process
+ *             # to make them more re-writeable - don't squeeze
  *             return arr             # <<<<<<<<<<<<<<
  *         elif mc == mxOPAQUE_CLASS:
  *             arr = self.read_opaque(header)
@@ -4495,8 +4619,8 @@
     goto __pyx_L0;
     break;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":648
- *             # to make them more re-writeable - don't process
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":650
+ *             # to make them more re-writeable - don't squeeze
  *             return arr
  *         elif mc == mxOPAQUE_CLASS:             # <<<<<<<<<<<<<<
  *             arr = self.read_opaque(header)
@@ -4504,50 +4628,50 @@
  */
     case __pyx_e_5scipy_2io_6matlab_10mio5_utils_mxOPAQUE_CLASS:
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":649
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":651
  *             return arr
  *         elif mc == mxOPAQUE_CLASS:
  *             arr = self.read_opaque(header)             # <<<<<<<<<<<<<<
  *             arr = mio5p.MatlabOpaque(arr)
- *             # to make them more re-writeable - don't process
+ *             # to make them more re-writeable - don't squeeze
  */
-    __pyx_t_6 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_opaque(__pyx_v_self, __pyx_v_header, 0)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_opaque(__pyx_v_self, __pyx_v_header, 0)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_v_arr);
-    __pyx_v_arr = __pyx_t_6;
-    __pyx_t_6 = 0;
+    __pyx_v_arr = __pyx_t_2;
+    __pyx_t_2 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":650
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":652
  *         elif mc == mxOPAQUE_CLASS:
  *             arr = self.read_opaque(header)
  *             arr = mio5p.MatlabOpaque(arr)             # <<<<<<<<<<<<<<
- *             # to make them more re-writeable - don't process
+ *             # to make them more re-writeable - don't squeeze
  *             return arr
  */
-    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_37); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    __pyx_t_6 = PyObject_GetAttr(__pyx_1, __pyx_kp_MatlabOpaque); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__mio5p); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__MatlabOpaque); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __Pyx_INCREF(__pyx_v_arr);
     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_arr);
     __Pyx_GIVEREF(__pyx_v_arr);
-    __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_DECREF(__pyx_v_arr);
     __pyx_v_arr = __pyx_t_1;
     __pyx_t_1 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":652
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":654
  *             arr = mio5p.MatlabOpaque(arr)
- *             # to make them more re-writeable - don't process
+ *             # to make them more re-writeable - don't squeeze
  *             return arr             # <<<<<<<<<<<<<<
- *         if process:
- *             return process_element(arr,
+ *         if process and self.squeeze_me:
+ *             return squeeze_element(arr)
  */
     __Pyx_XDECREF(__pyx_r);
     __Pyx_INCREF(__pyx_v_arr);
@@ -4556,71 +4680,49 @@
     break;
   }
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":653
- *             # to make them more re-writeable - don't process
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":655
+ *             # to make them more re-writeable - don't squeeze
  *             return arr
- *         if process:             # <<<<<<<<<<<<<<
- *             return process_element(arr,
- *                                    self.chars_as_strings,
+ *         if process and self.squeeze_me:             # <<<<<<<<<<<<<<
+ *             return squeeze_element(arr)
+ *         return arr
  */
-  __pyx_t_4 = __pyx_v_process;
+  if (__pyx_v_process) {
+    __pyx_t_4 = __pyx_v_self->squeeze_me;
+  } else {
+    __pyx_t_4 = __pyx_v_process;
+  }
   if (__pyx_t_4) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":654
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":656
  *             return arr
- *         if process:
- *             return process_element(arr,             # <<<<<<<<<<<<<<
- *                                    self.chars_as_strings,
- *                                    self.squeeze_me)
+ *         if process and self.squeeze_me:
+ *             return squeeze_element(arr)             # <<<<<<<<<<<<<<
+ *         return arr
+ * 
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_process_element); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":655
- *         if process:
- *             return process_element(arr,
- *                                    self.chars_as_strings,             # <<<<<<<<<<<<<<
- *                                    self.squeeze_me)
- *         return arr
- */
-    __pyx_t_1 = PyInt_FromLong(__pyx_v_self->chars_as_strings); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__squeeze_element); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":656
- *             return process_element(arr,
- *                                    self.chars_as_strings,
- *                                    self.squeeze_me)             # <<<<<<<<<<<<<<
- *         return arr
- * 
- */
-    __pyx_t_2 = PyInt_FromLong(__pyx_v_self->squeeze_me); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
     __Pyx_INCREF(__pyx_v_arr);
-    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_arr);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_arr);
     __Pyx_GIVEREF(__pyx_v_arr);
-    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
-    __Pyx_GIVEREF(__pyx_t_1);
-    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_2);
-    __Pyx_GIVEREF(__pyx_t_2);
-    __pyx_t_1 = 0;
-    __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-    __pyx_r = __pyx_t_2;
-    __pyx_t_2 = 0;
+    __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_r = __pyx_t_3;
+    __pyx_t_3 = 0;
     goto __pyx_L0;
-    goto __pyx_L5;
+    goto __pyx_L6;
   }
-  __pyx_L5:;
+  __pyx_L6:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":657
- *                                    self.chars_as_strings,
- *                                    self.squeeze_me)
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":657
+ *         if process and self.squeeze_me:
+ *             return squeeze_element(arr)
  *         return arr             # <<<<<<<<<<<<<<
  * 
  *     cpdef cnp.ndarray read_real_complex(self, VarHeader5 header):
@@ -4633,22 +4735,23 @@
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_1);
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_3);
   __Pyx_AddTraceback("scipy.io.matlab.mio5_utils.VarReader5.array_from_header");
   __pyx_r = 0;
   __pyx_L0:;
   __Pyx_DECREF(__pyx_v_arr);
   __Pyx_DECREF((PyObject *)__pyx_v_mat_dtype);
   __Pyx_DECREF(__pyx_v_classname);
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
+  __Pyx_DECREF((PyObject *)__pyx_v_header);
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":593
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":593
  *         return self.array_from_header(header, process)
  * 
  *     cpdef array_from_header(self, VarHeader5 header, int process=1):             # <<<<<<<<<<<<<<
@@ -4662,10 +4765,10 @@
   struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *__pyx_v_header = 0;
   int __pyx_v_process;
   PyObject *__pyx_r = NULL;
-  struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_array_from_header __pyx_1;
   PyObject *__pyx_t_1 = NULL;
-  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_header,&__pyx_kp_process,0};
-  __Pyx_SetupRefcountContext("array_from_header");
+  struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_array_from_header __pyx_t_2;
+  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__header,&__pyx_n_s__process,0};
+  __Pyx_RefNannySetupContext("array_from_header");
   if (unlikely(__pyx_kwds)) {
     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
     PyObject* values[2] = {0,0};
@@ -4677,12 +4780,12 @@
     }
     switch (PyTuple_GET_SIZE(__pyx_args)) {
       case  0:
-      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_header);
+      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__header);
       if (likely(values[0])) kw_args--;
       else goto __pyx_L5_argtuple_error;
       case  1:
       if (kw_args > 1) {
-        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_process);
+        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__process);
         if (unlikely(value)) { values[1] = value; kw_args--; }
       }
     }
@@ -4693,10 +4796,10 @@
     if (values[1]) {
       __pyx_v_process = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_process == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
     } else {
-      __pyx_v_process = 1;
+      __pyx_v_process = ((int)1);
     }
   } else {
-    __pyx_v_process = 1;
+    __pyx_v_process = ((int)1);
     switch (PyTuple_GET_SIZE(__pyx_args)) {
       case  2: __pyx_v_process = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_process == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       case  1: __pyx_v_header = ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *)PyTuple_GET_ITEM(__pyx_args, 0));
@@ -4713,9 +4816,9 @@
   __pyx_L4_argument_unpacking_done:;
   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_header), __pyx_ptype_5scipy_2io_6matlab_10mio5_utils_VarHeader5, 1, "header", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_XDECREF(__pyx_r);
-  __pyx_1.__pyx_n = 1;
-  __pyx_1.process = __pyx_v_process;
-  __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->__pyx_vtab)->array_from_header(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self), __pyx_v_header, 1, &__pyx_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2.__pyx_n = 1;
+  __pyx_t_2.process = __pyx_v_process;
+  __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->__pyx_vtab)->array_from_header(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self), __pyx_v_header, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
@@ -4729,11 +4832,11 @@
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":659
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":659
  *         return arr
  * 
  *     cpdef cnp.ndarray read_real_complex(self, VarHeader5 header):             # <<<<<<<<<<<<<<
@@ -4746,120 +4849,120 @@
   PyArrayObject *__pyx_v_res;
   PyArrayObject *__pyx_v_res_j;
   PyArrayObject *__pyx_r = NULL;
-  PyObject *__pyx_1 = 0;
-  struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_numeric __pyx_2;
-  PyObject *__pyx_3 = 0;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  PyObject *__pyx_t_4 = NULL;
-  __Pyx_SetupRefcountContext("read_real_complex");
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_4;
+  struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_numeric __pyx_t_5;
+  __Pyx_RefNannySetupContext("read_real_complex");
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
+  __Pyx_INCREF((PyObject *)__pyx_v_header);
   __pyx_v_res = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_res_j = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
   /* Check if called by wrapper */
   if (unlikely(__pyx_skip_dispatch)) ;
   /* Check if overriden in Python */
   else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
-    __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_kp_read_real_complex); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    if (!PyCFunction_Check(__pyx_1) || (PyCFunction_GET_FUNCTION(__pyx_1) != (void *)&__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_real_complex)) {
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__read_real_complex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_real_complex)) {
       __Pyx_XDECREF(((PyObject *)__pyx_r));
-      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __Pyx_INCREF(((PyObject *)__pyx_v_header));
-      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_header));
+      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_header));
       __Pyx_GIVEREF(((PyObject *)__pyx_v_header));
-      __pyx_t_2 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-      if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_r = ((PyArrayObject *)__pyx_t_2);
-      __pyx_t_2 = 0;
+      __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_r = ((PyArrayObject *)__pyx_t_3);
+      __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       goto __pyx_L0;
     }
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":663
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":663
  *         cdef:
  *             cnp.ndarray res, res_j
  *         if header.is_complex:             # <<<<<<<<<<<<<<
  *             # avoid array copy to save memory
  *             res = self.read_numeric(False)
  */
-  __pyx_t_3 = __pyx_v_header->is_complex;
-  if (__pyx_t_3) {
+  __pyx_t_4 = __pyx_v_header->is_complex;
+  if (__pyx_t_4) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":665
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":665
  *         if header.is_complex:
  *             # avoid array copy to save memory
  *             res = self.read_numeric(False)             # <<<<<<<<<<<<<<
  *             res_j = self.read_numeric(False)
  *             res = res + (res_j * 1j)
  */
-    __pyx_2.__pyx_n = 1;
-    __pyx_2.copy = 0;
-    __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_numeric(__pyx_v_self, 0, &__pyx_2)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_5.__pyx_n = 1;
+    __pyx_t_5.copy = 0;
+    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_numeric(__pyx_v_self, 0, &__pyx_t_5)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(((PyObject *)__pyx_v_res));
-    __pyx_v_res = ((PyArrayObject *)__pyx_t_2);
-    __pyx_t_2 = 0;
+    __pyx_v_res = ((PyArrayObject *)__pyx_t_1);
+    __pyx_t_1 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":666
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":666
  *             # avoid array copy to save memory
  *             res = self.read_numeric(False)
  *             res_j = self.read_numeric(False)             # <<<<<<<<<<<<<<
  *             res = res + (res_j * 1j)
  *         else:
  */
-    __pyx_2.__pyx_n = 1;
-    __pyx_2.copy = 0;
-    __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_numeric(__pyx_v_self, 0, &__pyx_2)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_5.__pyx_n = 1;
+    __pyx_t_5.copy = 0;
+    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_numeric(__pyx_v_self, 0, &__pyx_t_5)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(((PyObject *)__pyx_v_res_j));
-    __pyx_v_res_j = ((PyArrayObject *)__pyx_t_2);
-    __pyx_t_2 = 0;
+    __pyx_v_res_j = ((PyArrayObject *)__pyx_t_1);
+    __pyx_t_1 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":667
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":667
  *             res = self.read_numeric(False)
  *             res_j = self.read_numeric(False)
  *             res = res + (res_j * 1j)             # <<<<<<<<<<<<<<
  *         else:
  *             res = self.read_numeric()
  */
-    __pyx_t_2 = PyComplex_FromDoubles(0.0, 1.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyNumber_Multiply(((PyObject *)__pyx_v_res_j), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyComplex_FromDoubles(0.0, 1.0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_v_res), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = PyNumber_Multiply(((PyObject *)__pyx_v_res_j), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyNumber_Add(((PyObject *)__pyx_v_res), __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(((PyObject *)__pyx_v_res));
-    __pyx_v_res = ((PyArrayObject *)__pyx_t_2);
-    __pyx_t_2 = 0;
+    __pyx_v_res = ((PyArrayObject *)__pyx_t_1);
+    __pyx_t_1 = 0;
     goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":669
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":669
  *             res = res + (res_j * 1j)
  *         else:
  *             res = self.read_numeric()             # <<<<<<<<<<<<<<
  *         return res.reshape(header.dims[::-1]).T
  * 
  */
-    __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_numeric(__pyx_v_self, 0, NULL)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_numeric(__pyx_v_self, 0, NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(((PyObject *)__pyx_v_res));
-    __pyx_v_res = ((PyArrayObject *)__pyx_t_2);
-    __pyx_t_2 = 0;
+    __pyx_v_res = ((PyArrayObject *)__pyx_t_1);
+    __pyx_t_1 = 0;
   }
   __pyx_L3:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":670
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":670
  *         else:
  *             res = self.read_numeric()
  *         return res.reshape(header.dims[::-1]).T             # <<<<<<<<<<<<<<
@@ -4867,49 +4970,49 @@
  *     cdef object read_sparse(self, VarHeader5 header):
  */
   __Pyx_XDECREF(((PyObject *)__pyx_r));
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_res), __pyx_kp_reshape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_res), __pyx_n_s__reshape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = PyObject_GetItem(__pyx_v_header->dims, __pyx_t_3); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_1 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  __pyx_3 = PyObject_GetItem(__pyx_v_header->dims, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_3);
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_3);
-  __Pyx_GIVEREF(__pyx_3);
-  __pyx_3 = 0;
-  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__T); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_kp_T); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = ((PyArrayObject *)__pyx_t_1);
-  __pyx_t_1 = 0;
+  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = ((PyArrayObject *)__pyx_t_3);
+  __pyx_t_3 = 0;
   goto __pyx_L0;
 
   __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_1);
-  __Pyx_XDECREF(__pyx_3);
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_3);
   __Pyx_AddTraceback("scipy.io.matlab.mio5_utils.VarReader5.read_real_complex");
   __pyx_r = 0;
   __pyx_L0:;
   __Pyx_DECREF((PyObject *)__pyx_v_res);
   __Pyx_DECREF((PyObject *)__pyx_v_res_j);
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
+  __Pyx_DECREF((PyObject *)__pyx_v_header);
   __Pyx_XGIVEREF((PyObject *)__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":659
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":659
  *         return arr
  * 
  *     cpdef cnp.ndarray read_real_complex(self, VarHeader5 header):             # <<<<<<<<<<<<<<
@@ -4922,7 +5025,7 @@
 static PyObject *__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_real_complex(PyObject *__pyx_v_self, PyObject *__pyx_v_header) {
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
-  __Pyx_SetupRefcountContext("read_real_complex");
+  __Pyx_RefNannySetupContext("read_real_complex");
   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_header), __pyx_ptype_5scipy_2io_6matlab_10mio5_utils_VarHeader5, 1, "header", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_XDECREF(__pyx_r);
   __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->__pyx_vtab)->read_real_complex(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self), ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *)__pyx_v_header), 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -4939,11 +5042,11 @@
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":672
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":672
  *         return res.reshape(header.dims[::-1]).T
  * 
  *     cdef object read_sparse(self, VarHeader5 header):             # <<<<<<<<<<<<<<
@@ -4960,24 +5063,25 @@
   size_t __pyx_v_N;
   size_t __pyx_v_nnz;
   PyObject *__pyx_r = NULL;
-  struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_numeric __pyx_1;
-  PyObject *__pyx_2 = 0;
-  PyObject *__pyx_3 = 0;
   PyObject *__pyx_t_1 = NULL;
   int __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
-  size_t __pyx_t_4;
+  struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_numeric __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
   size_t __pyx_t_5;
-  PyObject *__pyx_t_6 = NULL;
+  size_t __pyx_t_6;
   PyObject *__pyx_t_7 = NULL;
   PyObject *__pyx_t_8 = NULL;
-  __Pyx_SetupRefcountContext("read_sparse");
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  __Pyx_RefNannySetupContext("read_sparse");
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
+  __Pyx_INCREF((PyObject *)__pyx_v_header);
   __pyx_v_rowind = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_indptr = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_data = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_data_j = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":676
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":676
  *         cdef cnp.ndarray rowind, indptr, data, data_j
  *         cdef size_t M, N, nnz
  *         rowind = self.read_numeric()             # <<<<<<<<<<<<<<
@@ -4990,7 +5094,7 @@
   __pyx_v_rowind = ((PyArrayObject *)__pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":677
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":677
  *         cdef size_t M, N, nnz
  *         rowind = self.read_numeric()
  *         indptr = self.read_numeric()             # <<<<<<<<<<<<<<
@@ -5003,7 +5107,7 @@
   __pyx_v_indptr = ((PyArrayObject *)__pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":678
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":678
  *         rowind = self.read_numeric()
  *         indptr = self.read_numeric()
  *         if header.is_complex:             # <<<<<<<<<<<<<<
@@ -5013,37 +5117,37 @@
   __pyx_t_2 = __pyx_v_header->is_complex;
   if (__pyx_t_2) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":680
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":680
  *         if header.is_complex:
  *             # avoid array copy to save memory
  *             data   = self.read_numeric(False)             # <<<<<<<<<<<<<<
  *             data_j = self.read_numeric(False)
  *             data = data + (data_j * 1j)
  */
-    __pyx_1.__pyx_n = 1;
-    __pyx_1.copy = 0;
-    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_numeric(__pyx_v_self, 0, &__pyx_1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3.__pyx_n = 1;
+    __pyx_t_3.copy = 0;
+    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_numeric(__pyx_v_self, 0, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(((PyObject *)__pyx_v_data));
     __pyx_v_data = ((PyArrayObject *)__pyx_t_1);
     __pyx_t_1 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":681
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":681
  *             # avoid array copy to save memory
  *             data   = self.read_numeric(False)
  *             data_j = self.read_numeric(False)             # <<<<<<<<<<<<<<
  *             data = data + (data_j * 1j)
  *         else:
  */
-    __pyx_1.__pyx_n = 1;
-    __pyx_1.copy = 0;
-    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_numeric(__pyx_v_self, 0, &__pyx_1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3.__pyx_n = 1;
+    __pyx_t_3.copy = 0;
+    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_numeric(__pyx_v_self, 0, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(((PyObject *)__pyx_v_data_j));
     __pyx_v_data_j = ((PyArrayObject *)__pyx_t_1);
     __pyx_t_1 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":682
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":682
  *             data   = self.read_numeric(False)
  *             data_j = self.read_numeric(False)
  *             data = data + (data_j * 1j)             # <<<<<<<<<<<<<<
@@ -5052,13 +5156,13 @@
  */
     __pyx_t_1 = PyComplex_FromDoubles(0.0, 1.0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_3 = PyNumber_Multiply(((PyObject *)__pyx_v_data_j), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyNumber_Multiply(((PyObject *)__pyx_v_data_j), __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_1 = PyNumber_Add(((PyObject *)__pyx_v_data), __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyNumber_Add(((PyObject *)__pyx_v_data), __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(((PyObject *)__pyx_v_data));
     __pyx_v_data = ((PyArrayObject *)__pyx_t_1);
     __pyx_t_1 = 0;
@@ -5066,7 +5170,7 @@
   }
   /*else*/ {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":684
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":684
  *             data = data + (data_j * 1j)
  *         else:
  *             data = self.read_numeric()             # <<<<<<<<<<<<<<
@@ -5081,7 +5185,7 @@
   }
   __pyx_L3:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":697
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":697
  *         to each rowind
  *         '''
  *         M,N = header.dims             # <<<<<<<<<<<<<<
@@ -5090,87 +5194,87 @@
  */
   if (PyTuple_CheckExact(__pyx_v_header->dims) && likely(PyTuple_GET_SIZE(__pyx_v_header->dims) == 2)) {
     PyObject* tuple = __pyx_v_header->dims;
-    __pyx_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_3);
-    __pyx_t_4 = __Pyx_PyInt_AsSize_t(__pyx_3); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-    __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
-    __pyx_t_5 = __Pyx_PyInt_AsSize_t(__pyx_3); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-    __pyx_v_M = __pyx_t_4;
+    __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
+    __pyx_t_5 = __Pyx_PyInt_AsSize_t(__pyx_t_1); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
+    __pyx_t_6 = __Pyx_PyInt_AsSize_t(__pyx_t_4); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_v_M = __pyx_t_5;
+    __pyx_v_N = __pyx_t_6;
+  } else {
+    __pyx_t_7 = PyObject_GetIter(__pyx_v_header->dims); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_6 = __Pyx_PyInt_AsSize_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = __Pyx_PyInt_AsSize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__Pyx_EndUnpack(__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_v_M = __pyx_t_6;
     __pyx_v_N = __pyx_t_5;
-  } else {
-    __pyx_2 = PyObject_GetIter(__pyx_v_header->dims); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_2);
-    __pyx_3 = __Pyx_UnpackItem(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_3);
-    __pyx_t_5 = __Pyx_PyInt_AsSize_t(__pyx_3); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-    __pyx_3 = __Pyx_UnpackItem(__pyx_2, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_3);
-    __pyx_t_4 = __Pyx_PyInt_AsSize_t(__pyx_3); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-    if (__Pyx_EndUnpack(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-    __pyx_v_M = __pyx_t_5;
-    __pyx_v_N = __pyx_t_4;
   }
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":698
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":698
  *         '''
  *         M,N = header.dims
  *         indptr = indptr[:N+1]             # <<<<<<<<<<<<<<
  *         nnz = indptr[-1]
  *         rowind = rowind[:nnz]
  */
-  __pyx_3 = PySequence_GetSlice(((PyObject *)__pyx_v_indptr), 0, (__pyx_v_N + 1)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_3);
-  if (!(__Pyx_TypeTest(__pyx_3, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PySequence_GetSlice(((PyObject *)__pyx_v_indptr), 0, (__pyx_v_N + 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(((PyObject *)__pyx_v_indptr));
-  __pyx_v_indptr = ((PyArrayObject *)__pyx_3);
-  __pyx_3 = 0;
+  __pyx_v_indptr = ((PyArrayObject *)__pyx_t_4);
+  __pyx_t_4 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":699
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":699
  *         M,N = header.dims
  *         indptr = indptr[:N+1]
  *         nnz = indptr[-1]             # <<<<<<<<<<<<<<
  *         rowind = rowind[:nnz]
  *         data   = data[:nnz]
  */
-  __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_indptr), -1, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_2);
-  __pyx_t_4 = __Pyx_PyInt_AsSize_t(__pyx_2); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-  __pyx_v_nnz = __pyx_t_4;
+  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_indptr), -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = __Pyx_PyInt_AsSize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_v_nnz = __pyx_t_5;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":700
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":700
  *         indptr = indptr[:N+1]
  *         nnz = indptr[-1]
  *         rowind = rowind[:nnz]             # <<<<<<<<<<<<<<
  *         data   = data[:nnz]
  *         return scipy.sparse.csc_matrix(
  */
-  __pyx_3 = PySequence_GetSlice(((PyObject *)__pyx_v_rowind), 0, __pyx_v_nnz); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_3);
-  if (!(__Pyx_TypeTest(__pyx_3, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PySequence_GetSlice(((PyObject *)__pyx_v_rowind), 0, __pyx_v_nnz); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(((PyObject *)__pyx_v_rowind));
-  __pyx_v_rowind = ((PyArrayObject *)__pyx_3);
-  __pyx_3 = 0;
+  __pyx_v_rowind = ((PyArrayObject *)__pyx_t_4);
+  __pyx_t_4 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":701
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":701
  *         nnz = indptr[-1]
  *         rowind = rowind[:nnz]
  *         data   = data[:nnz]             # <<<<<<<<<<<<<<
  *         return scipy.sparse.csc_matrix(
  *             (data,rowind,indptr),
  */
-  __pyx_2 = PySequence_GetSlice(((PyObject *)__pyx_v_data), 0, __pyx_v_nnz); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_2);
-  if (!(__Pyx_TypeTest(__pyx_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PySequence_GetSlice(((PyObject *)__pyx_v_data), 0, __pyx_v_nnz); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(((PyObject *)__pyx_v_data));
-  __pyx_v_data = ((PyArrayObject *)__pyx_2);
-  __pyx_2 = 0;
+  __pyx_v_data = ((PyArrayObject *)__pyx_t_4);
+  __pyx_t_4 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":702
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":702
  *         rowind = rowind[:nnz]
  *         data   = data[:nnz]
  *         return scipy.sparse.csc_matrix(             # <<<<<<<<<<<<<<
@@ -5178,16 +5282,16 @@
  *             shape=(M,N))
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_scipy); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_3);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_3, __pyx_kp_sparse); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__scipy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__sparse); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_kp_csc_matrix); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__csc_matrix); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":703
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":703
  *         data   = data[:nnz]
  *         return scipy.sparse.csc_matrix(
  *             (data,rowind,indptr),             # <<<<<<<<<<<<<<
@@ -5195,7 +5299,7 @@
  * 
  */
   __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __Pyx_GOTREF(__pyx_t_1);
   __Pyx_INCREF(((PyObject *)__pyx_v_data));
   PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_data));
   __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
@@ -5205,54 +5309,61 @@
   __Pyx_INCREF(((PyObject *)__pyx_v_indptr));
   PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_indptr));
   __Pyx_GIVEREF(((PyObject *)__pyx_v_indptr));
-  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
-  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_1));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
   __pyx_t_1 = 0;
-  __pyx_2 = PyDict_New(); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_2));
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":704
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":702
+ *         rowind = rowind[:nnz]
+ *         data   = data[:nnz]
+ *         return scipy.sparse.csc_matrix(             # <<<<<<<<<<<<<<
+ *             (data,rowind,indptr),
+ *             shape=(M,N))
+ */
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":704
  *         return scipy.sparse.csc_matrix(
  *             (data,rowind,indptr),
  *             shape=(M,N))             # <<<<<<<<<<<<<<
  * 
  *     cpdef cnp.ndarray read_char(self, VarHeader5 header):
  */
-  __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_M); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_N); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_8));
-  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
-  __Pyx_GIVEREF(__pyx_t_1);
-  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7);
-  __Pyx_GIVEREF(__pyx_t_7);
-  __pyx_t_1 = 0;
-  __pyx_t_7 = 0;
-  if (PyDict_SetItem(__pyx_2, __pyx_kp_shape, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-  __pyx_t_8 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_2)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = __Pyx_PyInt_FromSize_t(__pyx_v_M); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_8);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
-  __pyx_r = __pyx_t_8;
+  __pyx_t_9 = __Pyx_PyInt_FromSize_t(__pyx_v_N); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8);
+  __Pyx_GIVEREF(__pyx_t_8);
+  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9);
+  __Pyx_GIVEREF(__pyx_t_9);
   __pyx_t_8 = 0;
+  __pyx_t_9 = 0;
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__shape), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  __pyx_t_10 = PyEval_CallObjectWithKeywords(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_r = __pyx_t_10;
+  __pyx_t_10 = 0;
   goto __pyx_L0;
 
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_2);
-  __Pyx_XDECREF(__pyx_3);
   __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_4);
   __Pyx_XDECREF(__pyx_t_7);
   __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
   __Pyx_AddTraceback("scipy.io.matlab.mio5_utils.VarReader5.read_sparse");
   __pyx_r = 0;
   __pyx_L0:;
@@ -5260,12 +5371,14 @@
   __Pyx_DECREF((PyObject *)__pyx_v_indptr);
   __Pyx_DECREF((PyObject *)__pyx_v_data);
   __Pyx_DECREF((PyObject *)__pyx_v_data_j);
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
+  __Pyx_DECREF((PyObject *)__pyx_v_header);
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":706
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":706
  *             shape=(M,N))
  * 
  *     cpdef cnp.ndarray read_char(self, VarHeader5 header):             # <<<<<<<<<<<<<<
@@ -5285,15 +5398,18 @@
   PyArray_Descr *__pyx_v_dt = 0;
   PyObject *__pyx_v_uc_str;
   PyArrayObject *__pyx_r = NULL;
-  PyObject *__pyx_1 = 0;
-  struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_element __pyx_2;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3;
-  int __pyx_t_4;
-  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  struct __pyx_opt_args_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_element __pyx_t_4;
+  PyObject *__pyx_t_5;
   int __pyx_t_6;
-  __Pyx_SetupRefcountContext("read_char");
+  PyObject *__pyx_t_7 = NULL;
+  int __pyx_t_8;
+  int __pyx_t_9;
+  __Pyx_RefNannySetupContext("read_char");
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
+  __Pyx_INCREF((PyObject *)__pyx_v_header);
   __pyx_v_data = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_codec = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_arr = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
@@ -5302,28 +5418,28 @@
   if (unlikely(__pyx_skip_dispatch)) ;
   /* Check if overriden in Python */
   else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
-    __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_kp_read_char); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    if (!PyCFunction_Check(__pyx_1) || (PyCFunction_GET_FUNCTION(__pyx_1) != (void *)&__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_char)) {
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__read_char); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_char)) {
       __Pyx_XDECREF(((PyObject *)__pyx_r));
-      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __Pyx_INCREF(((PyObject *)__pyx_v_header));
-      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_header));
+      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_header));
       __Pyx_GIVEREF(((PyObject *)__pyx_v_header));
-      __pyx_t_2 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-      if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_r = ((PyArrayObject *)__pyx_t_2);
-      __pyx_t_2 = 0;
+      __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_r = ((PyArrayObject *)__pyx_t_3);
+      __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       goto __pyx_L0;
     }
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":732
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":732
  *             object data, res, codec
  *             cnp.ndarray arr
  *         cdef size_t length = self.size_from_header(header)             # <<<<<<<<<<<<<<
@@ -5332,43 +5448,43 @@
  */
   __pyx_v_length = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->size_from_header(__pyx_v_self, __pyx_v_header);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":734
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":734
  *         cdef size_t length = self.size_from_header(header)
  *         data = self.read_element(
  *             &mdtype, &byte_count, <void **>&data_ptr, True)             # <<<<<<<<<<<<<<
  *         # Character data can be of apparently numerical types,
  *         # specifically np.uint8, np.int8, np.uint16.  np.unit16 can have
  */
-  __pyx_2.__pyx_n = 1;
-  __pyx_2.copy = 1;
-  __pyx_t_2 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_element(__pyx_v_self, (&__pyx_v_mdtype), (&__pyx_v_byte_count), ((void **)(&__pyx_v_data_ptr)), &__pyx_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_4.__pyx_n = 1;
+  __pyx_t_4.copy = 1;
+  __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_element(__pyx_v_self, (&__pyx_v_mdtype), (&__pyx_v_byte_count), ((void **)(&__pyx_v_data_ptr)), &__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_v_data);
-  __pyx_v_data = __pyx_t_2;
-  __pyx_t_2 = 0;
+  __pyx_v_data = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":739
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":739
  *         # a length 1 type encoding, like ascii, or length 2 type
  *         # encoding
  *         cdef cnp.dtype dt = <cnp.dtype>self.dtypes[mdtype]             # <<<<<<<<<<<<<<
  *         if mdtype == miUINT16:
  *             codec = self.uint16_codec
  */
-  __pyx_t_3 = (__pyx_v_self->dtypes[__pyx_v_mdtype]);
-  __Pyx_INCREF(((PyObject *)((PyArray_Descr *)__pyx_t_3)));
-  __pyx_v_dt = ((PyArray_Descr *)__pyx_t_3);
+  __pyx_t_5 = (__pyx_v_self->dtypes[__pyx_v_mdtype]);
+  __Pyx_INCREF(((PyObject *)((PyArray_Descr *)__pyx_t_5)));
+  __pyx_v_dt = ((PyArray_Descr *)__pyx_t_5);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":740
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":740
  *         # encoding
  *         cdef cnp.dtype dt = <cnp.dtype>self.dtypes[mdtype]
  *         if mdtype == miUINT16:             # <<<<<<<<<<<<<<
  *             codec = self.uint16_codec
  *             if self.codecs['uint16_len'] == 1: # need LSBs only
  */
-  __pyx_t_4 = (__pyx_v_mdtype == __pyx_e_5scipy_2io_6matlab_10mio5_utils_miUINT16);
-  if (__pyx_t_4) {
+  __pyx_t_6 = (__pyx_v_mdtype == __pyx_e_5scipy_2io_6matlab_10mio5_utils_miUINT16);
+  if (__pyx_t_6) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":741
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":741
  *         cdef cnp.dtype dt = <cnp.dtype>self.dtypes[mdtype]
  *         if mdtype == miUINT16:
  *             codec = self.uint16_codec             # <<<<<<<<<<<<<<
@@ -5379,196 +5495,198 @@
     __Pyx_DECREF(__pyx_v_codec);
     __pyx_v_codec = __pyx_v_self->uint16_codec;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":742
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":742
  *         if mdtype == miUINT16:
  *             codec = self.uint16_codec
  *             if self.codecs['uint16_len'] == 1: # need LSBs only             # <<<<<<<<<<<<<<
  *                 arr = np.ndarray(shape=(length,),
  *                                   dtype=dt,
  */
-    __pyx_1 = PyObject_GetItem(__pyx_v_self->codecs, __pyx_kp_53); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    __pyx_t_2 = PyObject_RichCompare(__pyx_1, __pyx_int_1, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (__pyx_t_4) {
+    __pyx_t_1 = PyObject_GetItem(__pyx_v_self->codecs, ((PyObject *)__pyx_n_s__uint16_len)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_int_1, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (__pyx_t_6) {
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":743
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":743
  *             codec = self.uint16_codec
  *             if self.codecs['uint16_len'] == 1: # need LSBs only
  *                 arr = np.ndarray(shape=(length,),             # <<<<<<<<<<<<<<
  *                                   dtype=dt,
  *                                   buffer=data)
  */
-      __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_1);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_ndarray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__ndarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+      __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-      __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_1));
-      __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
-      __Pyx_GIVEREF(__pyx_t_1);
-      __pyx_t_1 = 0;
-      if (PyDict_SetItem(__pyx_1, __pyx_kp_shape, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
+      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
+      __pyx_t_2 = 0;
+      if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__shape), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":744
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":744
  *             if self.codecs['uint16_len'] == 1: # need LSBs only
  *                 arr = np.ndarray(shape=(length,),
  *                                   dtype=dt,             # <<<<<<<<<<<<<<
  *                                   buffer=data)
  *                 data = arr.astype(np.uint8).tostring()
  */
-      if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, ((PyObject *)__pyx_v_dt)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_v_dt)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":745
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":745
  *                 arr = np.ndarray(shape=(length,),
  *                                   dtype=dt,
  *                                   buffer=data)             # <<<<<<<<<<<<<<
  *                 data = arr.astype(np.uint8).tostring()
  *         elif mdtype == miINT8 or mdtype == miUINT8:
  */
-      if (PyDict_SetItem(__pyx_1, __pyx_kp_buffer, __pyx_v_data) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
-      if (!(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__buffer), __pyx_v_data) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+      if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(((PyObject *)__pyx_v_arr));
-      __pyx_v_arr = ((PyArrayObject *)__pyx_t_5);
-      __pyx_t_5 = 0;
+      __pyx_v_arr = ((PyArrayObject *)__pyx_t_7);
+      __pyx_t_7 = 0;
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":746
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":746
  *                                   dtype=dt,
  *                                   buffer=data)
  *                 data = arr.astype(np.uint8).tostring()             # <<<<<<<<<<<<<<
  *         elif mdtype == miINT8 or mdtype == miUINT8:
  *             codec = 'ascii'
  */
-      __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_kp_astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_1);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_54); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
-      __Pyx_GIVEREF(__pyx_t_2);
-      __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-      __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_kp_tostring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__astype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__uint8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __pyx_t_1 = 0;
+      __pyx_t_1 = PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__tostring); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
       __Pyx_DECREF(__pyx_v_data);
-      __pyx_v_data = __pyx_t_2;
-      __pyx_t_2 = 0;
+      __pyx_v_data = __pyx_t_1;
+      __pyx_t_1 = 0;
       goto __pyx_L4;
     }
     __pyx_L4:;
     goto __pyx_L3;
   }
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":747
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":747
  *                                   buffer=data)
  *                 data = arr.astype(np.uint8).tostring()
  *         elif mdtype == miINT8 or mdtype == miUINT8:             # <<<<<<<<<<<<<<
  *             codec = 'ascii'
  *         elif mdtype in self.codecs: # encoded char data
  */
-  if (!(__pyx_v_mdtype == __pyx_e_5scipy_2io_6matlab_10mio5_utils_miINT8)) {
-    __pyx_t_4 = (__pyx_v_mdtype == __pyx_e_5scipy_2io_6matlab_10mio5_utils_miUINT8);
+  __pyx_t_6 = (__pyx_v_mdtype == __pyx_e_5scipy_2io_6matlab_10mio5_utils_miINT8);
+  if (!__pyx_t_6) {
+    __pyx_t_8 = (__pyx_v_mdtype == __pyx_e_5scipy_2io_6matlab_10mio5_utils_miUINT8);
+    __pyx_t_9 = __pyx_t_8;
   } else {
-    __pyx_t_4 = (__pyx_v_mdtype == __pyx_e_5scipy_2io_6matlab_10mio5_utils_miINT8);
+    __pyx_t_9 = __pyx_t_6;
   }
-  if (__pyx_t_4) {
+  if (__pyx_t_9) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":748
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":748
  *                 data = arr.astype(np.uint8).tostring()
  *         elif mdtype == miINT8 or mdtype == miUINT8:
  *             codec = 'ascii'             # <<<<<<<<<<<<<<
  *         elif mdtype in self.codecs: # encoded char data
  *             codec = self.codecs[mdtype]
  */
-    __Pyx_INCREF(__pyx_kp_55);
+    __Pyx_INCREF(((PyObject *)__pyx_n_s__ascii));
     __Pyx_DECREF(__pyx_v_codec);
-    __pyx_v_codec = __pyx_kp_55;
+    __pyx_v_codec = ((PyObject *)__pyx_n_s__ascii);
     goto __pyx_L3;
   }
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":749
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":749
  *         elif mdtype == miINT8 or mdtype == miUINT8:
  *             codec = 'ascii'
  *         elif mdtype in self.codecs: # encoded char data             # <<<<<<<<<<<<<<
  *             codec = self.codecs[mdtype]
  *             if not codec:
  */
-  __pyx_t_2 = __Pyx_PyInt_to_py_npy_uint32(__pyx_v_mdtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_4 = (PySequence_Contains(__pyx_v_self->codecs, __pyx_t_2)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (__pyx_t_4) {
+  __pyx_t_1 = __Pyx_PyInt_to_py_npy_uint32(__pyx_v_mdtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_9 = ((PySequence_Contains(__pyx_v_self->codecs, __pyx_t_1))); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_9) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":750
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":750
  *             codec = 'ascii'
  *         elif mdtype in self.codecs: # encoded char data
  *             codec = self.codecs[mdtype]             # <<<<<<<<<<<<<<
  *             if not codec:
  *                 raise TypeError('Do not support encoding %d' % mdtype)
  */
-    __pyx_1 = __Pyx_GetItemInt(__pyx_v_self->codecs, __pyx_v_mdtype, sizeof(__pyx_t_5numpy_uint32_t)+1, __Pyx_PyInt_to_py_npy_uint32); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
+    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->codecs, __pyx_v_mdtype, sizeof(__pyx_t_5numpy_uint32_t)+1, __Pyx_PyInt_to_py_npy_uint32); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_v_codec);
-    __pyx_v_codec = __pyx_1;
-    __pyx_1 = 0;
+    __pyx_v_codec = __pyx_t_1;
+    __pyx_t_1 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":751
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":751
  *         elif mdtype in self.codecs: # encoded char data
  *             codec = self.codecs[mdtype]
  *             if not codec:             # <<<<<<<<<<<<<<
  *                 raise TypeError('Do not support encoding %d' % mdtype)
  *         else:
  */
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_codec); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_6 = (!__pyx_t_4);
+    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_codec); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = (!__pyx_t_9);
     if (__pyx_t_6) {
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":752
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":752
  *             codec = self.codecs[mdtype]
  *             if not codec:
  *                 raise TypeError('Do not support encoding %d' % mdtype)             # <<<<<<<<<<<<<<
  *         else:
  *             raise ValueError('Type %d does not appear to be char type'
  */
-      __pyx_t_2 = __Pyx_PyInt_to_py_npy_uint32(__pyx_v_mdtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_1 = PyNumber_Remainder(__pyx_kp_56, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyInt_to_py_npy_uint32(__pyx_v_mdtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
-      __Pyx_GIVEREF(__pyx_t_1);
-      __pyx_t_1 = 0;
-      __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      __Pyx_Raise(__pyx_t_1, 0, 0);
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
+      __Pyx_GIVEREF(__pyx_t_3);
+      __pyx_t_3 = 0;
+      __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_Raise(__pyx_t_3, 0, 0);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L5;
     }
@@ -5577,81 +5695,81 @@
   }
   /*else*/ {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":755
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":755
  *         else:
  *             raise ValueError('Type %d does not appear to be char type'
  *                              % mdtype)             # <<<<<<<<<<<<<<
  *         uc_str = data.decode(codec)
  *         # cast to array to deal with 2, 4 byte width characters
  */
-    __pyx_t_1 = __Pyx_PyInt_to_py_npy_uint32(__pyx_v_mdtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyInt_to_py_npy_uint32(__pyx_v_mdtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyNumber_Remainder(__pyx_kp_57, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
-    __Pyx_GIVEREF(__pyx_t_2);
-    __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __Pyx_Raise(__pyx_t_2, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   __pyx_L3:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":756
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":756
  *             raise ValueError('Type %d does not appear to be char type'
  *                              % mdtype)
  *         uc_str = data.decode(codec)             # <<<<<<<<<<<<<<
  *         # cast to array to deal with 2, 4 byte width characters
  *         arr = np.array(uc_str)
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_data, __pyx_kp_decode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_data, __pyx_n_s__decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(__pyx_v_codec);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_codec);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_codec);
   __Pyx_GIVEREF(__pyx_v_codec);
-  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_7 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_v_uc_str);
-  __pyx_v_uc_str = __pyx_t_5;
-  __pyx_t_5 = 0;
+  __pyx_v_uc_str = __pyx_t_7;
+  __pyx_t_7 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":758
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":758
  *         uc_str = data.decode(codec)
  *         # cast to array to deal with 2, 4 byte width characters
  *         arr = np.array(uc_str)             # <<<<<<<<<<<<<<
  *         dt = self.U1_dtype
  *         # could take this to numpy C-API level, but probably not worth
  */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  __pyx_t_5 = PyObject_GetAttr(__pyx_1, __pyx_kp_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_3 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
   __Pyx_INCREF(__pyx_v_uc_str);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_uc_str);
+  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_uc_str);
   __Pyx_GIVEREF(__pyx_v_uc_str);
-  __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(((PyObject *)__pyx_v_arr));
-  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
-  __pyx_t_2 = 0;
+  __pyx_v_arr = ((PyArrayObject *)__pyx_t_1);
+  __pyx_t_1 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":759
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":759
  *         # cast to array to deal with 2, 4 byte width characters
  *         arr = np.array(uc_str)
  *         dt = self.U1_dtype             # <<<<<<<<<<<<<<
@@ -5662,7 +5780,7 @@
   __Pyx_DECREF(((PyObject *)__pyx_v_dt));
   __pyx_v_dt = __pyx_v_self->U1_dtype;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":762
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":762
  *         # could take this to numpy C-API level, but probably not worth
  *         # it
  *         return np.ndarray(shape=header.dims,             # <<<<<<<<<<<<<<
@@ -5670,57 +5788,49 @@
  *                           buffer=arr,
  */
   __Pyx_XDECREF(((PyObject *)__pyx_r));
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_ndarray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_1));
-  if (PyDict_SetItem(__pyx_1, __pyx_kp_shape, __pyx_v_header->dims) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__ndarray); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__shape), __pyx_v_header->dims) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":763
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":763
  *         # it
  *         return np.ndarray(shape=header.dims,
  *                           dtype=dt,             # <<<<<<<<<<<<<<
  *                           buffer=arr,
  *                           order='F')
  */
-  if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, ((PyObject *)__pyx_v_dt)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_v_dt)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":764
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":764
  *         return np.ndarray(shape=header.dims,
  *                           dtype=dt,
  *                           buffer=arr,             # <<<<<<<<<<<<<<
  *                           order='F')
  * 
  */
-  if (PyDict_SetItem(__pyx_1, __pyx_kp_buffer, ((PyObject *)__pyx_v_arr)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":765
- *                           dtype=dt,
- *                           buffer=arr,
- *                           order='F')             # <<<<<<<<<<<<<<
- * 
- *     cpdef cnp.ndarray read_cells(self, VarHeader5 header):
- */
-  if (PyDict_SetItem(__pyx_1, __pyx_kp_order, __pyx_kp_58) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
-  if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = ((PyArrayObject *)__pyx_t_1);
-  __pyx_t_1 = 0;
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__buffer), ((PyObject *)__pyx_v_arr)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__order), ((PyObject *)__pyx_n_s__F)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = ((PyArrayObject *)__pyx_t_3);
+  __pyx_t_3 = 0;
   goto __pyx_L0;
 
   __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_1);
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_7);
   __Pyx_AddTraceback("scipy.io.matlab.mio5_utils.VarReader5.read_char");
   __pyx_r = 0;
   __pyx_L0:;
@@ -5729,12 +5839,14 @@
   __Pyx_DECREF((PyObject *)__pyx_v_arr);
   __Pyx_XDECREF((PyObject *)__pyx_v_dt);
   __Pyx_DECREF(__pyx_v_uc_str);
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
+  __Pyx_DECREF((PyObject *)__pyx_v_header);
   __Pyx_XGIVEREF((PyObject *)__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":706
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":706
  *             shape=(M,N))
  * 
  *     cpdef cnp.ndarray read_char(self, VarHeader5 header):             # <<<<<<<<<<<<<<
@@ -5743,11 +5855,11 @@
  */
 
 static PyObject *__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_char(PyObject *__pyx_v_self, PyObject *__pyx_v_header); /*proto*/
-static char __pyx_doc_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_char[] = " Read char matrices from stream as arrays\n\n        Matrices of char are likely to be converted to matrices of\n        string by later processing in ``process_element``\n        ";
+static char __pyx_doc_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_char[] = " Read char matrices from stream as arrays\n\n        Matrices of char are likely to be converted to matrices of\n        string by later processing in ``array_from_header``\n        ";
 static PyObject *__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_char(PyObject *__pyx_v_self, PyObject *__pyx_v_header) {
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
-  __Pyx_SetupRefcountContext("read_char");
+  __Pyx_RefNannySetupContext("read_char");
   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_header), __pyx_ptype_5scipy_2io_6matlab_10mio5_utils_VarHeader5, 1, "header", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_XDECREF(__pyx_r);
   __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->__pyx_vtab)->read_char(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self), ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *)__pyx_v_header), 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -5764,11 +5876,11 @@
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":767
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":767
  *                           order='F')
  * 
  *     cpdef cnp.ndarray read_cells(self, VarHeader5 header):             # <<<<<<<<<<<<<<
@@ -5786,20 +5898,22 @@
   Py_ssize_t __pyx_bstride_0_result = 0;
   Py_ssize_t __pyx_bshape_0_result = 0;
   PyArrayObject *__pyx_r = NULL;
-  PyObject *__pyx_1 = 0;
-  PyObject *__pyx_2 = 0;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
-  PyArrayObject *__pyx_t_4 = NULL;
-  int __pyx_t_5;
-  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyArrayObject *__pyx_t_5 = NULL;
+  int __pyx_t_6;
   PyObject *__pyx_t_7 = NULL;
   PyObject *__pyx_t_8 = NULL;
-  size_t __pyx_t_9;
+  PyObject *__pyx_t_9 = NULL;
   size_t __pyx_t_10;
-  PyObject **__pyx_t_11;
-  __Pyx_SetupRefcountContext("read_cells");
+  size_t __pyx_t_11;
+  size_t __pyx_t_12;
+  PyObject **__pyx_t_13;
+  __Pyx_RefNannySetupContext("read_cells");
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
+  __Pyx_INCREF((PyObject *)__pyx_v_header);
   __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_tupdims = Py_None; __Pyx_INCREF(Py_None);
   __pyx_bstruct_result.buf = NULL;
@@ -5807,52 +5921,52 @@
   if (unlikely(__pyx_skip_dispatch)) ;
   /* Check if overriden in Python */
   else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
-    __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_kp_read_cells); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    if (!PyCFunction_Check(__pyx_1) || (PyCFunction_GET_FUNCTION(__pyx_1) != (void *)&__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_cells)) {
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__read_cells); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_cells)) {
       __Pyx_XDECREF(((PyObject *)__pyx_r));
-      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __Pyx_INCREF(((PyObject *)__pyx_v_header));
-      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_header));
+      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_header));
       __Pyx_GIVEREF(((PyObject *)__pyx_v_header));
-      __pyx_t_2 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-      if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_r = ((PyArrayObject *)__pyx_t_2);
-      __pyx_t_2 = 0;
+      __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_r = ((PyArrayObject *)__pyx_t_3);
+      __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       goto __pyx_L0;
     }
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":773
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":773
  *             cnp.ndarray[object, ndim=1] result
  *         # Account for fortran indexing of cells
  *         tupdims = tuple(header.dims[::-1])             # <<<<<<<<<<<<<<
  *         cdef size_t length = self.size_from_header(header)
  *         result = np.empty(length, dtype=object)
  */
-  __pyx_1 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  __pyx_2 = PyObject_GetItem(__pyx_v_header->dims, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_2);
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_2);
-  __Pyx_GIVEREF(__pyx_2);
-  __pyx_2 = 0;
-  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyTuple_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __pyx_t_3 = PyObject_GetItem(__pyx_v_header->dims, __pyx_t_1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_3 = 0;
+  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyTuple_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_v_tupdims);
-  __pyx_v_tupdims = __pyx_t_1;
-  __pyx_t_1 = 0;
+  __pyx_v_tupdims = __pyx_t_3;
+  __pyx_t_3 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":774
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":774
  *         # Account for fortran indexing of cells
  *         tupdims = tuple(header.dims[::-1])
  *         cdef size_t length = self.size_from_header(header)             # <<<<<<<<<<<<<<
@@ -5861,92 +5975,93 @@
  */
   __pyx_v_length = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->size_from_header(__pyx_v_self, __pyx_v_header);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":775
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":775
  *         tupdims = tuple(header.dims[::-1])
  *         cdef size_t length = self.size_from_header(header)
  *         result = np.empty(length, dtype=object)             # <<<<<<<<<<<<<<
  *         for i in range(length):
  *             result[i] = self.read_mi_matrix()
  */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_3 = 0;
+  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
-  __Pyx_GIVEREF(__pyx_t_2);
-  __pyx_t_2 = 0;
-  __pyx_2 = PyDict_New(); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_2));
-  if (PyDict_SetItem(__pyx_2, __pyx_kp_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_2)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_1, __pyx_t_2, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
-  if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_4 = ((PyArrayObject *)__pyx_t_2);
+  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
   {
     __Pyx_BufFmt_StackElem __pyx_stack[1];
     __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
-    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
-    if (unlikely(__pyx_t_5 < 0)) {
-      PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
+    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
+    if (unlikely(__pyx_t_6 < 0)) {
+      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
       if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
-        Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8);
+        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
         __Pyx_RaiseBufferFallbackError();
       } else {
-        PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
+        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
       }
     }
     __pyx_bstride_0_result = __pyx_bstruct_result.strides[0];
     __pyx_bshape_0_result = __pyx_bstruct_result.shape[0];
-    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
+  __pyx_t_5 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_v_result));
+  __pyx_v_result = ((PyArrayObject *)__pyx_t_4);
   __pyx_t_4 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_v_result));
-  __pyx_v_result = ((PyArrayObject *)__pyx_t_2);
-  __pyx_t_2 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":776
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":776
  *         cdef size_t length = self.size_from_header(header)
  *         result = np.empty(length, dtype=object)
  *         for i in range(length):             # <<<<<<<<<<<<<<
  *             result[i] = self.read_mi_matrix()
  *         return result.reshape(tupdims).T
  */
-  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_v_length; __pyx_t_9+=1) {
-    __pyx_v_i = __pyx_t_9;
+  __pyx_t_10 = __pyx_v_length;
+  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
+    __pyx_v_i = __pyx_t_11;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":777
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":777
  *         result = np.empty(length, dtype=object)
  *         for i in range(length):
  *             result[i] = self.read_mi_matrix()             # <<<<<<<<<<<<<<
  *         return result.reshape(tupdims).T
  * 
  */
-    __pyx_t_2 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_mi_matrix(__pyx_v_self, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_10 = __pyx_v_i;
-    __pyx_t_5 = -1;
-    if (unlikely(__pyx_t_10 >= __pyx_bshape_0_result)) __pyx_t_5 = 0;
-    if (unlikely(__pyx_t_5 != -1)) {
-      __Pyx_RaiseBufferIndexError(__pyx_t_5);
+    __pyx_t_4 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_mi_matrix(__pyx_v_self, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_12 = __pyx_v_i;
+    __pyx_t_6 = -1;
+    if (unlikely(__pyx_t_12 >= __pyx_bshape_0_result)) __pyx_t_6 = 0;
+    if (unlikely(__pyx_t_6 != -1)) {
+      __Pyx_RaiseBufferIndexError(__pyx_t_6);
       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_result.buf, __pyx_t_10, __pyx_bstride_0_result);
-    __Pyx_GOTREF(*__pyx_t_11);
-    __Pyx_DECREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_2);
-    *__pyx_t_11 = __pyx_t_2;
-    __Pyx_GIVEREF(*__pyx_t_11);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_result.buf, __pyx_t_12, __pyx_bstride_0_result);
+    __Pyx_GOTREF(*__pyx_t_13);
+    __Pyx_DECREF(*__pyx_t_13); __Pyx_INCREF(__pyx_t_4);
+    *__pyx_t_13 = __pyx_t_4;
+    __Pyx_GIVEREF(*__pyx_t_13);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   }
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":778
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":778
  *         for i in range(length):
  *             result[i] = self.read_mi_matrix()
  *         return result.reshape(tupdims).T             # <<<<<<<<<<<<<<
@@ -5954,21 +6069,21 @@
  *     def read_fieldnames(self):
  */
   __Pyx_XDECREF(((PyObject *)__pyx_r));
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_kp_reshape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__reshape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(__pyx_v_tupdims);
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_tupdims);
   __Pyx_GIVEREF(__pyx_v_tupdims);
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__T); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_kp_T); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_r = ((PyArrayObject *)__pyx_t_3);
   __pyx_t_3 = 0;
   goto __pyx_L0;
@@ -5976,11 +6091,10 @@
   __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_1);
-  __Pyx_XDECREF(__pyx_2);
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
   { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
     __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
     __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
@@ -5993,12 +6107,14 @@
   __pyx_L2:;
   __Pyx_DECREF((PyObject *)__pyx_v_result);
   __Pyx_DECREF(__pyx_v_tupdims);
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
+  __Pyx_DECREF((PyObject *)__pyx_v_header);
   __Pyx_XGIVEREF((PyObject *)__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":767
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":767
  *                           order='F')
  * 
  *     cpdef cnp.ndarray read_cells(self, VarHeader5 header):             # <<<<<<<<<<<<<<
@@ -6011,7 +6127,7 @@
 static PyObject *__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_cells(PyObject *__pyx_v_self, PyObject *__pyx_v_header) {
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
-  __Pyx_SetupRefcountContext("read_cells");
+  __Pyx_RefNannySetupContext("read_cells");
   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_header), __pyx_ptype_5scipy_2io_6matlab_10mio5_utils_VarHeader5, 1, "header", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_XDECREF(__pyx_r);
   __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->__pyx_vtab)->read_cells(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self), ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *)__pyx_v_header), 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -6028,11 +6144,11 @@
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":780
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":780
  *         return result.reshape(tupdims).T
  * 
  *     def read_fieldnames(self):             # <<<<<<<<<<<<<<
@@ -6046,9 +6162,9 @@
   int __pyx_v_n_names;
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
-  __Pyx_SetupRefcountContext("read_fieldnames");
+  __Pyx_RefNannySetupContext("read_fieldnames");
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":786
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":786
  *         '''
  *         cdef int n_names
  *         return self.cread_fieldnames(&n_names)             # <<<<<<<<<<<<<<
@@ -6070,11 +6186,11 @@
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":788
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":788
  *         return self.cread_fieldnames(&n_names)
  * 
  *     cdef inline object cread_fieldnames(self, int *n_names_ptr):             # <<<<<<<<<<<<<<
@@ -6082,7 +6198,7 @@
  *             cnp.int32_t namelength
  */
 
-static INLINE PyObject *__pyx_f_5scipy_2io_6matlab_10mio5_utils_10VarReader5_cread_fieldnames(struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *__pyx_v_self, int *__pyx_v_n_names_ptr) {
+static CYTHON_INLINE PyObject *__pyx_f_5scipy_2io_6matlab_10mio5_utils_10VarReader5_cread_fieldnames(struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *__pyx_v_self, int *__pyx_v_n_names_ptr) {
   __pyx_t_5numpy_int32_t __pyx_v_namelength;
   int __pyx_v_i;
   int __pyx_v_n_names;
@@ -6096,12 +6212,15 @@
   int __pyx_t_2;
   PyObject *__pyx_t_3 = NULL;
   PyObject *__pyx_t_4 = NULL;
-  char *__pyx_t_5;
-  __Pyx_SetupRefcountContext("cread_fieldnames");
+  Py_ssize_t __pyx_t_5;
+  char *__pyx_t_6;
+  int __pyx_t_7;
+  __Pyx_RefNannySetupContext("cread_fieldnames");
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
   __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_field_names = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":794
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":794
  *             object name, field_names
  *         # Read field names into list
  *         cdef int res = self.read_into_int32s(&namelength)             # <<<<<<<<<<<<<<
@@ -6111,7 +6230,7 @@
   __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_into_int32s(__pyx_v_self, (&__pyx_v_namelength)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_res = __pyx_t_1;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":795
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":795
  *         # Read field names into list
  *         cdef int res = self.read_into_int32s(&namelength)
  *         if res != 1:             # <<<<<<<<<<<<<<
@@ -6121,7 +6240,7 @@
   __pyx_t_2 = (__pyx_v_res != 1);
   if (__pyx_t_2) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":796
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":796
  *         cdef int res = self.read_into_int32s(&namelength)
  *         if res != 1:
  *             raise ValueError('Only one value for namelength')             # <<<<<<<<<<<<<<
@@ -6129,13 +6248,13 @@
  *         field_names = []
  */
     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-    __Pyx_INCREF(__pyx_kp_59);
-    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_59);
-    __Pyx_GIVEREF(__pyx_kp_59);
-    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_10));
+    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_10));
+    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_10));
+    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __Pyx_Raise(__pyx_t_4, 0, 0);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -6143,7 +6262,7 @@
   }
   __pyx_L3:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":797
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":797
  *         if res != 1:
  *             raise ValueError('Only one value for namelength')
  *         cdef object names = self.read_int8_string()             # <<<<<<<<<<<<<<
@@ -6155,7 +6274,7 @@
   __pyx_v_names = __pyx_t_4;
   __pyx_t_4 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":798
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":798
  *             raise ValueError('Only one value for namelength')
  *         cdef object names = self.read_int8_string()
  *         field_names = []             # <<<<<<<<<<<<<<
@@ -6168,36 +6287,46 @@
   __pyx_v_field_names = ((PyObject *)__pyx_t_4);
   __pyx_t_4 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":799
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":799
  *         cdef object names = self.read_int8_string()
  *         field_names = []
  *         n_names = PyString_Size(names) // namelength             # <<<<<<<<<<<<<<
  *         cdef char *n_ptr = names
  *         for i in range(n_names):
  */
-  __pyx_v_n_names = (PyString_Size(__pyx_v_names) / __pyx_v_namelength);
+  __pyx_t_5 = PyString_Size(__pyx_v_names); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(__pyx_v_namelength == 0)) {
+    PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  else if (sizeof(Py_ssize_t) == sizeof(long) && unlikely(__pyx_v_namelength == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_5))) {
+    PyErr_Format(PyExc_OverflowError, "value too large to perform division");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_v_n_names = __Pyx_div_Py_ssize_t(__pyx_t_5, __pyx_v_namelength);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":800
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":800
  *         field_names = []
  *         n_names = PyString_Size(names) // namelength
  *         cdef char *n_ptr = names             # <<<<<<<<<<<<<<
  *         for i in range(n_names):
  *             name = PyString_FromString(n_ptr)
  */
-  __pyx_t_5 = __Pyx_PyBytes_AsString(__pyx_v_names); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_n_ptr = __pyx_t_5;
+  __pyx_t_6 = __Pyx_PyBytes_AsString(__pyx_v_names); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_n_ptr = __pyx_t_6;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":801
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":801
  *         n_names = PyString_Size(names) // namelength
  *         cdef char *n_ptr = names
  *         for i in range(n_names):             # <<<<<<<<<<<<<<
  *             name = PyString_FromString(n_ptr)
  *             field_names.append(name)
  */
-  for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_v_n_names; __pyx_t_1+=1) {
-    __pyx_v_i = __pyx_t_1;
+  __pyx_t_1 = __pyx_v_n_names;
+  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) {
+    __pyx_v_i = __pyx_t_7;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":802
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":802
  *         cdef char *n_ptr = names
  *         for i in range(n_names):
  *             name = PyString_FromString(n_ptr)             # <<<<<<<<<<<<<<
@@ -6210,7 +6339,7 @@
     __pyx_v_name = __pyx_t_4;
     __pyx_t_4 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":803
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":803
  *         for i in range(n_names):
  *             name = PyString_FromString(n_ptr)
  *             field_names.append(name)             # <<<<<<<<<<<<<<
@@ -6221,7 +6350,7 @@
     __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":804
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":804
  *             name = PyString_FromString(n_ptr)
  *             field_names.append(name)
  *             n_ptr += namelength             # <<<<<<<<<<<<<<
@@ -6231,7 +6360,7 @@
     __pyx_v_n_ptr += __pyx_v_namelength;
   }
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":805
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":805
  *             field_names.append(name)
  *             n_ptr += namelength
  *         n_names_ptr[0] = n_names             # <<<<<<<<<<<<<<
@@ -6240,7 +6369,7 @@
  */
   (__pyx_v_n_names_ptr[0]) = __pyx_v_n_names;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":806
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":806
  *             n_ptr += namelength
  *         n_names_ptr[0] = n_names
  *         return field_names             # <<<<<<<<<<<<<<
@@ -6263,12 +6392,13 @@
   __Pyx_DECREF(__pyx_v_name);
   __Pyx_DECREF(__pyx_v_field_names);
   __Pyx_XDECREF(__pyx_v_names);
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":808
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":808
  *         return field_names
  * 
  *     cpdef cnp.ndarray read_struct(self, VarHeader5 header):             # <<<<<<<<<<<<<<
@@ -6294,22 +6424,24 @@
   Py_ssize_t __pyx_bstride_0_result = 0;
   Py_ssize_t __pyx_bshape_0_result = 0;
   PyArrayObject *__pyx_r = NULL;
-  PyObject *__pyx_1 = 0;
-  PyObject *__pyx_2 = 0;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
+  PyObject *__pyx_t_3 = NULL;
   int __pyx_t_4;
-  PyObject *__pyx_t_5 = NULL;
-  Py_ssize_t __pyx_t_6;
-  PyArrayObject *__pyx_t_7 = NULL;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *__pyx_t_9 = NULL;
+  int __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  Py_ssize_t __pyx_t_7;
+  size_t __pyx_t_8;
+  PyArrayObject *__pyx_t_9 = NULL;
   PyObject *__pyx_t_10 = NULL;
-  int __pyx_t_11;
-  int __pyx_t_12;
-  PyObject **__pyx_t_13;
-  __Pyx_SetupRefcountContext("read_struct");
+  PyObject *__pyx_t_11 = NULL;
+  PyObject *__pyx_t_12 = NULL;
+  int __pyx_t_13;
+  int __pyx_t_14;
+  PyObject **__pyx_t_15;
+  __Pyx_RefNannySetupContext("read_struct");
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
+  __Pyx_INCREF((PyObject *)__pyx_v_header);
   __pyx_v_rec_res = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_dt = Py_None; __Pyx_INCREF(Py_None);
@@ -6323,64 +6455,64 @@
   if (unlikely(__pyx_skip_dispatch)) ;
   /* Check if overriden in Python */
   else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
-    __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_kp_read_struct); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    if (!PyCFunction_Check(__pyx_1) || (PyCFunction_GET_FUNCTION(__pyx_1) != (void *)&__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_struct)) {
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__read_struct); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_struct)) {
       __Pyx_XDECREF(((PyObject *)__pyx_r));
-      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __Pyx_INCREF(((PyObject *)__pyx_v_header));
-      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_header));
+      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_header));
       __Pyx_GIVEREF(((PyObject *)__pyx_v_header));
-      __pyx_t_2 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-      if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_r = ((PyArrayObject *)__pyx_t_2);
-      __pyx_t_2 = 0;
+      __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_r = ((PyArrayObject *)__pyx_t_3);
+      __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       goto __pyx_L0;
     }
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":821
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":821
  *             object dt, tupdims
  *         # Read field names into list
  *         cdef object field_names = self.cread_fieldnames(&n_names)             # <<<<<<<<<<<<<<
  *         # Prepare struct array
  *         tupdims = tuple(header.dims[::-1])
  */
-  __pyx_t_2 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->cread_fieldnames(__pyx_v_self, (&__pyx_v_n_names)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_v_field_names = __pyx_t_2;
-  __pyx_t_2 = 0;
+  __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->cread_fieldnames(__pyx_v_self, (&__pyx_v_n_names)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_field_names = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":823
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":823
  *         cdef object field_names = self.cread_fieldnames(&n_names)
  *         # Prepare struct array
  *         tupdims = tuple(header.dims[::-1])             # <<<<<<<<<<<<<<
  *         cdef size_t length = self.size_from_header(header)
  *         if self.struct_as_record: # to record arrays
  */
-  __pyx_1 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  __pyx_2 = PyObject_GetItem(__pyx_v_header->dims, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_2);
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_2);
-  __Pyx_GIVEREF(__pyx_2);
-  __pyx_2 = 0;
-  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyTuple_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __pyx_t_3 = PyObject_GetItem(__pyx_v_header->dims, __pyx_t_1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_3 = 0;
+  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyTuple_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_v_tupdims);
-  __pyx_v_tupdims = __pyx_t_1;
-  __pyx_t_1 = 0;
+  __pyx_v_tupdims = __pyx_t_3;
+  __pyx_t_3 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":824
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":824
  *         # Prepare struct array
  *         tupdims = tuple(header.dims[::-1])
  *         cdef size_t length = self.size_from_header(header)             # <<<<<<<<<<<<<<
@@ -6389,27 +6521,27 @@
  */
   __pyx_v_length = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->size_from_header(__pyx_v_self, __pyx_v_header);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":825
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":825
  *         tupdims = tuple(header.dims[::-1])
  *         cdef size_t length = self.size_from_header(header)
  *         if self.struct_as_record: # to record arrays             # <<<<<<<<<<<<<<
  *             if not n_names:
  *                 # If there are no field names, there is no dtype
  */
-  __pyx_t_3 = __pyx_v_self->struct_as_record;
-  if (__pyx_t_3) {
+  __pyx_t_4 = __pyx_v_self->struct_as_record;
+  if (__pyx_t_4) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":826
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":826
  *         cdef size_t length = self.size_from_header(header)
  *         if self.struct_as_record: # to record arrays
  *             if not n_names:             # <<<<<<<<<<<<<<
  *                 # If there are no field names, there is no dtype
  *                 # representation we can use, falling back to empty
  */
-    __pyx_t_4 = (!__pyx_v_n_names);
-    if (__pyx_t_4) {
+    __pyx_t_5 = (!__pyx_v_n_names);
+    if (__pyx_t_5) {
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":830
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":830
  *                 # representation we can use, falling back to empty
  *                 # object
  *                 return np.empty(tupdims, dtype=object).T             # <<<<<<<<<<<<<<
@@ -6417,28 +6549,28 @@
  *             rec_res = np.empty(length, dtype=dt)
  */
       __Pyx_XDECREF(((PyObject *)__pyx_r));
-      __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_1);
-      __pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_INCREF(__pyx_v_tupdims);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tupdims);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_tupdims);
       __Pyx_GIVEREF(__pyx_v_tupdims);
-      __pyx_2 = PyDict_New(); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_2));
-      if (PyDict_SetItem(__pyx_2, __pyx_kp_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+      if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_1, __pyx_t_3, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
-      __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_kp_T); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__T); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __pyx_r = ((PyArrayObject *)__pyx_t_2);
       __pyx_t_2 = 0;
       goto __pyx_L0;
@@ -6446,7 +6578,7 @@
     }
     __pyx_L4:;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":831
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":831
  *                 # object
  *                 return np.empty(tupdims, dtype=object).T
  *             dt = [(field_name, object) for field_name in field_names]             # <<<<<<<<<<<<<<
@@ -6456,89 +6588,90 @@
     __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
     if (PyList_CheckExact(__pyx_v_field_names) || PyTuple_CheckExact(__pyx_v_field_names)) {
-      __pyx_t_6 = 0; __pyx_t_5 = __pyx_v_field_names; __Pyx_INCREF(__pyx_t_5);
+      __pyx_t_7 = 0; __pyx_t_6 = __pyx_v_field_names; __Pyx_INCREF(__pyx_t_6);
     } else {
-      __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_field_names); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_field_names); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
     }
     for (;;) {
-      if (likely(PyList_CheckExact(__pyx_t_5))) {
-        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
-        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
-      } else if (likely(PyTuple_CheckExact(__pyx_t_5))) {
-        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
-        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
+      if (likely(PyList_CheckExact(__pyx_t_6))) {
+        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break;
+        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++;
+      } else if (likely(PyTuple_CheckExact(__pyx_t_6))) {
+        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++;
       } else {
-        __pyx_t_1 = PyIter_Next(__pyx_t_5);
-        if (!__pyx_t_1) {
+        __pyx_t_3 = PyIter_Next(__pyx_t_6);
+        if (!__pyx_t_3) {
           if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           break;
         }
-        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_GOTREF(__pyx_t_3);
       }
       __Pyx_DECREF(__pyx_v_field_name);
-      __pyx_v_field_name = __pyx_t_1;
-      __pyx_t_1 = 0;
-      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+      __pyx_v_field_name = __pyx_t_3;
+      __pyx_t_3 = 0;
+      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_INCREF(__pyx_v_field_name);
-      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_field_name);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_field_name);
       __Pyx_GIVEREF(__pyx_v_field_name);
       __Pyx_INCREF(__pyx_builtin_object);
-      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_builtin_object);
+      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_builtin_object);
       __Pyx_GIVEREF(__pyx_builtin_object);
-      __pyx_t_3 = PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_1); if (unlikely(__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+      __pyx_t_4 = PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_3); if (unlikely(__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     }
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     __Pyx_INCREF(((PyObject *)__pyx_t_2));
     __Pyx_DECREF(__pyx_v_dt);
     __pyx_v_dt = ((PyObject *)__pyx_t_2);
     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":832
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":832
  *                 return np.empty(tupdims, dtype=object).T
  *             dt = [(field_name, object) for field_name in field_names]
  *             rec_res = np.empty(length, dtype=dt)             # <<<<<<<<<<<<<<
  *             for i in range(length):
  *                 for field_name in field_names:
  */
-    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-    __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
-    __Pyx_GIVEREF(__pyx_t_5);
-    __pyx_t_5 = 0;
-    __pyx_2 = PyDict_New(); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_2));
-    if (PyDict_SetItem(__pyx_2, __pyx_kp_dtype, __pyx_v_dt) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
-    if (!(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    __pyx_t_2 = 0;
+    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+    if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_v_dt) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_6, __pyx_t_3, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(((PyObject *)__pyx_v_rec_res));
-    __pyx_v_rec_res = ((PyArrayObject *)__pyx_t_5);
-    __pyx_t_5 = 0;
+    __pyx_v_rec_res = ((PyArrayObject *)__pyx_t_1);
+    __pyx_t_1 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":833
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":833
  *             dt = [(field_name, object) for field_name in field_names]
  *             rec_res = np.empty(length, dtype=dt)
  *             for i in range(length):             # <<<<<<<<<<<<<<
  *                 for field_name in field_names:
  *                     rec_res[i][field_name] = self.read_mi_matrix()
  */
-    for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_v_length; __pyx_t_3+=1) {
-      __pyx_v_i = __pyx_t_3;
+    __pyx_t_8 = __pyx_v_length;
+    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_8; __pyx_t_4+=1) {
+      __pyx_v_i = __pyx_t_4;
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":834
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":834
  *             rec_res = np.empty(length, dtype=dt)
  *             for i in range(length):
  *                 for field_name in field_names:             # <<<<<<<<<<<<<<
@@ -6546,49 +6679,49 @@
  *             return rec_res.reshape(tupdims).T
  */
       if (PyList_CheckExact(__pyx_v_field_names) || PyTuple_CheckExact(__pyx_v_field_names)) {
-        __pyx_t_6 = 0; __pyx_t_5 = __pyx_v_field_names; __Pyx_INCREF(__pyx_t_5);
+        __pyx_t_7 = 0; __pyx_t_1 = __pyx_v_field_names; __Pyx_INCREF(__pyx_t_1);
       } else {
-        __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_field_names); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_field_names); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
       }
       for (;;) {
-        if (likely(PyList_CheckExact(__pyx_t_5))) {
-          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
-          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
-        } else if (likely(PyTuple_CheckExact(__pyx_t_5))) {
-          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
-          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
+        if (likely(PyList_CheckExact(__pyx_t_1))) {
+          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
+          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++;
+        } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
+          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++;
         } else {
-          __pyx_t_1 = PyIter_Next(__pyx_t_5);
-          if (!__pyx_t_1) {
+          __pyx_t_2 = PyIter_Next(__pyx_t_1);
+          if (!__pyx_t_2) {
             if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
             break;
           }
-          __Pyx_GOTREF(__pyx_t_1);
+          __Pyx_GOTREF(__pyx_t_2);
         }
         __Pyx_DECREF(__pyx_v_field_name);
-        __pyx_v_field_name = __pyx_t_1;
-        __pyx_t_1 = 0;
+        __pyx_v_field_name = __pyx_t_2;
+        __pyx_t_2 = 0;
 
-        /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":835
+        /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":835
  *             for i in range(length):
  *                 for field_name in field_names:
  *                     rec_res[i][field_name] = self.read_mi_matrix()             # <<<<<<<<<<<<<<
  *             return rec_res.reshape(tupdims).T
  *         # Backward compatibility with previous format
  */
-        __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_mi_matrix(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_rec_res), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_1);
-        if (PyObject_SetItem(__pyx_1, __pyx_v_field_name, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_2 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_mi_matrix(__pyx_v_self, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_rec_res), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        if (PyObject_SetItem(__pyx_t_3, __pyx_v_field_name, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       }
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     }
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":836
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":836
  *                 for field_name in field_names:
  *                     rec_res[i][field_name] = self.read_mi_matrix()
  *             return rec_res.reshape(tupdims).T             # <<<<<<<<<<<<<<
@@ -6596,140 +6729,141 @@
  *         obj_template = mio5p.mat_struct()
  */
     __Pyx_XDECREF(((PyObject *)__pyx_r));
-    __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_rec_res), __pyx_kp_reshape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_rec_res), __pyx_n_s__reshape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __Pyx_INCREF(__pyx_v_tupdims);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tupdims);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tupdims);
     __Pyx_GIVEREF(__pyx_v_tupdims);
-    __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__T); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_kp_T); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_r = ((PyArrayObject *)__pyx_t_1);
-    __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_r = ((PyArrayObject *)__pyx_t_2);
+    __pyx_t_2 = 0;
     goto __pyx_L0;
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":838
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":838
  *             return rec_res.reshape(tupdims).T
  *         # Backward compatibility with previous format
  *         obj_template = mio5p.mat_struct()             # <<<<<<<<<<<<<<
  *         obj_template._fieldnames = field_names
  *         result = np.empty(length, dtype=object)
  */
-  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_37); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_2);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_2, __pyx_kp_mat_struct); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__mio5p); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__mat_struct); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_v_obj_template);
   __pyx_v_obj_template = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":839
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":839
  *         # Backward compatibility with previous format
  *         obj_template = mio5p.mat_struct()
  *         obj_template._fieldnames = field_names             # <<<<<<<<<<<<<<
  *         result = np.empty(length, dtype=object)
  *         for i in range(length):
  */
-  if (PyObject_SetAttr(__pyx_v_obj_template, __pyx_kp__fieldnames, __pyx_v_field_names) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetAttr(__pyx_v_obj_template, __pyx_n_s___fieldnames, __pyx_v_field_names) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":840
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":840
  *         obj_template = mio5p.mat_struct()
  *         obj_template._fieldnames = field_names
  *         result = np.empty(length, dtype=object)             # <<<<<<<<<<<<<<
  *         for i in range(length):
  *             item = pycopy(obj_template)
  */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
-  __Pyx_GIVEREF(__pyx_t_1);
-  __pyx_t_1 = 0;
-  __pyx_2 = PyDict_New(); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_2));
-  if (PyDict_SetItem(__pyx_2, __pyx_kp_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
-  if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_7 = ((PyArrayObject *)__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_2 = 0;
+  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_3, __pyx_t_1, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = ((PyArrayObject *)__pyx_t_6);
   {
     __Pyx_BufFmt_StackElem __pyx_stack[1];
     __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
-    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
-    if (unlikely(__pyx_t_3 < 0)) {
-      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
+    __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
+    if (unlikely(__pyx_t_4 < 0)) {
+      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
       if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
-        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
+        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
         __Pyx_RaiseBufferFallbackError();
       } else {
-        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
+        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
       }
     }
     __pyx_bstride_0_result = __pyx_bstruct_result.strides[0];
     __pyx_bshape_0_result = __pyx_bstruct_result.shape[0];
-    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_t_7 = 0;
+  __pyx_t_9 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_v_result));
-  __pyx_v_result = ((PyArrayObject *)__pyx_t_1);
-  __pyx_t_1 = 0;
+  __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
+  __pyx_t_6 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":841
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":841
  *         obj_template._fieldnames = field_names
  *         result = np.empty(length, dtype=object)
  *         for i in range(length):             # <<<<<<<<<<<<<<
  *             item = pycopy(obj_template)
  *             for name in field_names:
  */
-  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_v_length; __pyx_t_3+=1) {
-    __pyx_v_i = __pyx_t_3;
+  __pyx_t_8 = __pyx_v_length;
+  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_8; __pyx_t_4+=1) {
+    __pyx_v_i = __pyx_t_4;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":842
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":842
  *         result = np.empty(length, dtype=object)
  *         for i in range(length):
  *             item = pycopy(obj_template)             # <<<<<<<<<<<<<<
  *             for name in field_names:
  *                 item.__dict__[name] = self.read_mi_matrix()
  */
-    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_pycopy); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+    __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__pycopy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __Pyx_INCREF(__pyx_v_obj_template);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj_template);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj_template);
     __Pyx_GIVEREF(__pyx_v_obj_template);
-    __pyx_t_5 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+    __pyx_t_1 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_DECREF(__pyx_v_item);
-    __pyx_v_item = __pyx_t_5;
-    __pyx_t_5 = 0;
+    __pyx_v_item = __pyx_t_1;
+    __pyx_t_1 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":843
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":843
  *         for i in range(length):
  *             item = pycopy(obj_template)
  *             for name in field_names:             # <<<<<<<<<<<<<<
@@ -6737,72 +6871,72 @@
  *             result[i] = item
  */
     if (PyList_CheckExact(__pyx_v_field_names) || PyTuple_CheckExact(__pyx_v_field_names)) {
-      __pyx_t_6 = 0; __pyx_t_5 = __pyx_v_field_names; __Pyx_INCREF(__pyx_t_5);
+      __pyx_t_7 = 0; __pyx_t_1 = __pyx_v_field_names; __Pyx_INCREF(__pyx_t_1);
     } else {
-      __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_field_names); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_field_names); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
     }
     for (;;) {
-      if (likely(PyList_CheckExact(__pyx_t_5))) {
-        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
-        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
-      } else if (likely(PyTuple_CheckExact(__pyx_t_5))) {
-        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
-        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
+      if (likely(PyList_CheckExact(__pyx_t_1))) {
+        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++;
+      } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
+        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++;
       } else {
-        __pyx_t_1 = PyIter_Next(__pyx_t_5);
-        if (!__pyx_t_1) {
+        __pyx_t_2 = PyIter_Next(__pyx_t_1);
+        if (!__pyx_t_2) {
           if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           break;
         }
-        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_GOTREF(__pyx_t_2);
       }
       __Pyx_DECREF(__pyx_v_name);
-      __pyx_v_name = __pyx_t_1;
-      __pyx_t_1 = 0;
+      __pyx_v_name = __pyx_t_2;
+      __pyx_t_2 = 0;
 
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":844
+      /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":844
  *             item = pycopy(obj_template)
  *             for name in field_names:
  *                 item.__dict__[name] = self.read_mi_matrix()             # <<<<<<<<<<<<<<
  *             result[i] = item
  *         return result.reshape(tupdims).T
  */
-      __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_mi_matrix(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_item, __pyx_kp___dict__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_mi_matrix(__pyx_v_self, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      if (PyObject_SetItem(__pyx_t_2, __pyx_v_name, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = PyObject_GetAttr(__pyx_v_item, __pyx_n_s____dict__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      if (PyObject_SetItem(__pyx_t_6, __pyx_v_name, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     }
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":845
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":845
  *             for name in field_names:
  *                 item.__dict__[name] = self.read_mi_matrix()
  *             result[i] = item             # <<<<<<<<<<<<<<
  *         return result.reshape(tupdims).T
  * 
  */
-    __pyx_t_11 = __pyx_v_i;
-    __pyx_t_12 = -1;
-    if (__pyx_t_11 < 0) {
-      __pyx_t_11 += __pyx_bshape_0_result;
-      if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 0;
-    } else if (unlikely(__pyx_t_11 >= __pyx_bshape_0_result)) __pyx_t_12 = 0;
-    if (unlikely(__pyx_t_12 != -1)) {
-      __Pyx_RaiseBufferIndexError(__pyx_t_12);
+    __pyx_t_13 = __pyx_v_i;
+    __pyx_t_14 = -1;
+    if (__pyx_t_13 < 0) {
+      __pyx_t_13 += __pyx_bshape_0_result;
+      if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
+    } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_result)) __pyx_t_14 = 0;
+    if (unlikely(__pyx_t_14 != -1)) {
+      __Pyx_RaiseBufferIndexError(__pyx_t_14);
       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_result.buf, __pyx_t_11, __pyx_bstride_0_result);
-    __Pyx_GOTREF(*__pyx_t_13);
-    __Pyx_DECREF(*__pyx_t_13); __Pyx_INCREF(__pyx_v_item);
-    *__pyx_t_13 = __pyx_v_item;
-    __Pyx_GIVEREF(*__pyx_t_13);
+    __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_result.buf, __pyx_t_13, __pyx_bstride_0_result);
+    __Pyx_GOTREF(*__pyx_t_15);
+    __Pyx_DECREF(*__pyx_t_15); __Pyx_INCREF(__pyx_v_item);
+    *__pyx_t_15 = __pyx_v_item;
+    __Pyx_GIVEREF(*__pyx_t_15);
   }
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":846
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":846
  *                 item.__dict__[name] = self.read_mi_matrix()
  *             result[i] = item
  *         return result.reshape(tupdims).T             # <<<<<<<<<<<<<<
@@ -6810,33 +6944,32 @@
  *     cpdef cnp.ndarray read_opaque(self, VarHeader5 hdr):
  */
   __Pyx_XDECREF(((PyObject *)__pyx_r));
-  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_kp_reshape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__reshape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_v_tupdims);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tupdims);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tupdims);
   __Pyx_GIVEREF(__pyx_v_tupdims);
-  __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__T); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_kp_T); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = ((PyArrayObject *)__pyx_t_1);
-  __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = ((PyArrayObject *)__pyx_t_2);
+  __pyx_t_2 = 0;
   goto __pyx_L0;
 
   __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_1);
-  __Pyx_XDECREF(__pyx_2);
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_6);
   { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
     __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
     __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
@@ -6856,12 +6989,14 @@
   __Pyx_DECREF(__pyx_v_obj_template);
   __Pyx_DECREF(__pyx_v_item);
   __Pyx_DECREF(__pyx_v_name);
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
+  __Pyx_DECREF((PyObject *)__pyx_v_header);
   __Pyx_XGIVEREF((PyObject *)__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":808
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":808
  *         return field_names
  * 
  *     cpdef cnp.ndarray read_struct(self, VarHeader5 header):             # <<<<<<<<<<<<<<
@@ -6874,7 +7009,7 @@
 static PyObject *__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_struct(PyObject *__pyx_v_self, PyObject *__pyx_v_header) {
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
-  __Pyx_SetupRefcountContext("read_struct");
+  __Pyx_RefNannySetupContext("read_struct");
   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_header), __pyx_ptype_5scipy_2io_6matlab_10mio5_utils_VarHeader5, 1, "header", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_XDECREF(__pyx_r);
   __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->__pyx_vtab)->read_struct(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self), ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *)__pyx_v_header), 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -6891,11 +7026,11 @@
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":848
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":848
  *         return result.reshape(tupdims).T
  * 
  *     cpdef cnp.ndarray read_opaque(self, VarHeader5 hdr):             # <<<<<<<<<<<<<<
@@ -6907,130 +7042,130 @@
 static  PyArrayObject *__pyx_f_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_opaque(struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *__pyx_v_self, struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *__pyx_v_hdr, int __pyx_skip_dispatch) {
   PyArrayObject *__pyx_v_res = 0;
   PyArrayObject *__pyx_r = NULL;
-  PyObject *__pyx_1 = 0;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
-  __Pyx_SetupRefcountContext("read_opaque");
+  PyObject *__pyx_t_4 = NULL;
+  __Pyx_RefNannySetupContext("read_opaque");
   /* Check if called by wrapper */
   if (unlikely(__pyx_skip_dispatch)) ;
   /* Check if overriden in Python */
   else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
-    __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_kp_read_opaque); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    if (!PyCFunction_Check(__pyx_1) || (PyCFunction_GET_FUNCTION(__pyx_1) != (void *)&__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_opaque)) {
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__read_opaque); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_opaque)) {
       __Pyx_XDECREF(((PyObject *)__pyx_r));
-      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __Pyx_INCREF(((PyObject *)__pyx_v_hdr));
-      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_hdr));
+      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_hdr));
       __Pyx_GIVEREF(((PyObject *)__pyx_v_hdr));
-      __pyx_t_2 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-      if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_r = ((PyArrayObject *)__pyx_t_2);
-      __pyx_t_2 = 0;
+      __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_r = ((PyArrayObject *)__pyx_t_3);
+      __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       goto __pyx_L0;
     }
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":874
- *         * some_functions.mat
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":864
+ *         See the comments at the beginning of ``mio5.py``
  *         '''
  *         cdef cnp.ndarray res = np.empty((1,), dtype=OPAQUE_DTYPE)             # <<<<<<<<<<<<<<
  *         res[0]['s0'] = self.read_int8_string()
  *         res[0]['s1'] = self.read_int8_string()
  */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
   __Pyx_INCREF(__pyx_int_1);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_1);
   __Pyx_GIVEREF(__pyx_int_1);
-  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
   __pyx_t_1 = 0;
-  __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_1));
-  if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, ((PyObject *)__pyx_v_5scipy_2io_6matlab_10mio5_utils_OPAQUE_DTYPE)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_v_5scipy_2io_6matlab_10mio5_utils_OPAQUE_DTYPE)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
-  if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_res = ((PyArrayObject *)__pyx_t_1);
-  __pyx_t_1 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_res = ((PyArrayObject *)__pyx_t_4);
+  __pyx_t_4 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":875
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":865
  *         '''
  *         cdef cnp.ndarray res = np.empty((1,), dtype=OPAQUE_DTYPE)
  *         res[0]['s0'] = self.read_int8_string()             # <<<<<<<<<<<<<<
  *         res[0]['s1'] = self.read_int8_string()
  *         res[0]['s2'] = self.read_int8_string()
  */
-  __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_int8_string(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_int8_string(__pyx_v_self); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  if (PyObject_SetItem(__pyx_1, __pyx_kp_60, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+  if (PyObject_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__s0), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":876
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":866
  *         cdef cnp.ndarray res = np.empty((1,), dtype=OPAQUE_DTYPE)
  *         res[0]['s0'] = self.read_int8_string()
  *         res[0]['s1'] = self.read_int8_string()             # <<<<<<<<<<<<<<
  *         res[0]['s2'] = self.read_int8_string()
  *         res[0]['arr'] = self.read_mi_matrix()
  */
-  __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_int8_string(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_int8_string(__pyx_v_self); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  if (PyObject_SetItem(__pyx_1, __pyx_kp_61, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+  if (PyObject_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__s1), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":877
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":867
  *         res[0]['s0'] = self.read_int8_string()
  *         res[0]['s1'] = self.read_int8_string()
  *         res[0]['s2'] = self.read_int8_string()             # <<<<<<<<<<<<<<
  *         res[0]['arr'] = self.read_mi_matrix()
  *         return res
  */
-  __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_int8_string(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_int8_string(__pyx_v_self); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  if (PyObject_SetItem(__pyx_1, __pyx_kp_62, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+  if (PyObject_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__s2), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":878
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":868
  *         res[0]['s1'] = self.read_int8_string()
  *         res[0]['s2'] = self.read_int8_string()
  *         res[0]['arr'] = self.read_mi_matrix()             # <<<<<<<<<<<<<<
  *         return res
  */
-  __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_mi_matrix(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = ((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self->__pyx_vtab)->read_mi_matrix(__pyx_v_self, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  if (PyObject_SetItem(__pyx_1, __pyx_kp_63, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+  if (PyObject_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__arr), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":879
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":869
  *         res[0]['s2'] = self.read_int8_string()
  *         res[0]['arr'] = self.read_mi_matrix()
  *         return res             # <<<<<<<<<<<<<<
@@ -7043,20 +7178,20 @@
   __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_1);
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
   __Pyx_AddTraceback("scipy.io.matlab.mio5_utils.VarReader5.read_opaque");
   __pyx_r = 0;
   __pyx_L0:;
   __Pyx_XDECREF((PyObject *)__pyx_v_res);
   __Pyx_XGIVEREF((PyObject *)__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":848
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":848
  *         return result.reshape(tupdims).T
  * 
  *     cpdef cnp.ndarray read_opaque(self, VarHeader5 hdr):             # <<<<<<<<<<<<<<
@@ -7065,11 +7200,11 @@
  */
 
 static PyObject *__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_opaque(PyObject *__pyx_v_self, PyObject *__pyx_v_hdr); /*proto*/
-static char __pyx_doc_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_opaque[] = " Read opaque (function workspace) type\n\n        Looking at some mat files, the structure of this type seems to\n        be:\n\n        * array flags as usual (already read into `hdr`)\n        * 3 int8 strings\n        * a matrix\n\n        At the end of the mat file (it seems) there is then an unnamed\n        top-level variable (name = '') which appears to be of double\n        class (mxCLASS_DOUBLE), but stored as uint8, the memory for\n        which is in the format of a mini .mat file, without the first\n        124 bytes of the file header (the description and the\n        subsystem_offset), but with the version U2 bytes, and the S2\n        endian test bytes.  There follow 4 zero bytes, presumably for 8\n        byte padding, and then a series of miMATRIX entries, as in a\n        standard mat file.\n\n        The mat files I was playing with are in ``tests/data``:\n\n        * sqr.mat\n        * parabola.mat\n        * some_functions.mat\n        ";
+static char __pyx_doc_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_opaque[] = " Read opaque (function workspace) type\n\n        Looking at some mat files, the structure of this type seems to\n        be:\n\n        * array flags as usual (already read into `hdr`)\n        * 3 int8 strings\n        * a matrix\n\n        Then there's a matrix at the end of the mat file that seems have\n        the anonymous founction workspaces - we load it as\n        ``__function_workspace__``\n\n        See the comments at the beginning of ``mio5.py``\n        ";
 static PyObject *__pyx_pf_5scipy_2io_6matlab_10mio5_utils_10VarReader5_read_opaque(PyObject *__pyx_v_self, PyObject *__pyx_v_hdr) {
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
-  __Pyx_SetupRefcountContext("read_opaque");
+  __Pyx_RefNannySetupContext("read_opaque");
   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hdr), __pyx_ptype_5scipy_2io_6matlab_10mio5_utils_VarHeader5, 1, "hdr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_XDECREF(__pyx_r);
   __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self)->__pyx_vtab)->read_opaque(((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarReader5 *)__pyx_v_self), ((struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *)__pyx_v_hdr), 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -7086,11 +7221,11 @@
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":152
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":187
  *         # experimental exception made for __getbuffer__ and __releasebuffer__
  *         # -- the details of this may change.
  *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
@@ -7112,18 +7247,21 @@
   int __pyx_v_hasfields;
   int __pyx_r;
   int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_t_4;
-  int __pyx_t_5;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
   int __pyx_t_6;
-  char *__pyx_t_7;
-  __Pyx_SetupRefcountContext("__getbuffer__");
+  int __pyx_t_7;
+  int __pyx_t_8;
+  char *__pyx_t_9;
+  __Pyx_RefNannySetupContext("__getbuffer__");
   if (__pyx_v_info == NULL) return 0;
   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
   __Pyx_GIVEREF(__pyx_v_info->obj);
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":158
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":193
  *             # of flags
  *             cdef int copy_shape, i, ndim
  *             cdef int endian_detector = 1             # <<<<<<<<<<<<<<
@@ -7132,7 +7270,7 @@
  */
   __pyx_v_endian_detector = 1;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":159
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":194
  *             cdef int copy_shape, i, ndim
  *             cdef int endian_detector = 1
  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
@@ -7141,7 +7279,7 @@
  */
   __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":161
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":196
  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
  * 
  *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
@@ -7150,7 +7288,7 @@
  */
   __pyx_v_ndim = PyArray_NDIM(((PyArrayObject *)__pyx_v_self));
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":163
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":198
  *             ndim = PyArray_NDIM(self)
  * 
  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
@@ -7160,7 +7298,7 @@
   __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
   if (__pyx_t_1) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":164
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":199
  * 
  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
  *                 copy_shape = 1             # <<<<<<<<<<<<<<
@@ -7172,7 +7310,7 @@
   }
   /*else*/ {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":166
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":201
  *                 copy_shape = 1
  *             else:
  *                 copy_shape = 0             # <<<<<<<<<<<<<<
@@ -7183,96 +7321,100 @@
   }
   __pyx_L5:;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":168
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":203
  *                 copy_shape = 0
  * 
  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
  *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
- *                 raise ValueError("ndarray is not C contiguous")
+ *                 raise ValueError(u"ndarray is not C contiguous")
  */
-  if (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS)) {
+  __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS);
+  if (__pyx_t_1) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":169
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":204
  * 
  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
  *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):             # <<<<<<<<<<<<<<
- *                 raise ValueError("ndarray is not C contiguous")
+ *                 raise ValueError(u"ndarray is not C contiguous")
  * 
  */
-    __pyx_t_1 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_C_CONTIGUOUS));
+    __pyx_t_2 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_C_CONTIGUOUS));
+    __pyx_t_3 = __pyx_t_2;
   } else {
-    __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS);
+    __pyx_t_3 = __pyx_t_1;
   }
-  if (__pyx_t_1) {
+  if (__pyx_t_3) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":170
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":205
  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
  *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
- *                 raise ValueError("ndarray is not C contiguous")             # <<<<<<<<<<<<<<
+ *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
  * 
  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
  */
-    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __Pyx_INCREF(__pyx_kp_1);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_1);
-    __Pyx_GIVEREF(__pyx_kp_1);
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    __Pyx_Raise(__pyx_t_3, 0, 0);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(((PyObject *)__pyx_kp_u_11));
+    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_u_11));
+    __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_11));
+    __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_5, 0, 0);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L6;
   }
   __pyx_L6:;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":172
- *                 raise ValueError("ndarray is not C contiguous")
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":207
+ *                 raise ValueError(u"ndarray is not C contiguous")
  * 
  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
  *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
- *                 raise ValueError("ndarray is not Fortran contiguous")
+ *                 raise ValueError(u"ndarray is not Fortran contiguous")
  */
-  if (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS)) {
+  __pyx_t_3 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS);
+  if (__pyx_t_3) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":173
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":208
  * 
  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
  *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):             # <<<<<<<<<<<<<<
- *                 raise ValueError("ndarray is not Fortran contiguous")
+ *                 raise ValueError(u"ndarray is not Fortran contiguous")
  * 
  */
     __pyx_t_1 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_F_CONTIGUOUS));
+    __pyx_t_2 = __pyx_t_1;
   } else {
-    __pyx_t_1 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS);
+    __pyx_t_2 = __pyx_t_3;
   }
-  if (__pyx_t_1) {
+  if (__pyx_t_2) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":174
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":209
  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
  *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
- *                 raise ValueError("ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
+ *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
  * 
  *             info.buf = PyArray_DATA(self)
  */
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-    __Pyx_INCREF(__pyx_kp_2);
-    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_2);
-    __Pyx_GIVEREF(__pyx_kp_2);
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-    __Pyx_Raise(__pyx_t_2, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_INCREF(((PyObject *)__pyx_kp_u_12));
+    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_u_12));
+    __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_12));
+    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_Raise(__pyx_t_4, 0, 0);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L7;
   }
   __pyx_L7:;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":176
- *                 raise ValueError("ndarray is not Fortran contiguous")
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":211
+ *                 raise ValueError(u"ndarray is not Fortran contiguous")
  * 
  *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
  *             info.ndim = ndim
@@ -7280,7 +7422,7 @@
  */
   __pyx_v_info->buf = PyArray_DATA(((PyArrayObject *)__pyx_v_self));
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":177
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":212
  * 
  *             info.buf = PyArray_DATA(self)
  *             info.ndim = ndim             # <<<<<<<<<<<<<<
@@ -7289,17 +7431,17 @@
  */
   __pyx_v_info->ndim = __pyx_v_ndim;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":178
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":213
  *             info.buf = PyArray_DATA(self)
  *             info.ndim = ndim
  *             if copy_shape:             # <<<<<<<<<<<<<<
  *                 # Allocate new buffer for strides and shape info. This is allocated
  *                 # as one block, strides first.
  */
-  __pyx_t_4 = __pyx_v_copy_shape;
-  if (__pyx_t_4) {
+  __pyx_t_6 = __pyx_v_copy_shape;
+  if (__pyx_t_6) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":181
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":216
  *                 # Allocate new buffer for strides and shape info. This is allocated
  *                 # as one block, strides first.
  *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)             # <<<<<<<<<<<<<<
@@ -7308,7 +7450,7 @@
  */
     __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * __pyx_v_ndim) * 2)));
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":182
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":217
  *                 # as one block, strides first.
  *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)
  *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
@@ -7317,17 +7459,18 @@
  */
     __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":183
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":218
  *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)
  *                 info.shape = info.strides + ndim
  *                 for i in range(ndim):             # <<<<<<<<<<<<<<
  *                     info.strides[i] = PyArray_STRIDES(self)[i]
  *                     info.shape[i] = PyArray_DIMS(self)[i]
  */
-    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_v_ndim; __pyx_t_4+=1) {
-      __pyx_v_i = __pyx_t_4;
+    __pyx_t_6 = __pyx_v_ndim;
+    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+      __pyx_v_i = __pyx_t_7;
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":184
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":219
  *                 info.shape = info.strides + ndim
  *                 for i in range(ndim):
  *                     info.strides[i] = PyArray_STRIDES(self)[i]             # <<<<<<<<<<<<<<
@@ -7336,7 +7479,7 @@
  */
       (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(((PyArrayObject *)__pyx_v_self))[__pyx_v_i]);
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":185
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":220
  *                 for i in range(ndim):
  *                     info.strides[i] = PyArray_STRIDES(self)[i]
  *                     info.shape[i] = PyArray_DIMS(self)[i]             # <<<<<<<<<<<<<<
@@ -7349,7 +7492,7 @@
   }
   /*else*/ {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":187
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":222
  *                     info.shape[i] = PyArray_DIMS(self)[i]
  *             else:
  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
@@ -7358,7 +7501,7 @@
  */
     __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(((PyArrayObject *)__pyx_v_self)));
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":188
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":223
  *             else:
  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)             # <<<<<<<<<<<<<<
@@ -7369,7 +7512,7 @@
   }
   __pyx_L8:;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":189
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":224
  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
  *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
@@ -7378,7 +7521,7 @@
  */
   __pyx_v_info->suboffsets = NULL;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":190
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":225
  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
  *             info.suboffsets = NULL
  *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
@@ -7387,7 +7530,7 @@
  */
   __pyx_v_info->itemsize = PyArray_ITEMSIZE(((PyArrayObject *)__pyx_v_self));
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":191
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":226
  *             info.suboffsets = NULL
  *             info.itemsize = PyArray_ITEMSIZE(self)
  *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
@@ -7396,7 +7539,7 @@
  */
   __pyx_v_info->readonly = (!PyArray_ISWRITEABLE(((PyArrayObject *)__pyx_v_self)));
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":194
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":229
  * 
  *             cdef int t
  *             cdef char* f = NULL             # <<<<<<<<<<<<<<
@@ -7405,7 +7548,7 @@
  */
   __pyx_v_f = NULL;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":195
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":230
  *             cdef int t
  *             cdef char* f = NULL
  *             cdef dtype descr = self.descr             # <<<<<<<<<<<<<<
@@ -7415,7 +7558,7 @@
   __Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_self)->descr));
   __pyx_v_descr = ((PyArrayObject *)__pyx_v_self)->descr;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":199
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":234
  *             cdef int offset
  * 
  *             cdef bint hasfields = PyDataType_HASFIELDS(descr)             # <<<<<<<<<<<<<<
@@ -7424,21 +7567,23 @@
  */
   __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":201
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":236
  *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
  * 
  *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
  *                 # do not call releasebuffer
  *                 info.obj = None
  */
-  if ((!__pyx_v_hasfields)) {
-    __pyx_t_1 = (!__pyx_v_copy_shape);
+  __pyx_t_2 = (!__pyx_v_hasfields);
+  if (__pyx_t_2) {
+    __pyx_t_3 = (!__pyx_v_copy_shape);
+    __pyx_t_1 = __pyx_t_3;
   } else {
-    __pyx_t_1 = (!__pyx_v_hasfields);
+    __pyx_t_1 = __pyx_t_2;
   }
   if (__pyx_t_1) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":203
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":238
  *             if not hasfields and not copy_shape:
  *                 # do not call releasebuffer
  *                 info.obj = None             # <<<<<<<<<<<<<<
@@ -7454,7 +7599,7 @@
   }
   /*else*/ {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":206
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":241
  *             else:
  *                 # need to call releasebuffer
  *                 info.obj = self             # <<<<<<<<<<<<<<
@@ -7469,7 +7614,7 @@
   }
   __pyx_L11:;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":208
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":243
  *                 info.obj = self
  * 
  *             if not hasfields:             # <<<<<<<<<<<<<<
@@ -7479,7 +7624,7 @@
   __pyx_t_1 = (!__pyx_v_hasfields);
   if (__pyx_t_1) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":209
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":244
  * 
  *             if not hasfields:
  *                 t = descr.type_num             # <<<<<<<<<<<<<<
@@ -7488,319 +7633,322 @@
  */
     __pyx_v_t = __pyx_v_descr->type_num;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":210
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":245
  *             if not hasfields:
  *                 t = descr.type_num
  *                 if ((descr.byteorder == '>' and little_endian) or             # <<<<<<<<<<<<<<
  *                     (descr.byteorder == '<' and not little_endian)):
- *                     raise ValueError("Non-native byte order not supported")
+ *                     raise ValueError(u"Non-native byte order not supported")
  */
-    if ((__pyx_v_descr->byteorder == '>')) {
-      __pyx_t_1 = __pyx_v_little_endian;
+    __pyx_t_1 = (__pyx_v_descr->byteorder == '>');
+    if (__pyx_t_1) {
+      __pyx_t_2 = __pyx_v_little_endian;
     } else {
-      __pyx_t_1 = (__pyx_v_descr->byteorder == '>');
+      __pyx_t_2 = __pyx_t_1;
     }
-    if (!__pyx_t_1) {
+    if (!__pyx_t_2) {
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":211
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":246
  *                 t = descr.type_num
  *                 if ((descr.byteorder == '>' and little_endian) or
  *                     (descr.byteorder == '<' and not little_endian)):             # <<<<<<<<<<<<<<
- *                     raise ValueError("Non-native byte order not supported")
+ *                     raise ValueError(u"Non-native byte order not supported")
  *                 if   t == NPY_BYTE:        f = "b"
  */
-      if ((__pyx_v_descr->byteorder == '<')) {
-        __pyx_t_5 = (!__pyx_v_little_endian);
+      __pyx_t_1 = (__pyx_v_descr->byteorder == '<');
+      if (__pyx_t_1) {
+        __pyx_t_3 = (!__pyx_v_little_endian);
+        __pyx_t_8 = __pyx_t_3;
       } else {
-        __pyx_t_5 = (__pyx_v_descr->byteorder == '<');
+        __pyx_t_8 = __pyx_t_1;
       }
-      __pyx_t_6 = __pyx_t_5;
+      __pyx_t_1 = __pyx_t_8;
     } else {
-      __pyx_t_6 = __pyx_t_1;
+      __pyx_t_1 = __pyx_t_2;
     }
-    if (__pyx_t_6) {
+    if (__pyx_t_1) {
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":212
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":247
  *                 if ((descr.byteorder == '>' and little_endian) or
  *                     (descr.byteorder == '<' and not little_endian)):
- *                     raise ValueError("Non-native byte order not supported")             # <<<<<<<<<<<<<<
+ *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
  *                 if   t == NPY_BYTE:        f = "b"
  *                 elif t == NPY_UBYTE:       f = "B"
  */
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-      __Pyx_INCREF(__pyx_kp_5);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_5);
-      __Pyx_GIVEREF(__pyx_kp_5);
-      __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      __Pyx_Raise(__pyx_t_3, 0, 0);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_INCREF(((PyObject *)__pyx_kp_u_13));
+      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_u_13));
+      __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_13));
+      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_Raise(__pyx_t_5, 0, 0);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L13;
     }
     __pyx_L13:;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":213
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":248
  *                     (descr.byteorder == '<' and not little_endian)):
- *                     raise ValueError("Non-native byte order not supported")
+ *                     raise ValueError(u"Non-native byte order not supported")
  *                 if   t == NPY_BYTE:        f = "b"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_UBYTE:       f = "B"
  *                 elif t == NPY_SHORT:       f = "h"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_BYTE);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_6;
+    __pyx_t_1 = (__pyx_v_t == NPY_BYTE);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__b;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":214
- *                     raise ValueError("Non-native byte order not supported")
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":249
+ *                     raise ValueError(u"Non-native byte order not supported")
  *                 if   t == NPY_BYTE:        f = "b"
  *                 elif t == NPY_UBYTE:       f = "B"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_SHORT:       f = "h"
  *                 elif t == NPY_USHORT:      f = "H"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_UBYTE);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_7;
+    __pyx_t_1 = (__pyx_v_t == NPY_UBYTE);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__B;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":215
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":250
  *                 if   t == NPY_BYTE:        f = "b"
  *                 elif t == NPY_UBYTE:       f = "B"
  *                 elif t == NPY_SHORT:       f = "h"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_USHORT:      f = "H"
  *                 elif t == NPY_INT:         f = "i"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_SHORT);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_8;
+    __pyx_t_1 = (__pyx_v_t == NPY_SHORT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__h;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":216
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":251
  *                 elif t == NPY_UBYTE:       f = "B"
  *                 elif t == NPY_SHORT:       f = "h"
  *                 elif t == NPY_USHORT:      f = "H"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_INT:         f = "i"
  *                 elif t == NPY_UINT:        f = "I"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_USHORT);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_9;
+    __pyx_t_1 = (__pyx_v_t == NPY_USHORT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__H;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":217
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":252
  *                 elif t == NPY_SHORT:       f = "h"
  *                 elif t == NPY_USHORT:      f = "H"
  *                 elif t == NPY_INT:         f = "i"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_UINT:        f = "I"
  *                 elif t == NPY_LONG:        f = "l"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_INT);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_10;
+    __pyx_t_1 = (__pyx_v_t == NPY_INT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__i;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":218
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":253
  *                 elif t == NPY_USHORT:      f = "H"
  *                 elif t == NPY_INT:         f = "i"
  *                 elif t == NPY_UINT:        f = "I"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_LONG:        f = "l"
  *                 elif t == NPY_ULONG:       f = "L"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_UINT);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_11;
+    __pyx_t_1 = (__pyx_v_t == NPY_UINT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__I;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":219
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":254
  *                 elif t == NPY_INT:         f = "i"
  *                 elif t == NPY_UINT:        f = "I"
  *                 elif t == NPY_LONG:        f = "l"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_ULONG:       f = "L"
  *                 elif t == NPY_LONGLONG:    f = "q"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_LONG);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_12;
+    __pyx_t_1 = (__pyx_v_t == NPY_LONG);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__l;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":220
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":255
  *                 elif t == NPY_UINT:        f = "I"
  *                 elif t == NPY_LONG:        f = "l"
  *                 elif t == NPY_ULONG:       f = "L"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_LONGLONG:    f = "q"
  *                 elif t == NPY_ULONGLONG:   f = "Q"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_ULONG);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_13;
+    __pyx_t_1 = (__pyx_v_t == NPY_ULONG);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__L;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":221
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":256
  *                 elif t == NPY_LONG:        f = "l"
  *                 elif t == NPY_ULONG:       f = "L"
  *                 elif t == NPY_LONGLONG:    f = "q"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_ULONGLONG:   f = "Q"
  *                 elif t == NPY_FLOAT:       f = "f"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_LONGLONG);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_14;
+    __pyx_t_1 = (__pyx_v_t == NPY_LONGLONG);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__q;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":222
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":257
  *                 elif t == NPY_ULONG:       f = "L"
  *                 elif t == NPY_LONGLONG:    f = "q"
  *                 elif t == NPY_ULONGLONG:   f = "Q"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_FLOAT:       f = "f"
  *                 elif t == NPY_DOUBLE:      f = "d"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_ULONGLONG);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_15;
+    __pyx_t_1 = (__pyx_v_t == NPY_ULONGLONG);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__Q;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":223
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":258
  *                 elif t == NPY_LONGLONG:    f = "q"
  *                 elif t == NPY_ULONGLONG:   f = "Q"
  *                 elif t == NPY_FLOAT:       f = "f"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_DOUBLE:      f = "d"
  *                 elif t == NPY_LONGDOUBLE:  f = "g"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_FLOAT);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_16;
+    __pyx_t_1 = (__pyx_v_t == NPY_FLOAT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__f;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":224
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":259
  *                 elif t == NPY_ULONGLONG:   f = "Q"
  *                 elif t == NPY_FLOAT:       f = "f"
  *                 elif t == NPY_DOUBLE:      f = "d"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_LONGDOUBLE:  f = "g"
  *                 elif t == NPY_CFLOAT:      f = "Zf"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_DOUBLE);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_17;
+    __pyx_t_1 = (__pyx_v_t == NPY_DOUBLE);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__d;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":225
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":260
  *                 elif t == NPY_FLOAT:       f = "f"
  *                 elif t == NPY_DOUBLE:      f = "d"
  *                 elif t == NPY_LONGDOUBLE:  f = "g"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_CFLOAT:      f = "Zf"
  *                 elif t == NPY_CDOUBLE:     f = "Zd"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_LONGDOUBLE);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_18;
+    __pyx_t_1 = (__pyx_v_t == NPY_LONGDOUBLE);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__g;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":226
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":261
  *                 elif t == NPY_DOUBLE:      f = "d"
  *                 elif t == NPY_LONGDOUBLE:  f = "g"
  *                 elif t == NPY_CFLOAT:      f = "Zf"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_CDOUBLE:     f = "Zd"
  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_CFLOAT);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_19;
+    __pyx_t_1 = (__pyx_v_t == NPY_CFLOAT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__Zf;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":227
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":262
  *                 elif t == NPY_LONGDOUBLE:  f = "g"
  *                 elif t == NPY_CFLOAT:      f = "Zf"
  *                 elif t == NPY_CDOUBLE:     f = "Zd"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
  *                 elif t == NPY_OBJECT:      f = "O"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_CDOUBLE);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_20;
+    __pyx_t_1 = (__pyx_v_t == NPY_CDOUBLE);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__Zd;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":228
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":263
  *                 elif t == NPY_CFLOAT:      f = "Zf"
  *                 elif t == NPY_CDOUBLE:     f = "Zd"
  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_OBJECT:      f = "O"
  *                 else:
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_CLONGDOUBLE);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_21;
+    __pyx_t_1 = (__pyx_v_t == NPY_CLONGDOUBLE);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__Zg;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":229
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":264
  *                 elif t == NPY_CDOUBLE:     f = "Zd"
  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
  *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
  *                 else:
- *                     raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
+ *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_OBJECT);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_22;
+    __pyx_t_1 = (__pyx_v_t == NPY_OBJECT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__O;
       goto __pyx_L14;
     }
     /*else*/ {
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":231
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":266
  *                 elif t == NPY_OBJECT:      f = "O"
  *                 else:
- *                     raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
+ *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
  *                 info.format = f
  *                 return
  */
-      __pyx_t_3 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_2 = PyNumber_Remainder(__pyx_kp_23, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
-      __Pyx_GIVEREF(__pyx_t_2);
-      __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-      __Pyx_Raise(__pyx_t_2, 0, 0);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_14), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+      __Pyx_GIVEREF(__pyx_t_4);
+      __pyx_t_4 = 0;
+      __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_Raise(__pyx_t_4, 0, 0);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
     __pyx_L14:;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":232
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":267
  *                 else:
- *                     raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
+ *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
  *                 info.format = f             # <<<<<<<<<<<<<<
  *                 return
  *             else:
  */
     __pyx_v_info->format = __pyx_v_f;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":233
- *                     raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":268
+ *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
  *                 info.format = f
  *                 return             # <<<<<<<<<<<<<<
  *             else:
@@ -7812,7 +7960,7 @@
   }
   /*else*/ {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":235
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":270
  *                 return
  *             else:
  *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)             # <<<<<<<<<<<<<<
@@ -7821,7 +7969,7 @@
  */
     __pyx_v_info->format = ((char *)malloc(255));
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":236
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":271
  *             else:
  *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
  *                 info.format[0] = '^' # Native data types, manual alignment             # <<<<<<<<<<<<<<
@@ -7830,7 +7978,7 @@
  */
     (__pyx_v_info->format[0]) = '^';
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":237
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":272
  *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
  *                 info.format[0] = '^' # Native data types, manual alignment
  *                 offset = 0             # <<<<<<<<<<<<<<
@@ -7839,17 +7987,17 @@
  */
     __pyx_v_offset = 0;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":240
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":275
  *                 f = _util_dtypestring(descr, info.format + 1,
  *                                       info.format + _buffer_format_string_len,
  *                                       &offset)             # <<<<<<<<<<<<<<
  *                 f[0] = 0 # Terminate format string
  * 
  */
-    __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_f = __pyx_t_7;
+    __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_f = __pyx_t_9;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":241
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":276
  *                                       info.format + _buffer_format_string_len,
  *                                       &offset)
  *                 f[0] = 0 # Terminate format string             # <<<<<<<<<<<<<<
@@ -7863,8 +8011,8 @@
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
   __Pyx_AddTraceback("numpy.ndarray.__getbuffer__");
   __pyx_r = -1;
   __Pyx_GOTREF(__pyx_v_info->obj);
@@ -7877,11 +8025,12 @@
   }
   __pyx_L2:;
   __Pyx_XDECREF((PyObject *)__pyx_v_descr);
-  __Pyx_FinishRefcountContext();
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":243
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":278
  *                 f[0] = 0 # Terminate format string
  * 
  *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
@@ -7892,9 +8041,10 @@
 static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
 static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
   int __pyx_t_1;
-  __Pyx_SetupRefcountContext("__releasebuffer__");
+  __Pyx_RefNannySetupContext("__releasebuffer__");
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":244
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":279
  * 
  *         def __releasebuffer__(ndarray self, Py_buffer* info):
  *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
@@ -7904,7 +8054,7 @@
   __pyx_t_1 = PyArray_HASFIELDS(((PyArrayObject *)__pyx_v_self));
   if (__pyx_t_1) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":245
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":280
  *         def __releasebuffer__(ndarray self, Py_buffer* info):
  *             if PyArray_HASFIELDS(self):
  *                 stdlib.free(info.format)             # <<<<<<<<<<<<<<
@@ -7916,7 +8066,7 @@
   }
   __pyx_L5:;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":246
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":281
  *             if PyArray_HASFIELDS(self):
  *                 stdlib.free(info.format)
  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
@@ -7926,7 +8076,7 @@
   __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
   if (__pyx_t_1) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":247
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":282
  *                 stdlib.free(info.format)
  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
  *                 stdlib.free(info.strides)             # <<<<<<<<<<<<<<
@@ -7938,18 +8088,214 @@
   }
   __pyx_L6:;
 
-  __Pyx_FinishRefcountContext();
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
+  __Pyx_RefNannyFinishContext();
 }
 
-/* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":690
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":755
  * ctypedef npy_cdouble     complex_t
  * 
+ * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
+ *     return PyArray_MultiIterNew(1, <void*>a)
+ * 
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1");
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":756
+ * 
+ * cdef inline object PyArray_MultiIterNew1(a):
+ *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline object PyArray_MultiIterNew2(a, b):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1");
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":758
+ *     return PyArray_MultiIterNew(1, <void*>a)
+ * 
+ * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
+ *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
+ * 
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2");
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":759
+ * 
+ * cdef inline object PyArray_MultiIterNew2(a, b):
+ *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline object PyArray_MultiIterNew3(a, b, c):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2");
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":761
+ *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
+ * 
+ * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
+ *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
+ * 
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3");
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":762
+ * 
+ * cdef inline object PyArray_MultiIterNew3(a, b, c):
+ *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3");
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":764
+ *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
+ * 
+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
+ *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
+ * 
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4");
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":765
+ * 
+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
+ *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4");
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":767
+ *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
+ * 
+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
+ *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
+ * 
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5");
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":768
+ * 
+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
+ *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5");
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":770
+ *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
+ * 
  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
  *     # Recursive utility function used in __getbuffer__ to get format
  *     # string. The new location in the format string is returned.
  */
 
-static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
+static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
   PyArray_Descr *__pyx_v_child;
   int __pyx_v_endian_detector;
   int __pyx_v_little_endian;
@@ -7958,9 +8304,6 @@
   PyObject *__pyx_v_new_offset;
   PyObject *__pyx_v_t;
   char *__pyx_r;
-  PyObject *__pyx_1 = 0;
-  PyObject *__pyx_2 = 0;
-  PyObject *__pyx_3 = 0;
   Py_ssize_t __pyx_t_1;
   PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
@@ -7969,15 +8312,17 @@
   int __pyx_t_6;
   int __pyx_t_7;
   int __pyx_t_8;
-  char *__pyx_t_9;
-  __Pyx_SetupRefcountContext("_util_dtypestring");
+  int __pyx_t_9;
+  char *__pyx_t_10;
+  __Pyx_RefNannySetupContext("_util_dtypestring");
+  __Pyx_INCREF((PyObject *)__pyx_v_descr);
   __pyx_v_child = ((PyArray_Descr *)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_fields = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_childname = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_new_offset = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_t = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":697
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":777
  *     cdef int delta_offset
  *     cdef tuple i
  *     cdef int endian_detector = 1             # <<<<<<<<<<<<<<
@@ -7986,7 +8331,7 @@
  */
   __pyx_v_endian_detector = 1;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":698
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":778
  *     cdef tuple i
  *     cdef int endian_detector = 1
  *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
@@ -7995,7 +8340,7 @@
  */
   __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":701
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":781
  *     cdef tuple fields
  * 
  *     for childname in descr.names:             # <<<<<<<<<<<<<<
@@ -8005,7 +8350,7 @@
   if (likely(((PyObject *)__pyx_v_descr->names) != Py_None)) {
     __pyx_t_1 = 0; __pyx_t_2 = ((PyObject *)__pyx_v_descr->names); __Pyx_INCREF(__pyx_t_2);
   } else {
-    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   for (;;) {
     if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
@@ -8014,21 +8359,21 @@
     __pyx_v_childname = __pyx_t_3;
     __pyx_t_3 = 0;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":702
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":782
  * 
  *     for childname in descr.names:
  *         fields = descr.fields[childname]             # <<<<<<<<<<<<<<
  *         child, new_offset = fields
  * 
  */
-    __pyx_1 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    if (!(likely(PyTuple_CheckExact(__pyx_1)) || (__pyx_1) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected tuple, got %s", Py_TYPE(__pyx_1)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(((PyObject *)__pyx_v_fields));
-    __pyx_v_fields = ((PyObject *)__pyx_1);
-    __pyx_1 = 0;
+    __pyx_v_fields = ((PyObject *)__pyx_t_3);
+    __pyx_t_3 = 0;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":703
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":783
  *     for childname in descr.names:
  *         fields = descr.fields[childname]
  *         child, new_offset = fields             # <<<<<<<<<<<<<<
@@ -8037,122 +8382,125 @@
  */
     if (likely(((PyObject *)__pyx_v_fields) != Py_None) && likely(PyTuple_GET_SIZE(((PyObject *)__pyx_v_fields)) == 2)) {
       PyObject* tuple = ((PyObject *)__pyx_v_fields);
-      __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
-      if (!(__Pyx_TypeTest(__pyx_2, __pyx_ptype_5numpy_dtype))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
+      __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
+      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
       __Pyx_DECREF(((PyObject *)__pyx_v_child));
-      __pyx_v_child = ((PyArray_Descr *)__pyx_2);
-      __pyx_2 = 0;
+      __pyx_v_child = ((PyArray_Descr *)__pyx_t_3);
+      __pyx_t_3 = 0;
       __Pyx_DECREF(__pyx_v_new_offset);
-      __pyx_v_new_offset = __pyx_3;
-      __pyx_3 = 0;
+      __pyx_v_new_offset = __pyx_t_4;
+      __pyx_t_4 = 0;
     } else {
       __Pyx_UnpackTupleError(((PyObject *)__pyx_v_fields), 2);
-      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":705
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":785
  *         child, new_offset = fields
  * 
  *         if (end - f) - (new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
- *             raise RuntimeError("Format string allocated too short, see comment in numpy.pxd")
+ *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
  * 
  */
-    __pyx_t_3 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_4 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     if (__pyx_t_6) {
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":706
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":786
  * 
  *         if (end - f) - (new_offset - offset[0]) < 15:
- *             raise RuntimeError("Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
+ *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
  * 
  *         if ((child.byteorder == '>' and little_endian) or
  */
-      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-      __Pyx_INCREF(__pyx_kp_25);
-      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_25);
-      __Pyx_GIVEREF(__pyx_kp_25);
-      __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-      __Pyx_Raise(__pyx_t_4, 0, 0);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_INCREF(((PyObject *)__pyx_kp_u_15));
+      PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_u_15));
+      __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_15));
+      __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_Raise(__pyx_t_3, 0, 0);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L5;
     }
     __pyx_L5:;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":708
- *             raise RuntimeError("Format string allocated too short, see comment in numpy.pxd")
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":788
+ *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
  * 
  *         if ((child.byteorder == '>' and little_endian) or             # <<<<<<<<<<<<<<
  *             (child.byteorder == '<' and not little_endian)):
- *             raise ValueError("Non-native byte order not supported")
+ *             raise ValueError(u"Non-native byte order not supported")
  */
-    if ((__pyx_v_child->byteorder == '>')) {
-      __pyx_t_6 = __pyx_v_little_endian;
+    __pyx_t_6 = (__pyx_v_child->byteorder == '>');
+    if (__pyx_t_6) {
+      __pyx_t_7 = __pyx_v_little_endian;
     } else {
-      __pyx_t_6 = (__pyx_v_child->byteorder == '>');
+      __pyx_t_7 = __pyx_t_6;
     }
-    if (!__pyx_t_6) {
+    if (!__pyx_t_7) {
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":709
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":789
  * 
  *         if ((child.byteorder == '>' and little_endian) or
  *             (child.byteorder == '<' and not little_endian)):             # <<<<<<<<<<<<<<
- *             raise ValueError("Non-native byte order not supported")
+ *             raise ValueError(u"Non-native byte order not supported")
  *             # One could encode it in the format string and have Cython
  */
-      if ((__pyx_v_child->byteorder == '<')) {
-        __pyx_t_7 = (!__pyx_v_little_endian);
+      __pyx_t_6 = (__pyx_v_child->byteorder == '<');
+      if (__pyx_t_6) {
+        __pyx_t_8 = (!__pyx_v_little_endian);
+        __pyx_t_9 = __pyx_t_8;
       } else {
-        __pyx_t_7 = (__pyx_v_child->byteorder == '<');
+        __pyx_t_9 = __pyx_t_6;
       }
-      __pyx_t_8 = __pyx_t_7;
+      __pyx_t_6 = __pyx_t_9;
     } else {
-      __pyx_t_8 = __pyx_t_6;
+      __pyx_t_6 = __pyx_t_7;
     }
-    if (__pyx_t_8) {
+    if (__pyx_t_6) {
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":710
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":790
  *         if ((child.byteorder == '>' and little_endian) or
  *             (child.byteorder == '<' and not little_endian)):
- *             raise ValueError("Non-native byte order not supported")             # <<<<<<<<<<<<<<
+ *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
  *             # One could encode it in the format string and have Cython
  *             # complain instead, BUT: < and > in format strings also imply
  */
-      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-      __Pyx_INCREF(__pyx_kp_28);
-      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_28);
-      __Pyx_GIVEREF(__pyx_kp_28);
-      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_INCREF(((PyObject *)__pyx_kp_u_13));
+      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_u_13));
+      __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_13));
+      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
       __Pyx_Raise(__pyx_t_5, 0, 0);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L6;
     }
     __pyx_L6:;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":720
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":800
  * 
  *         # Output padding bytes
  *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
@@ -8160,16 +8508,16 @@
  *             f += 1
  */
     while (1) {
-      __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (!__pyx_t_8) break;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (!__pyx_t_6) break;
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":721
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":801
  *         # Output padding bytes
  *         while offset[0] < new_offset:
  *             f[0] = 120 # "x"; pad byte             # <<<<<<<<<<<<<<
@@ -8178,7 +8526,7 @@
  */
       (__pyx_v_f[0]) = 120;
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":722
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":802
  *         while offset[0] < new_offset:
  *             f[0] = 120 # "x"; pad byte
  *             f += 1             # <<<<<<<<<<<<<<
@@ -8187,7 +8535,7 @@
  */
       __pyx_v_f += 1;
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":723
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":803
  *             f[0] = 120 # "x"; pad byte
  *             f += 1
  *             offset[0] += 1             # <<<<<<<<<<<<<<
@@ -8197,7 +8545,7 @@
       (__pyx_v_offset[0]) += 1;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":725
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":805
  *             offset[0] += 1
  * 
  *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
@@ -8206,417 +8554,417 @@
  */
     (__pyx_v_offset[0]) += __pyx_v_child->elsize;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":727
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":807
  *         offset[0] += child.itemsize
  * 
  *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
  *             t = child.type_num
  *             if end - f < 5:
  */
-    __pyx_t_8 = (!PyDataType_HASFIELDS(__pyx_v_child));
-    if (__pyx_t_8) {
+    __pyx_t_6 = (!PyDataType_HASFIELDS(__pyx_v_child));
+    if (__pyx_t_6) {
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":728
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":808
  * 
  *         if not PyDataType_HASFIELDS(child):
  *             t = child.type_num             # <<<<<<<<<<<<<<
  *             if end - f < 5:
- *                 raise RuntimeError("Format string allocated too short.")
+ *                 raise RuntimeError(u"Format string allocated too short.")
  */
-      __pyx_t_4 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_v_t);
-      __pyx_v_t = __pyx_t_4;
-      __pyx_t_4 = 0;
+      __pyx_v_t = __pyx_t_3;
+      __pyx_t_3 = 0;
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":729
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":809
  *         if not PyDataType_HASFIELDS(child):
  *             t = child.type_num
  *             if end - f < 5:             # <<<<<<<<<<<<<<
- *                 raise RuntimeError("Format string allocated too short.")
+ *                 raise RuntimeError(u"Format string allocated too short.")
  * 
  */
-      __pyx_t_8 = ((__pyx_v_end - __pyx_v_f) < 5);
-      if (__pyx_t_8) {
+      __pyx_t_6 = ((__pyx_v_end - __pyx_v_f) < 5);
+      if (__pyx_t_6) {
 
-        /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":730
+        /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":810
  *             t = child.type_num
  *             if end - f < 5:
- *                 raise RuntimeError("Format string allocated too short.")             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
  * 
  *             # Until ticket #99 is fixed, use integers to avoid warnings
  */
-        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-        __Pyx_INCREF(__pyx_kp_29);
-        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_29);
-        __Pyx_GIVEREF(__pyx_kp_29);
-        __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_INCREF(((PyObject *)__pyx_kp_u_16));
+        PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_u_16));
+        __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_16));
+        __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_5);
-        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
         __Pyx_Raise(__pyx_t_5, 0, 0);
         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         goto __pyx_L10;
       }
       __pyx_L10:;
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":733
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":813
  * 
  *             # Until ticket #99 is fixed, use integers to avoid warnings
  *             if   t == NPY_BYTE:        f[0] =  98 #"b"             # <<<<<<<<<<<<<<
  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
  */
-      __pyx_t_5 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 98;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":734
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":814
  *             # Until ticket #99 is fixed, use integers to avoid warnings
  *             if   t == NPY_BYTE:        f[0] =  98 #"b"
  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"             # <<<<<<<<<<<<<<
  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
  */
-      __pyx_t_4 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (__pyx_t_8) {
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 66;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":735
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":815
  *             if   t == NPY_BYTE:        f[0] =  98 #"b"
  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
  *             elif t == NPY_SHORT:       f[0] = 104 #"h"             # <<<<<<<<<<<<<<
  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
  *             elif t == NPY_INT:         f[0] = 105 #"i"
  */
-      __pyx_t_5 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 104;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":736
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":816
  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
  *             elif t == NPY_USHORT:      f[0] =  72 #"H"             # <<<<<<<<<<<<<<
  *             elif t == NPY_INT:         f[0] = 105 #"i"
  *             elif t == NPY_UINT:        f[0] =  73 #"I"
  */
-      __pyx_t_4 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (__pyx_t_8) {
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 72;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":737
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":817
  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
  *             elif t == NPY_INT:         f[0] = 105 #"i"             # <<<<<<<<<<<<<<
  *             elif t == NPY_UINT:        f[0] =  73 #"I"
  *             elif t == NPY_LONG:        f[0] = 108 #"l"
  */
-      __pyx_t_5 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 105;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":738
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":818
  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
  *             elif t == NPY_INT:         f[0] = 105 #"i"
  *             elif t == NPY_UINT:        f[0] =  73 #"I"             # <<<<<<<<<<<<<<
  *             elif t == NPY_LONG:        f[0] = 108 #"l"
  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
  */
-      __pyx_t_4 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (__pyx_t_8) {
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 73;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":739
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":819
  *             elif t == NPY_INT:         f[0] = 105 #"i"
  *             elif t == NPY_UINT:        f[0] =  73 #"I"
  *             elif t == NPY_LONG:        f[0] = 108 #"l"             # <<<<<<<<<<<<<<
  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
  */
-      __pyx_t_5 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 108;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":740
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":820
  *             elif t == NPY_UINT:        f[0] =  73 #"I"
  *             elif t == NPY_LONG:        f[0] = 108 #"l"
  *             elif t == NPY_ULONG:       f[0] = 76  #"L"             # <<<<<<<<<<<<<<
  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
  */
-      __pyx_t_4 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (__pyx_t_8) {
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 76;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":741
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":821
  *             elif t == NPY_LONG:        f[0] = 108 #"l"
  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"             # <<<<<<<<<<<<<<
  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
  */
-      __pyx_t_5 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 113;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":742
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":822
  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"             # <<<<<<<<<<<<<<
  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
  */
-      __pyx_t_4 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (__pyx_t_8) {
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 81;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":743
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":823
  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"             # <<<<<<<<<<<<<<
  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
  */
-      __pyx_t_5 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 102;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":744
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":824
  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"             # <<<<<<<<<<<<<<
  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
  */
-      __pyx_t_4 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (__pyx_t_8) {
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 100;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":745
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":825
  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"             # <<<<<<<<<<<<<<
  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
  */
-      __pyx_t_5 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 103;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":746
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":826
  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf             # <<<<<<<<<<<<<<
  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
  */
-      __pyx_t_4 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (__pyx_t_8) {
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 90;
         (__pyx_v_f[1]) = 102;
         __pyx_v_f += 1;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":747
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":827
  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd             # <<<<<<<<<<<<<<
  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
  */
-      __pyx_t_5 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 90;
         (__pyx_v_f[1]) = 100;
         __pyx_v_f += 1;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":748
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":828
  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg             # <<<<<<<<<<<<<<
  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
  *             else:
  */
-      __pyx_t_4 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (__pyx_t_8) {
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 90;
         (__pyx_v_f[1]) = 103;
         __pyx_v_f += 1;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":749
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":829
  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"             # <<<<<<<<<<<<<<
  *             else:
- *                 raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
+ *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
  */
-      __pyx_t_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 79;
         goto __pyx_L11;
       }
       /*else*/ {
 
-        /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":751
+        /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":831
  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
  *             else:
- *                 raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
+ *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
  *             f += 1
  *         else:
  */
-        __pyx_t_4 = PyNumber_Remainder(__pyx_kp_30, __pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
-        __Pyx_GIVEREF(__pyx_t_4);
-        __pyx_t_4 = 0;
-        __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-        __Pyx_Raise(__pyx_t_4, 0, 0);
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_14), __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
+        __Pyx_GIVEREF(__pyx_t_3);
+        __pyx_t_3 = 0;
+        __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_Raise(__pyx_t_3, 0, 0);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
       __pyx_L11:;
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":752
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":832
  *             else:
- *                 raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
+ *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
  *             f += 1             # <<<<<<<<<<<<<<
  *         else:
  *             # Cython ignores struct boundary information ("T{...}"),
@@ -8626,25 +8974,26 @@
     }
     /*else*/ {
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":756
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":836
  *             # Cython ignores struct boundary information ("T{...}"),
  *             # so don't output it
  *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
  *     return f
  * 
  */
-      __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_v_f = __pyx_t_9;
+      __pyx_t_10 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_v_f = __pyx_t_10;
     }
     __pyx_L9:;
   }
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":757
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":837
  *             # so don't output it
  *             f = _util_dtypestring(child, f, end, offset)
  *     return f             # <<<<<<<<<<<<<<
  * 
+ * 
  */
   __pyx_r = __pyx_v_f;
   goto __pyx_L0;
@@ -8652,9 +9001,6 @@
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_1);
-  __Pyx_XDECREF(__pyx_2);
-  __Pyx_XDECREF(__pyx_3);
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_4);
@@ -8667,10 +9013,150 @@
   __Pyx_DECREF(__pyx_v_childname);
   __Pyx_DECREF(__pyx_v_new_offset);
   __Pyx_DECREF(__pyx_v_t);
-  __Pyx_FinishRefcountContext();
+  __Pyx_DECREF((PyObject *)__pyx_v_descr);
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":952
+ * 
+ * 
+ * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
+ *      cdef PyObject* baseptr
+ *      if base is None:
+ */
+
+static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
+  PyObject *__pyx_v_baseptr;
+  int __pyx_t_1;
+  __Pyx_RefNannySetupContext("set_array_base");
+  __Pyx_INCREF((PyObject *)__pyx_v_arr);
+  __Pyx_INCREF(__pyx_v_base);
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":954
+ * cdef inline void set_array_base(ndarray arr, object base):
+ *      cdef PyObject* baseptr
+ *      if base is None:             # <<<<<<<<<<<<<<
+ *          baseptr = NULL
+ *      else:
+ */
+  __pyx_t_1 = (__pyx_v_base == Py_None);
+  if (__pyx_t_1) {
+
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":955
+ *      cdef PyObject* baseptr
+ *      if base is None:
+ *          baseptr = NULL             # <<<<<<<<<<<<<<
+ *      else:
+ *          Py_INCREF(base) # important to do this before decref below!
+ */
+    __pyx_v_baseptr = NULL;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":957
+ *          baseptr = NULL
+ *      else:
+ *          Py_INCREF(base) # important to do this before decref below!             # <<<<<<<<<<<<<<
+ *          baseptr = <PyObject*>base
+ *      Py_XDECREF(arr.base)
+ */
+    Py_INCREF(__pyx_v_base);
+
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":958
+ *      else:
+ *          Py_INCREF(base) # important to do this before decref below!
+ *          baseptr = <PyObject*>base             # <<<<<<<<<<<<<<
+ *      Py_XDECREF(arr.base)
+ *      arr.base = baseptr
+ */
+    __pyx_v_baseptr = ((PyObject *)__pyx_v_base);
+  }
+  __pyx_L3:;
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":959
+ *          Py_INCREF(base) # important to do this before decref below!
+ *          baseptr = <PyObject*>base
+ *      Py_XDECREF(arr.base)             # <<<<<<<<<<<<<<
+ *      arr.base = baseptr
+ * 
+ */
+  Py_XDECREF(__pyx_v_arr->base);
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":960
+ *          baseptr = <PyObject*>base
+ *      Py_XDECREF(arr.base)
+ *      arr.base = baseptr             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline object get_array_base(ndarray arr):
+ */
+  __pyx_v_arr->base = __pyx_v_baseptr;
+
+  __Pyx_DECREF((PyObject *)__pyx_v_arr);
+  __Pyx_DECREF(__pyx_v_base);
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":962
+ *      arr.base = baseptr
+ * 
+ * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
+ *     if arr.base is NULL:
+ *         return None
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
+  PyObject *__pyx_r = NULL;
+  int __pyx_t_1;
+  __Pyx_RefNannySetupContext("get_array_base");
+  __Pyx_INCREF((PyObject *)__pyx_v_arr);
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":963
+ * 
+ * cdef inline object get_array_base(ndarray arr):
+ *     if arr.base is NULL:             # <<<<<<<<<<<<<<
+ *         return None
+ *     else:
+ */
+  __pyx_t_1 = (__pyx_v_arr->base == NULL);
+  if (__pyx_t_1) {
+
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":964
+ * cdef inline object get_array_base(ndarray arr):
+ *     if arr.base is NULL:
+ *         return None             # <<<<<<<<<<<<<<
+ *     else:
+ *         return <object>arr.base
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":966
+ *         return None
+ *     else:
+ *         return <object>arr.base             # <<<<<<<<<<<<<<
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
+    __pyx_r = ((PyObject *)__pyx_v_arr->base);
+    goto __pyx_L0;
+  }
+  __pyx_L3:;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_L0:;
+  __Pyx_DECREF((PyObject *)__pyx_v_arr);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
 static PyObject *__pyx_tp_new_5scipy_2io_6matlab_10mio5_utils_VarHeader5(PyTypeObject *t, PyObject *a, PyObject *k) {
   struct __pyx_obj_5scipy_2io_6matlab_10mio5_utils_VarHeader5 *p;
   PyObject *o = (*t->tp_alloc)(t, 0);
@@ -8868,6 +9354,10 @@
   0, /*tp_cache*/
   0, /*tp_subclasses*/
   0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
 };
 static struct __pyx_vtabstruct_5scipy_2io_6matlab_10mio5_utils_VarReader5 __pyx_vtable_5scipy_2io_6matlab_10mio5_utils_VarReader5;
 
@@ -9114,6 +9604,10 @@
   0, /*tp_cache*/
   0, /*tp_subclasses*/
   0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
 };
 
 static struct PyMethodDef __pyx_methods[] = {
@@ -9127,7 +9621,7 @@
 static struct PyModuleDef __pyx_moduledef = {
     PyModuleDef_HEAD_INIT,
     __Pyx_NAMESTR("mio5_utils"),
-    __Pyx_DOCSTR(__pyx_mdoc), /* m_doc */
+    __Pyx_DOCSTR(__pyx_k_17), /* m_doc */
     -1, /* m_size */
     __pyx_methods /* m_methods */,
     NULL, /* m_reload */
@@ -9138,139 +9632,180 @@
 #endif
 
 static __Pyx_StringTabEntry __pyx_string_tab[] = {
-  {&__pyx_kp___main__, __pyx_k___main__, sizeof(__pyx_k___main__), 1, 1, 1},
-  {&__pyx_kp_31, __pyx_k_31, sizeof(__pyx_k_31), 1, 1, 1},
-  {&__pyx_kp___cinit__, __pyx_k___cinit__, sizeof(__pyx_k___cinit__), 1, 1, 1},
-  {&__pyx_kp_set_stream, __pyx_k_set_stream, sizeof(__pyx_k_set_stream), 1, 1, 1},
-  {&__pyx_kp_read_tag, __pyx_k_read_tag, sizeof(__pyx_k_read_tag), 1, 1, 1},
-  {&__pyx_kp_read_numeric, __pyx_k_read_numeric, sizeof(__pyx_k_read_numeric), 1, 1, 1},
-  {&__pyx_kp_read_full_tag, __pyx_k_read_full_tag, sizeof(__pyx_k_read_full_tag), 1, 1, 1},
-  {&__pyx_kp_read_header, __pyx_k_read_header, sizeof(__pyx_k_read_header), 1, 1, 1},
-  {&__pyx_kp_array_from_header, __pyx_k_array_from_header, sizeof(__pyx_k_array_from_header), 1, 1, 1},
-  {&__pyx_kp_read_real_complex, __pyx_k_read_real_complex, sizeof(__pyx_k_read_real_complex), 1, 1, 1},
-  {&__pyx_kp_read_char, __pyx_k_read_char, sizeof(__pyx_k_read_char), 1, 1, 1},
-  {&__pyx_kp_read_cells, __pyx_k_read_cells, sizeof(__pyx_k_read_cells), 1, 1, 1},
-  {&__pyx_kp_read_fieldnames, __pyx_k_read_fieldnames, sizeof(__pyx_k_read_fieldnames), 1, 1, 1},
-  {&__pyx_kp_read_struct, __pyx_k_read_struct, sizeof(__pyx_k_read_struct), 1, 1, 1},
-  {&__pyx_kp_read_opaque, __pyx_k_read_opaque, sizeof(__pyx_k_read_opaque), 1, 1, 1},
-  {&__pyx_kp_32, __pyx_k_32, sizeof(__pyx_k_32), 1, 1, 1},
-  {&__pyx_kp_preader, __pyx_k_preader, sizeof(__pyx_k_preader), 1, 1, 1},
-  {&__pyx_kp_fobj, __pyx_k_fobj, sizeof(__pyx_k_fobj), 1, 1, 1},
-  {&__pyx_kp_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 1, 1, 1},
-  {&__pyx_kp_header, __pyx_k_header, sizeof(__pyx_k_header), 1, 1, 1},
-  {&__pyx_kp_process, __pyx_k_process, sizeof(__pyx_k_process), 1, 1, 1},
-  {&__pyx_kp_hdr, __pyx_k_hdr, sizeof(__pyx_k_hdr), 1, 1, 1},
-  {&__pyx_kp_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 1, 1, 1},
-  {&__pyx_kp_pycopy, __pyx_k_pycopy, sizeof(__pyx_k_pycopy), 0, 1, 1},
-  {&__pyx_kp_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 1, 1, 1},
-  {&__pyx_kp_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 1, 1},
-  {&__pyx_kp_33, __pyx_k_33, sizeof(__pyx_k_33), 1, 1, 1},
-  {&__pyx_kp_34, __pyx_k_34, sizeof(__pyx_k_34), 1, 1, 1},
-  {&__pyx_kp_miob, __pyx_k_miob, sizeof(__pyx_k_miob), 0, 1, 1},
-  {&__pyx_kp_35, __pyx_k_35, sizeof(__pyx_k_35), 1, 1, 1},
-  {&__pyx_kp_process_element, __pyx_k_process_element, sizeof(__pyx_k_process_element), 1, 1, 1},
-  {&__pyx_kp_36, __pyx_k_36, sizeof(__pyx_k_36), 1, 1, 1},
-  {&__pyx_kp_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 1, 1},
-  {&__pyx_kp_38, __pyx_k_38, sizeof(__pyx_k_38), 1, 1, 1},
-  {&__pyx_kp_scipy, __pyx_k_scipy, sizeof(__pyx_k_scipy), 0, 1, 1},
-  {&__pyx_kp_byteorder, __pyx_k_byteorder, sizeof(__pyx_k_byteorder), 1, 1, 1},
-  {&__pyx_kp_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 1, 0},
-  {&__pyx_kp_sys_is_le, __pyx_k_sys_is_le, sizeof(__pyx_k_sys_is_le), 1, 1, 1},
-  {&__pyx_kp_native_code, __pyx_k_native_code, sizeof(__pyx_k_native_code), 1, 1, 1},
-  {&__pyx_kp_swapped_code, __pyx_k_swapped_code, sizeof(__pyx_k_swapped_code), 1, 1, 1},
-  {&__pyx_kp_OPAQUE_DTYPE, __pyx_k_OPAQUE_DTYPE, sizeof(__pyx_k_OPAQUE_DTYPE), 1, 1, 1},
-  {&__pyx_kp_byte_order, __pyx_k_byte_order, sizeof(__pyx_k_byte_order), 1, 1, 1},
-  {&__pyx_kp_struct_as_record, __pyx_k_struct_as_record, sizeof(__pyx_k_struct_as_record), 1, 1, 1},
-  {&__pyx_kp_codecs, __pyx_k_codecs, sizeof(__pyx_k_codecs), 1, 1, 1},
-  {&__pyx_kp_44, __pyx_k_44, sizeof(__pyx_k_44), 1, 1, 1},
-  {&__pyx_kp_mat_stream, __pyx_k_mat_stream, sizeof(__pyx_k_mat_stream), 1, 1, 1},
-  {&__pyx_kp_mat_dtype, __pyx_k_mat_dtype, sizeof(__pyx_k_mat_dtype), 1, 1, 1},
-  {&__pyx_kp_chars_as_strings, __pyx_k_chars_as_strings, sizeof(__pyx_k_chars_as_strings), 1, 1, 1},
-  {&__pyx_kp_squeeze_me, __pyx_k_squeeze_me, sizeof(__pyx_k_squeeze_me), 1, 1, 1},
-  {&__pyx_kp_dtypes, __pyx_k_dtypes, sizeof(__pyx_k_dtypes), 1, 1, 1},
-  {&__pyx_kp_items, __pyx_k_items, sizeof(__pyx_k_items), 1, 1, 1},
-  {&__pyx_kp_basestring, __pyx_k_basestring, sizeof(__pyx_k_basestring), 1, 1, 1},
-  {&__pyx_kp_class_dtypes, __pyx_k_class_dtypes, sizeof(__pyx_k_class_dtypes), 1, 1, 1},
-  {&__pyx_kp_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 1, 1, 1},
-  {&__pyx_kp_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 1, 0},
-  {&__pyx_kp_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 1, 1, 1},
-  {&__pyx_kp_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 1, 1, 1},
-  {&__pyx_kp_range, __pyx_k_range, sizeof(__pyx_k_range), 1, 1, 1},
-  {&__pyx_kp_append, __pyx_k_append, sizeof(__pyx_k_append), 1, 1, 1},
-  {&__pyx_kp_array, __pyx_k_array, sizeof(__pyx_k_array), 1, 1, 1},
-  {&__pyx_kp_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 1, 1, 1},
-  {&__pyx_kp_MatlabObject, __pyx_k_MatlabObject, sizeof(__pyx_k_MatlabObject), 1, 1, 1},
-  {&__pyx_kp_MatlabFunction, __pyx_k_MatlabFunction, sizeof(__pyx_k_MatlabFunction), 1, 1, 1},
-  {&__pyx_kp_MatlabOpaque, __pyx_k_MatlabOpaque, sizeof(__pyx_k_MatlabOpaque), 1, 1, 1},
-  {&__pyx_kp_reshape, __pyx_k_reshape, sizeof(__pyx_k_reshape), 1, 1, 1},
-  {&__pyx_kp_T, __pyx_k_T, sizeof(__pyx_k_T), 1, 1, 1},
-  {&__pyx_kp_sparse, __pyx_k_sparse, sizeof(__pyx_k_sparse), 1, 1, 1},
-  {&__pyx_kp_csc_matrix, __pyx_k_csc_matrix, sizeof(__pyx_k_csc_matrix), 1, 1, 1},
-  {&__pyx_kp_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 1, 1, 1},
-  {&__pyx_kp_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 1, 0},
-  {&__pyx_kp_ndarray, __pyx_k_ndarray, sizeof(__pyx_k_ndarray), 1, 1, 1},
-  {&__pyx_kp_buffer, __pyx_k_buffer, sizeof(__pyx_k_buffer), 1, 1, 1},
-  {&__pyx_kp_54, __pyx_k_54, sizeof(__pyx_k_54), 1, 1, 1},
-  {&__pyx_kp_tostring, __pyx_k_tostring, sizeof(__pyx_k_tostring), 1, 1, 1},
-  {&__pyx_kp_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 1, 0},
-  {&__pyx_kp_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 1, 1, 1},
-  {&__pyx_kp_order, __pyx_k_order, sizeof(__pyx_k_order), 1, 1, 1},
-  {&__pyx_kp_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 1, 0},
-  {&__pyx_kp_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 1, 1, 1},
-  {&__pyx_kp_object, __pyx_k_object, sizeof(__pyx_k_object), 1, 1, 1},
-  {&__pyx_kp_mat_struct, __pyx_k_mat_struct, sizeof(__pyx_k_mat_struct), 1, 1, 1},
-  {&__pyx_kp__fieldnames, __pyx_k__fieldnames, sizeof(__pyx_k__fieldnames), 1, 1, 1},
-  {&__pyx_kp___dict__, __pyx_k___dict__, sizeof(__pyx_k___dict__), 1, 1, 1},
-  {&__pyx_kp_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 1, 0},
-  {&__pyx_kp_61, __pyx_k_61, sizeof(__pyx_k_61), 0, 1, 0},
-  {&__pyx_kp_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 1, 0},
-  {&__pyx_kp_63, __pyx_k_63, sizeof(__pyx_k_63), 0, 1, 0},
-  {&__pyx_kp_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 0},
-  {&__pyx_kp_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 0, 0},
-  {&__pyx_kp_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 0, 0},
-  {&__pyx_kp_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 0, 0},
-  {&__pyx_kp_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 0, 0},
-  {&__pyx_kp_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 0},
-  {&__pyx_kp_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 0},
-  {&__pyx_kp_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 0},
-  {&__pyx_kp_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 0},
-  {&__pyx_kp_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 0, 0},
-  {&__pyx_kp_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 0},
-  {&__pyx_kp_56, __pyx_k_56, sizeof(__pyx_k_56), 0, 0, 0},
-  {&__pyx_kp_57, __pyx_k_57, sizeof(__pyx_k_57), 0, 0, 0},
-  {&__pyx_kp_59, __pyx_k_59, sizeof(__pyx_k_59), 0, 0, 0},
-  {&__pyx_kp___getbuffer__, __pyx_k___getbuffer__, sizeof(__pyx_k___getbuffer__), 1, 1, 1},
-  {&__pyx_kp___releasebuffer__, __pyx_k___releasebuffer__, sizeof(__pyx_k___releasebuffer__), 1, 1, 1},
-  {&__pyx_kp_info, __pyx_k_info, sizeof(__pyx_k_info), 1, 1, 1},
-  {&__pyx_kp_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 1, 1, 1},
-  {&__pyx_kp_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 1, 1, 1},
-  {&__pyx_kp_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 0},
-  {&__pyx_kp_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 0},
-  {&__pyx_kp_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 0},
-  {&__pyx_kp_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 0},
-  {&__pyx_kp_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 0},
-  {&__pyx_kp_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 0},
-  {&__pyx_kp_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 0},
-  {&__pyx_kp_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 0},
-  {0, 0, 0, 0, 0, 0}
+  {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
+  {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0},
+  {&__pyx_kp_u_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 1, 0, 0},
+  {&__pyx_kp_u_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 1, 0, 0},
+  {&__pyx_kp_u_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 1, 0, 0},
+  {&__pyx_kp_u_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 1, 0, 0},
+  {&__pyx_kp_u_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 1, 0, 0},
+  {&__pyx_kp_u_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 1, 0, 0},
+  {&__pyx_n_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 1},
+  {&__pyx_n_s_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 1},
+  {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
+  {&__pyx_n_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 1},
+  {&__pyx_n_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 1},
+  {&__pyx_n_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 1},
+  {&__pyx_kp_s_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 1, 0},
+  {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0},
+  {&__pyx_kp_u_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 1, 0, 0},
+  {&__pyx_kp_u_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 1, 0, 0},
+  {&__pyx_kp_u_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 1, 0, 0},
+  {&__pyx_kp_u_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 1, 0, 0},
+  {&__pyx_kp_u_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 1, 0, 0},
+  {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
+  {&__pyx_kp_u_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 1, 0, 0},
+  {&__pyx_kp_u_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 1, 0, 0},
+  {&__pyx_kp_u_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 1, 0, 0},
+  {&__pyx_kp_u_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 1, 0, 0},
+  {&__pyx_kp_u_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 1, 0, 0},
+  {&__pyx_kp_u_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 1, 0, 0},
+  {&__pyx_kp_u_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 1, 0, 0},
+  {&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0},
+  {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0},
+  {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
+  {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0},
+  {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0},
+  {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0},
+  {&__pyx_n_s__F, __pyx_k__F, sizeof(__pyx_k__F), 0, 0, 1, 1},
+  {&__pyx_n_s__MatlabFunction, __pyx_k__MatlabFunction, sizeof(__pyx_k__MatlabFunction), 0, 0, 1, 1},
+  {&__pyx_n_s__MatlabObject, __pyx_k__MatlabObject, sizeof(__pyx_k__MatlabObject), 0, 0, 1, 1},
+  {&__pyx_n_s__MatlabOpaque, __pyx_k__MatlabOpaque, sizeof(__pyx_k__MatlabOpaque), 0, 0, 1, 1},
+  {&__pyx_n_s__OPAQUE_DTYPE, __pyx_k__OPAQUE_DTYPE, sizeof(__pyx_k__OPAQUE_DTYPE), 0, 0, 1, 1},
+  {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1},
+  {&__pyx_n_s__T, __pyx_k__T, sizeof(__pyx_k__T), 0, 0, 1, 1},
+  {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1},
+  {&__pyx_n_s__U1_dtype, __pyx_k__U1_dtype, sizeof(__pyx_k__U1_dtype), 0, 0, 1, 1},
+  {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
+  {&__pyx_n_s__VarReader5, __pyx_k__VarReader5, sizeof(__pyx_k__VarReader5), 0, 0, 1, 1},
+  {&__pyx_n_s____dict__, __pyx_k____dict__, sizeof(__pyx_k____dict__), 0, 0, 1, 1},
+  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
+  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
+  {&__pyx_n_s___fieldnames, __pyx_k___fieldnames, sizeof(__pyx_k___fieldnames), 0, 0, 1, 1},
+  {&__pyx_n_s__arr, __pyx_k__arr, sizeof(__pyx_k__arr), 0, 0, 1, 1},
+  {&__pyx_n_s__array, __pyx_k__array, sizeof(__pyx_k__array), 0, 0, 1, 1},
+  {&__pyx_n_s__array_from_header, __pyx_k__array_from_header, sizeof(__pyx_k__array_from_header), 0, 0, 1, 1},
+  {&__pyx_n_s__ascii, __pyx_k__ascii, sizeof(__pyx_k__ascii), 0, 0, 1, 1},
+  {&__pyx_n_s__astype, __pyx_k__astype, sizeof(__pyx_k__astype), 0, 0, 1, 1},
+  {&__pyx_n_s__base, __pyx_k__base, sizeof(__pyx_k__base), 0, 0, 1, 1},
+  {&__pyx_n_s__basestring, __pyx_k__basestring, sizeof(__pyx_k__basestring), 0, 0, 1, 1},
+  {&__pyx_n_s__bool, __pyx_k__bool, sizeof(__pyx_k__bool), 0, 0, 1, 1},
+  {&__pyx_n_s__bool_dtype, __pyx_k__bool_dtype, sizeof(__pyx_k__bool_dtype), 0, 0, 1, 1},
+  {&__pyx_n_s__buf, __pyx_k__buf, sizeof(__pyx_k__buf), 0, 0, 1, 1},
+  {&__pyx_n_s__buffer, __pyx_k__buffer, sizeof(__pyx_k__buffer), 0, 0, 1, 1},
+  {&__pyx_n_s__byte_order, __pyx_k__byte_order, sizeof(__pyx_k__byte_order), 0, 0, 1, 1},
+  {&__pyx_n_s__byteorder, __pyx_k__byteorder, sizeof(__pyx_k__byteorder), 0, 0, 1, 1},
+  {&__pyx_n_s__chars_as_strings, __pyx_k__chars_as_strings, sizeof(__pyx_k__chars_as_strings), 0, 0, 1, 1},
+  {&__pyx_n_s__chars_to_strings, __pyx_k__chars_to_strings, sizeof(__pyx_k__chars_to_strings), 0, 0, 1, 1},
+  {&__pyx_n_s__class_dtypes, __pyx_k__class_dtypes, sizeof(__pyx_k__class_dtypes), 0, 0, 1, 1},
+  {&__pyx_n_s__codecs, __pyx_k__codecs, sizeof(__pyx_k__codecs), 0, 0, 1, 1},
+  {&__pyx_n_s__copy, __pyx_k__copy, sizeof(__pyx_k__copy), 0, 0, 1, 1},
+  {&__pyx_n_s__cread_fieldnames, __pyx_k__cread_fieldnames, sizeof(__pyx_k__cread_fieldnames), 0, 0, 1, 1},
+  {&__pyx_n_s__cread_full_tag, __pyx_k__cread_full_tag, sizeof(__pyx_k__cread_full_tag), 0, 0, 1, 1},
+  {&__pyx_n_s__cread_tag, __pyx_k__cread_tag, sizeof(__pyx_k__cread_tag), 0, 0, 1, 1},
+  {&__pyx_n_s__csc_matrix, __pyx_k__csc_matrix, sizeof(__pyx_k__csc_matrix), 0, 0, 1, 1},
+  {&__pyx_n_s__cstream, __pyx_k__cstream, sizeof(__pyx_k__cstream), 0, 0, 1, 1},
+  {&__pyx_n_s__decode, __pyx_k__decode, sizeof(__pyx_k__decode), 0, 0, 1, 1},
+  {&__pyx_n_s__descr, __pyx_k__descr, sizeof(__pyx_k__descr), 0, 0, 1, 1},
+  {&__pyx_n_s__dims, __pyx_k__dims, sizeof(__pyx_k__dims), 0, 0, 1, 1},
+  {&__pyx_n_s__dims_ptr, __pyx_k__dims_ptr, sizeof(__pyx_k__dims_ptr), 0, 0, 1, 1},
+  {&__pyx_n_s__dtype, __pyx_k__dtype, sizeof(__pyx_k__dtype), 0, 0, 1, 1},
+  {&__pyx_n_s__dtypes, __pyx_k__dtypes, sizeof(__pyx_k__dtypes), 0, 0, 1, 1},
+  {&__pyx_n_s__empty, __pyx_k__empty, sizeof(__pyx_k__empty), 0, 0, 1, 1},
+  {&__pyx_n_s__fields, __pyx_k__fields, sizeof(__pyx_k__fields), 0, 0, 1, 1},
+  {&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1},
+  {&__pyx_n_s__header, __pyx_k__header, sizeof(__pyx_k__header), 0, 0, 1, 1},
+  {&__pyx_n_s__is_complex, __pyx_k__is_complex, sizeof(__pyx_k__is_complex), 0, 0, 1, 1},
+  {&__pyx_n_s__is_global, __pyx_k__is_global, sizeof(__pyx_k__is_global), 0, 0, 1, 1},
+  {&__pyx_n_s__is_logical, __pyx_k__is_logical, sizeof(__pyx_k__is_logical), 0, 0, 1, 1},
+  {&__pyx_n_s__is_swapped, __pyx_k__is_swapped, sizeof(__pyx_k__is_swapped), 0, 0, 1, 1},
+  {&__pyx_n_s__items, __pyx_k__items, sizeof(__pyx_k__items), 0, 0, 1, 1},
+  {&__pyx_n_s__itemsize, __pyx_k__itemsize, sizeof(__pyx_k__itemsize), 0, 0, 1, 1},
+  {&__pyx_n_s__little, __pyx_k__little, sizeof(__pyx_k__little), 0, 0, 1, 1},
+  {&__pyx_n_s__little_endian, __pyx_k__little_endian, sizeof(__pyx_k__little_endian), 0, 0, 1, 1},
+  {&__pyx_n_s__mat_dtype, __pyx_k__mat_dtype, sizeof(__pyx_k__mat_dtype), 0, 0, 1, 1},
+  {&__pyx_n_s__mat_stream, __pyx_k__mat_stream, sizeof(__pyx_k__mat_stream), 0, 0, 1, 1},
+  {&__pyx_n_s__mat_struct, __pyx_k__mat_struct, sizeof(__pyx_k__mat_struct), 0, 0, 1, 1},
+  {&__pyx_n_s__mclass, __pyx_k__mclass, sizeof(__pyx_k__mclass), 0, 0, 1, 1},
+  {&__pyx_n_s__mio5p, __pyx_k__mio5p, sizeof(__pyx_k__mio5p), 0, 0, 1, 1},
+  {&__pyx_n_s__miob, __pyx_k__miob, sizeof(__pyx_k__miob), 0, 0, 1, 1},
+  {&__pyx_n_s__n_dims, __pyx_k__n_dims, sizeof(__pyx_k__n_dims), 0, 0, 1, 1},
+  {&__pyx_n_s__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1},
+  {&__pyx_n_s__names, __pyx_k__names, sizeof(__pyx_k__names), 0, 0, 1, 1},
+  {&__pyx_n_s__native_code, __pyx_k__native_code, sizeof(__pyx_k__native_code), 0, 0, 1, 1},
+  {&__pyx_n_s__ndarray, __pyx_k__ndarray, sizeof(__pyx_k__ndarray), 0, 0, 1, 1},
+  {&__pyx_n_s__ndim, __pyx_k__ndim, sizeof(__pyx_k__ndim), 0, 0, 1, 1},
+  {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1},
+  {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1},
+  {&__pyx_n_s__nzmax, __pyx_k__nzmax, sizeof(__pyx_k__nzmax), 0, 0, 1, 1},
+  {&__pyx_n_s__obj, __pyx_k__obj, sizeof(__pyx_k__obj), 0, 0, 1, 1},
+  {&__pyx_n_s__object, __pyx_k__object, sizeof(__pyx_k__object), 0, 0, 1, 1},
+  {&__pyx_n_s__order, __pyx_k__order, sizeof(__pyx_k__order), 0, 0, 1, 1},
+  {&__pyx_n_s__preader, __pyx_k__preader, sizeof(__pyx_k__preader), 0, 0, 1, 1},
+  {&__pyx_n_s__process, __pyx_k__process, sizeof(__pyx_k__process), 0, 0, 1, 1},
+  {&__pyx_n_s__pycopy, __pyx_k__pycopy, sizeof(__pyx_k__pycopy), 0, 0, 1, 1},
+  {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
+  {&__pyx_n_s__read_cells, __pyx_k__read_cells, sizeof(__pyx_k__read_cells), 0, 0, 1, 1},
+  {&__pyx_n_s__read_char, __pyx_k__read_char, sizeof(__pyx_k__read_char), 0, 0, 1, 1},
+  {&__pyx_n_s__read_element, __pyx_k__read_element, sizeof(__pyx_k__read_element), 0, 0, 1, 1},
+  {&__pyx_n_s__read_element_into, __pyx_k__read_element_into, sizeof(__pyx_k__read_element_into), 0, 0, 1, 1},
+  {&__pyx_n_s__read_fieldnames, __pyx_k__read_fieldnames, sizeof(__pyx_k__read_fieldnames), 0, 0, 1, 1},
+  {&__pyx_n_s__read_full_tag, __pyx_k__read_full_tag, sizeof(__pyx_k__read_full_tag), 0, 0, 1, 1},
+  {&__pyx_n_s__read_header, __pyx_k__read_header, sizeof(__pyx_k__read_header), 0, 0, 1, 1},
+  {&__pyx_n_s__read_int8_string, __pyx_k__read_int8_string, sizeof(__pyx_k__read_int8_string), 0, 0, 1, 1},
+  {&__pyx_n_s__read_into, __pyx_k__read_into, sizeof(__pyx_k__read_into), 0, 0, 1, 1},
+  {&__pyx_n_s__read_into_int32s, __pyx_k__read_into_int32s, sizeof(__pyx_k__read_into_int32s), 0, 0, 1, 1},
+  {&__pyx_n_s__read_mi_matrix, __pyx_k__read_mi_matrix, sizeof(__pyx_k__read_mi_matrix), 0, 0, 1, 1},
+  {&__pyx_n_s__read_numeric, __pyx_k__read_numeric, sizeof(__pyx_k__read_numeric), 0, 0, 1, 1},
+  {&__pyx_n_s__read_opaque, __pyx_k__read_opaque, sizeof(__pyx_k__read_opaque), 0, 0, 1, 1},
+  {&__pyx_n_s__read_real_complex, __pyx_k__read_real_complex, sizeof(__pyx_k__read_real_complex), 0, 0, 1, 1},
+  {&__pyx_n_s__read_sparse, __pyx_k__read_sparse, sizeof(__pyx_k__read_sparse), 0, 0, 1, 1},
+  {&__pyx_n_s__read_string, __pyx_k__read_string, sizeof(__pyx_k__read_string), 0, 0, 1, 1},
+  {&__pyx_n_s__read_struct, __pyx_k__read_struct, sizeof(__pyx_k__read_struct), 0, 0, 1, 1},
+  {&__pyx_n_s__read_tag, __pyx_k__read_tag, sizeof(__pyx_k__read_tag), 0, 0, 1, 1},
+  {&__pyx_n_s__readonly, __pyx_k__readonly, sizeof(__pyx_k__readonly), 0, 0, 1, 1},
+  {&__pyx_n_s__reshape, __pyx_k__reshape, sizeof(__pyx_k__reshape), 0, 0, 1, 1},
+  {&__pyx_n_s__s0, __pyx_k__s0, sizeof(__pyx_k__s0), 0, 0, 1, 1},
+  {&__pyx_n_s__s1, __pyx_k__s1, sizeof(__pyx_k__s1), 0, 0, 1, 1},
+  {&__pyx_n_s__s2, __pyx_k__s2, sizeof(__pyx_k__s2), 0, 0, 1, 1},
+  {&__pyx_n_s__scipy, __pyx_k__scipy, sizeof(__pyx_k__scipy), 0, 0, 1, 1},
+  {&__pyx_n_s__seek, __pyx_k__seek, sizeof(__pyx_k__seek), 0, 0, 1, 1},
+  {&__pyx_n_s__set_stream, __pyx_k__set_stream, sizeof(__pyx_k__set_stream), 0, 0, 1, 1},
+  {&__pyx_n_s__shape, __pyx_k__shape, sizeof(__pyx_k__shape), 0, 0, 1, 1},
+  {&__pyx_n_s__size_from_header, __pyx_k__size_from_header, sizeof(__pyx_k__size_from_header), 0, 0, 1, 1},
+  {&__pyx_n_s__sparse, __pyx_k__sparse, sizeof(__pyx_k__sparse), 0, 0, 1, 1},
+  {&__pyx_n_s__squeeze_element, __pyx_k__squeeze_element, sizeof(__pyx_k__squeeze_element), 0, 0, 1, 1},
+  {&__pyx_n_s__squeeze_me, __pyx_k__squeeze_me, sizeof(__pyx_k__squeeze_me), 0, 0, 1, 1},
+  {&__pyx_n_s__strides, __pyx_k__strides, sizeof(__pyx_k__strides), 0, 0, 1, 1},
+  {&__pyx_n_s__struct_as_record, __pyx_k__struct_as_record, sizeof(__pyx_k__struct_as_record), 0, 0, 1, 1},
+  {&__pyx_n_s__suboffsets, __pyx_k__suboffsets, sizeof(__pyx_k__suboffsets), 0, 0, 1, 1},
+  {&__pyx_n_s__swapped_code, __pyx_k__swapped_code, sizeof(__pyx_k__swapped_code), 0, 0, 1, 1},
+  {&__pyx_n_s__sys, __pyx_k__sys, sizeof(__pyx_k__sys), 0, 0, 1, 1},
+  {&__pyx_n_s__sys_is_le, __pyx_k__sys_is_le, sizeof(__pyx_k__sys_is_le), 0, 0, 1, 1},
+  {&__pyx_n_s__tostring, __pyx_k__tostring, sizeof(__pyx_k__tostring), 0, 0, 1, 1},
+  {&__pyx_n_s__type_num, __pyx_k__type_num, sizeof(__pyx_k__type_num), 0, 0, 1, 1},
+  {&__pyx_n_s__uint16_codec, __pyx_k__uint16_codec, sizeof(__pyx_k__uint16_codec), 0, 0, 1, 1},
+  {&__pyx_n_s__uint16_len, __pyx_k__uint16_len, sizeof(__pyx_k__uint16_len), 0, 0, 1, 1},
+  {&__pyx_n_s__uint8, __pyx_k__uint8, sizeof(__pyx_k__uint8), 0, 0, 1, 1},
+  {0, 0, 0, 0, 0, 0, 0}
 };
 static int __Pyx_InitCachedBuiltins(void) {
-  __pyx_builtin_basestring = __Pyx_GetName(__pyx_b, __pyx_kp_basestring); if (!__pyx_builtin_basestring) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_kp_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_kp_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_kp_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_object = __Pyx_GetName(__pyx_b, __pyx_kp_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_kp_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_basestring = __Pyx_GetName(__pyx_b, __pyx_n_s__basestring); if (!__pyx_builtin_basestring) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_object = __Pyx_GetName(__pyx_b, __pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   return 0;
   __pyx_L1_error:;
   return -1;
 }
 
 static int __Pyx_InitGlobals(void) {
+  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   return 0;
   __pyx_L1_error:;
   return -1;
@@ -9284,23 +9819,23 @@
 PyMODINIT_FUNC PyInit_mio5_utils(void)
 #endif
 {
-  PyObject *__pyx_1 = 0;
-  PyObject *__pyx_2 = 0;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  __pyx_init_filenames();
-  #ifdef CYTHON_REFNANNY
-  void* __pyx_refchk = NULL;
-  __Pyx_Refnanny = __Pyx_ImportRefcountAPI("refnanny");
-  if (!__Pyx_Refnanny) {
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  #if CYTHON_REFNANNY
+  void* __pyx_refnanny = NULL;
+  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
+  if (!__Pyx_RefNanny) {
       PyErr_Clear();
-      __Pyx_Refnanny = __Pyx_ImportRefcountAPI("Cython.Runtime.refnanny");
-      if (!__Pyx_Refnanny)
-          Py_FatalError("failed to import refnanny module");
+      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
+      if (!__Pyx_RefNanny)
+          Py_FatalError("failed to import 'refnanny' module");
   }
-  __pyx_refchk = __Pyx_Refnanny->NewContext("PyMODINIT_FUNC PyInit_mio5_utils(void)", __LINE__, __FILE__);
+  __pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit_mio5_utils(void)", __LINE__, __FILE__);
   #endif
+  __pyx_init_filenames();
   __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   #if PY_MAJOR_VERSION < 3
   __pyx_empty_bytes = PyString_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -9316,7 +9851,7 @@
   #endif
   /*--- Module creation code ---*/
   #if PY_MAJOR_VERSION < 3
-  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("mio5_utils"), __pyx_methods, __pyx_mdoc, 0, PYTHON_API_VERSION);
+  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("mio5_utils"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_17), 0, PYTHON_API_VERSION);
   #else
   __pyx_m = PyModule_Create(&__pyx_moduledef);
   #endif
@@ -9327,14 +9862,13 @@
   __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
   if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  /*--- Initialize various global constants etc. ---*/
+  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__pyx_module_is_main_scipy__io__matlab__mio5_utils) {
-    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_kp___main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   }
-  /*--- Initialize various global constants etc. ---*/
-  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   /*--- Builtin init code ---*/
   if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_skip_dispatch = 0;
   /*--- Global init code ---*/
   __pyx_v_5scipy_2io_6matlab_10mio5_utils_OPAQUE_DTYPE = ((PyArray_Descr *)Py_None); Py_INCREF(Py_None);
   /*--- Function export code ---*/
@@ -9387,64 +9921,65 @@
   if (__Pyx_SetAttrString(__pyx_m, "VarReader5", (PyObject *)&__pyx_type_5scipy_2io_6matlab_10mio5_utils_VarReader5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5scipy_2io_6matlab_10mio5_utils_VarReader5 = &__pyx_type_5scipy_2io_6matlab_10mio5_utils_VarReader5;
   /*--- Type import code ---*/
-  __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr)); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject)); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject)); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject)); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5scipy_2io_6matlab_7streams_GenericStream = __Pyx_ImportType("scipy.io.matlab.streams", "GenericStream", sizeof(struct __pyx_obj_5scipy_2io_6matlab_7streams_GenericStream)); if (unlikely(!__pyx_ptype_5scipy_2io_6matlab_7streams_GenericStream)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5scipy_2io_6matlab_7streams_GenericStream = __Pyx_ImportType("scipy.io.matlab.streams", "GenericStream", sizeof(struct __pyx_obj_5scipy_2io_6matlab_7streams_GenericStream), 1); if (unlikely(!__pyx_ptype_5scipy_2io_6matlab_7streams_GenericStream)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__Pyx_GetVtable(__pyx_ptype_5scipy_2io_6matlab_7streams_GenericStream->tp_dict, &__pyx_vtabptr_5scipy_2io_6matlab_7streams_GenericStream) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   /*--- Function import code ---*/
-  __pyx_1 = __Pyx_ImportModule("scipy.io.matlab.streams"); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_ImportFunction(__pyx_1, "make_stream", (void (**)(void))&__pyx_f_5scipy_2io_6matlab_7streams_make_stream, "struct __pyx_obj_5scipy_2io_6matlab_7streams_GenericStream *(PyObject *, int __pyx_skip_dispatch)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_t_1 = __Pyx_ImportModule("scipy.io.matlab.streams"); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_ImportFunction(__pyx_t_1, "make_stream", (void (**)(void))&__pyx_f_5scipy_2io_6matlab_7streams_make_stream, "struct __pyx_obj_5scipy_2io_6matlab_7streams_GenericStream *(PyObject *, int __pyx_skip_dispatch)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   /*--- Execution code ---*/
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":15
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":15
  * '''
  * 
  * import sys             # <<<<<<<<<<<<<<
  * 
  * from copy import copy as pycopy
  */
-  __pyx_1 = __Pyx_Import(__pyx_kp_sys, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_kp_sys, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sys, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":17
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":17
  * import sys
  * 
  * from copy import copy as pycopy             # <<<<<<<<<<<<<<
  * 
  * from python cimport Py_INCREF, Py_DECREF
  */
-  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __Pyx_INCREF(__pyx_kp_copy);
-  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_copy);
-  __Pyx_GIVEREF(__pyx_kp_copy);
-  __pyx_1 = __Pyx_Import(__pyx_kp_copy, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_copy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_2);
-  if (PyObject_SetAttr(__pyx_m, __pyx_kp_pycopy, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__copy));
+  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__copy));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__copy));
+  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__copy), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pycopy, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":29
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":29
  *     PyString_FromStringAndSize
  * 
  * import numpy as np             # <<<<<<<<<<<<<<
  * cimport numpy as cnp
  * 
  */
-  __pyx_1 = __Pyx_Import(__pyx_kp_numpy, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_kp_np, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":48
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":48
  * # Numpy must be initialized before any code using the numpy C-API
  * # directly
  * cnp.import_array()             # <<<<<<<<<<<<<<
@@ -9453,183 +9988,321 @@
  */
   import_array();
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":58
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":58
  * 
  * cimport streams
  * import scipy.io.matlab.miobase as miob             # <<<<<<<<<<<<<<
- * from scipy.io.matlab.mio_utils import process_element
+ * from scipy.io.matlab.mio_utils import squeeze_element, chars_to_strings
  * import scipy.io.matlab.mio5_params as mio5p
  */
-  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __Pyx_INCREF(__pyx_kp_34);
-  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_34);
-  __Pyx_GIVEREF(__pyx_kp_34);
-  __pyx_2 = __Pyx_Import(__pyx_kp_33, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_2);
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  if (PyObject_SetAttr(__pyx_m, __pyx_kp_miob, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s_19));
+  PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s_19));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s_19));
+  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_18), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__miob, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":59
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":59
  * cimport streams
  * import scipy.io.matlab.miobase as miob
- * from scipy.io.matlab.mio_utils import process_element             # <<<<<<<<<<<<<<
+ * from scipy.io.matlab.mio_utils import squeeze_element, chars_to_strings             # <<<<<<<<<<<<<<
  * import scipy.io.matlab.mio5_params as mio5p
  * import scipy.sparse
  */
-  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __Pyx_INCREF(__pyx_kp_process_element);
-  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_process_element);
-  __Pyx_GIVEREF(__pyx_kp_process_element);
-  __pyx_1 = __Pyx_Import(__pyx_kp_35, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_process_element); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_2);
-  if (PyObject_SetAttr(__pyx_m, __pyx_kp_process_element, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__squeeze_element));
+  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__squeeze_element));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__squeeze_element));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__chars_to_strings));
+  PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__chars_to_strings));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__chars_to_strings));
+  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_20), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__squeeze_element); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__squeeze_element, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__chars_to_strings); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__chars_to_strings, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":60
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":60
  * import scipy.io.matlab.miobase as miob
- * from scipy.io.matlab.mio_utils import process_element
+ * from scipy.io.matlab.mio_utils import squeeze_element, chars_to_strings
  * import scipy.io.matlab.mio5_params as mio5p             # <<<<<<<<<<<<<<
  * import scipy.sparse
  * 
  */
-  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __Pyx_INCREF(__pyx_kp_34);
-  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_34);
-  __Pyx_GIVEREF(__pyx_kp_34);
-  __pyx_1 = __Pyx_Import(__pyx_kp_36, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  if (PyObject_SetAttr(__pyx_m, __pyx_kp_37, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s_19));
+  PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s_19));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s_19));
+  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_21), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__mio5p, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":61
- * from scipy.io.matlab.mio_utils import process_element
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":61
+ * from scipy.io.matlab.mio_utils import squeeze_element, chars_to_strings
  * import scipy.io.matlab.mio5_params as mio5p
  * import scipy.sparse             # <<<<<<<<<<<<<<
  * 
  * 
  */
-  __pyx_2 = __Pyx_Import(__pyx_kp_38, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_2);
-  if (PyObject_SetAttr(__pyx_m, __pyx_kp_scipy, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_22), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__scipy, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":101
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":101
  *     mxOBJECT_CLASS_FROM_MATRIX_H = 18
  * 
  * sys_is_le = sys.byteorder == 'little'             # <<<<<<<<<<<<<<
  * native_code = sys_is_le and '<' or '>'
  * swapped_code = sys_is_le and '>' or '<'
  */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_sys); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_byteorder); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_kp_39, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (PyObject_SetAttr(__pyx_m, __pyx_kp_sys_is_le, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__byteorder); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__little), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sys_is_le, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":102
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":102
  * 
  * sys_is_le = sys.byteorder == 'little'
  * native_code = sys_is_le and '<' or '>'             # <<<<<<<<<<<<<<
  * swapped_code = sys_is_le and '>' or '<'
  * 
  */
-  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_sys_is_le); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_2);
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_3) {
-    __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-    __Pyx_INCREF(__pyx_kp_40);
-    __pyx_t_2 = __pyx_kp_40;
-  } else {
-    __pyx_t_2 = __pyx_2;
-    __pyx_2 = 0;
-  }
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (!__pyx_t_3) {
+  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys_is_le); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_4) {
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_INCREF(__pyx_kp_41);
-    __pyx_t_1 = __pyx_kp_41;
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_23));
+    __pyx_t_3 = __pyx_kp_s_23;
   } else {
-    __pyx_t_1 = __pyx_t_2;
+    __pyx_t_3 = __pyx_t_2;
     __pyx_t_2 = 0;
   }
-  if (PyObject_SetAttr(__pyx_m, __pyx_kp_native_code, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_4) {
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_24));
+    __pyx_t_2 = __pyx_kp_s_24;
+  } else {
+    __pyx_t_2 = __pyx_t_3;
+    __pyx_t_3 = 0;
+  }
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__native_code, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":103
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":103
  * sys_is_le = sys.byteorder == 'little'
  * native_code = sys_is_le and '<' or '>'
  * swapped_code = sys_is_le and '>' or '<'             # <<<<<<<<<<<<<<
  * 
  * cdef cnp.dtype OPAQUE_DTYPE = mio5p.OPAQUE_DTYPE
  */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_sys_is_le); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_3) {
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-    __Pyx_INCREF(__pyx_kp_42);
-    __pyx_t_1 = __pyx_kp_42;
+  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys_is_le); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_4) {
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_24));
+    __pyx_t_3 = __pyx_kp_s_24;
   } else {
-    __pyx_t_1 = __pyx_1;
-    __pyx_1 = 0;
+    __pyx_t_3 = __pyx_t_2;
+    __pyx_t_2 = 0;
   }
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (!__pyx_t_3) {
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_INCREF(__pyx_kp_43);
-    __pyx_t_2 = __pyx_kp_43;
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_4) {
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_23));
+    __pyx_t_2 = __pyx_kp_s_23;
   } else {
-    __pyx_t_2 = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_t_2 = __pyx_t_3;
+    __pyx_t_3 = 0;
   }
-  if (PyObject_SetAttr(__pyx_m, __pyx_kp_swapped_code, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__swapped_code, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":105
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":105
  * swapped_code = sys_is_le and '>' or '<'
  * 
  * cdef cnp.dtype OPAQUE_DTYPE = mio5p.OPAQUE_DTYPE             # <<<<<<<<<<<<<<
  * 
  * 
  */
-  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_37); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_2);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_2, __pyx_kp_OPAQUE_DTYPE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__mio5p); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-  if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_dtype))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__OPAQUE_DTYPE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_v_5scipy_2io_6matlab_10mio5_utils_OPAQUE_DTYPE));
   __Pyx_DECREF(((PyObject *)__pyx_v_5scipy_2io_6matlab_10mio5_utils_OPAQUE_DTYPE));
-  __Pyx_GIVEREF(__pyx_t_2);
-  __pyx_v_5scipy_2io_6matlab_10mio5_utils_OPAQUE_DTYPE = ((PyArray_Descr *)__pyx_t_2);
-  __pyx_t_2 = 0;
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_v_5scipy_2io_6matlab_10mio5_utils_OPAQUE_DTYPE = ((PyArray_Descr *)__pyx_t_3);
+  __pyx_t_3 = 0;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/python_mem.pxd":1
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio5_utils.pyx":1
+ * ''' Cython mio5 utility routines (-*- python -*- like)             # <<<<<<<<<<<<<<
+ * 
+ * '''
+ */
+  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VarReader5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__set_stream); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_5, "__doc__");
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_kp_u_25), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VarReader5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__read_tag); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_5, "__doc__");
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_kp_u_26), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VarReader5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__read_numeric); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_5, "__doc__");
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_kp_u_27), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VarReader5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__read_full_tag); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_5, "__doc__");
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_kp_u_28), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VarReader5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__read_header); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_5, "__doc__");
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_kp_u_29), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VarReader5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__array_from_header); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_5, "__doc__");
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_kp_u_30), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VarReader5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__read_real_complex); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_5, "__doc__");
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_kp_u_31), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VarReader5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__read_char); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_5, "__doc__");
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_kp_u_32), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VarReader5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__read_cells); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_5, "__doc__");
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_kp_u_33), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VarReader5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__read_fieldnames); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_5, "__doc__");
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_kp_u_34), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VarReader5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__read_struct); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_5, "__doc__");
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_kp_u_35), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VarReader5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__read_opaque); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_5, "__doc__");
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_kp_u_36), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/python_type.pxd":2
+ * 
  * cdef extern from "Python.h":             # <<<<<<<<<<<<<<
+ *     # The C structure of the objects used to describe built-in types.
  * 
- *     #####################################################################
  */
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_1);
-  __Pyx_XDECREF(__pyx_2);
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_5);
   if (__pyx_m) {
     __Pyx_AddTraceback("init scipy.io.matlab.mio5_utils");
     Py_DECREF(__pyx_m); __pyx_m = 0;
@@ -9637,7 +10310,7 @@
     PyErr_SetString(PyExc_ImportError, "init scipy.io.matlab.mio5_utils");
   }
   __pyx_L0:;
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   #if PY_MAJOR_VERSION < 3
   return;
   #else
@@ -9779,20 +10452,57 @@
     return -1;
 }
 
-static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
-    if (!type) {
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
+    PyErr_Format(PyExc_ValueError,
+        #if PY_VERSION_HEX < 0x02050000
+                 "need more than %d value%s to unpack", (int)index,
+        #else
+                 "need more than %zd value%s to unpack", index,
+        #endif
+                 (index == 1) ? "" : "s");
+}
+
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void) {
+    PyErr_SetString(PyExc_ValueError, "too many values to unpack");
+}
+
+static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
+    PyObject *item;
+    if (!(item = PyIter_Next(iter))) {
+        if (!PyErr_Occurred()) {
+            __Pyx_RaiseNeedMoreValuesError(index);
+        }
+    }
+    return item;
+}
+
+static int __Pyx_EndUnpack(PyObject *iter) {
+    PyObject *item;
+    if ((item = PyIter_Next(iter))) {
+        Py_DECREF(item);
+        __Pyx_RaiseTooManyValuesError();
+        return -1;
+    }
+    else if (!PyErr_Occurred())
+        return 0;
+    else
+        return -1;
+}
+
+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
+    if (unlikely(!type)) {
         PyErr_Format(PyExc_SystemError, "Missing type object");
         return 0;
     }
-    if (obj == Py_None || PyObject_TypeCheck(obj, type))
+    if (likely(PyObject_TypeCheck(obj, type)))
         return 1;
-    PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s",
-        Py_TYPE(obj)->tp_name, type->tp_name);
+    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
+                 Py_TYPE(obj)->tp_name, type->tp_name);
     return 0;
 }
 
 
-static INLINE int __Pyx_IsLittleEndian(void) {
+static CYTHON_INLINE int __Pyx_IsLittleEndian(void) {
   unsigned int n = 1;
   return *(unsigned char*)(&n) != 0;
 }
@@ -10189,7 +10899,7 @@
   }
 }
 
-static INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) {
+static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) {
   buf->buf = NULL;
   buf->obj = NULL;
   buf->strides = __Pyx_zeros;
@@ -10230,7 +10940,7 @@
   return -1;
 }
 
-static INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
+static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
   if (info->buf == NULL) return;
   if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;
   __Pyx_ReleaseBuffer(info);
@@ -10247,27 +10957,10 @@
 }
 
 
-static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
     PyObject *tmp_type, *tmp_value, *tmp_tb;
     PyThreadState *tstate = PyThreadState_GET();
 
-#if PY_MAJOR_VERSION >= 3
-    /* Note: this is a temporary work-around to prevent crashes in Python 3.0 */
-    if ((tstate->exc_type != NULL) & (tstate->exc_type != Py_None)) {
-        tmp_type = tstate->exc_type;
-        tmp_value = tstate->exc_value;
-        tmp_tb = tstate->exc_traceback;
-        PyErr_NormalizeException(&type, &value, &tb);
-        PyErr_NormalizeException(&tmp_type, &tmp_value, &tmp_tb);
-        tstate->exc_type = 0;
-        tstate->exc_value = 0;
-        tstate->exc_traceback = 0;
-        PyException_SetContext(value, tmp_value);
-        Py_DECREF(tmp_type);
-        Py_XDECREF(tmp_tb);
-    }
-#endif
-
     tmp_type = tstate->curexc_type;
     tmp_value = tstate->curexc_value;
     tmp_tb = tstate->curexc_traceback;
@@ -10279,7 +10972,7 @@
     Py_XDECREF(tmp_tb);
 }
 
-static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
     PyThreadState *tstate = PyThreadState_GET();
     *type = tstate->curexc_type;
     *value = tstate->curexc_value;
@@ -10291,24 +10984,17 @@
 }
 
 
-static INLINE void __Pyx_RaiseNoneNotIterableError(void) {
-    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
+    Py_ssize_t q = a / b;
+    Py_ssize_t r = a - q*b;
+    q -= ((r != 0) & ((r ^ b) < 0));
+    return q;
 }
 
-static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
-    PyErr_Format(PyExc_ValueError,
-        #if PY_VERSION_HEX < 0x02050000
-                 "need more than %d value%s to unpack", (int)index,
-        #else
-                 "need more than %zd value%s to unpack", index,
-        #endif
-                 (index == 1) ? "" : "s");
+static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
+    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
 }
 
-static INLINE void __Pyx_RaiseTooManyValuesError(void) {
-    PyErr_SetString(PyExc_ValueError, "too many values to unpack");
-}
-
 static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
     if (t == Py_None) {
       __Pyx_RaiseNoneNotIterableError();
@@ -10404,42 +11090,25 @@
     return result;
 }
 
-static INLINE PyObject *__Pyx_PyInt_to_py_npy_uint32(npy_uint32 val) {
-  /**/ if (sizeof(npy_uint32) <  sizeof(long))
-      return PyInt_FromLong((long)val);
-  else if (sizeof(npy_uint32) == sizeof(long))
-     return (((npy_uint32)-1) < ((npy_uint32)0)) ? 
-            PyInt_FromLong((long)val) :
-            PyLong_FromUnsignedLong((unsigned long)val);
-  else /* (sizeof(npy_uint32) >  sizeof(long)) */
-     return (((npy_uint32)-1) < ((npy_uint32)0)) ?
-            PyLong_FromLongLong((PY_LONG_LONG)val) :
-            PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
-}
-
-static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
-    PyObject *item;
-    if (!(item = PyIter_Next(iter))) {
-        if (!PyErr_Occurred()) {
-            __Pyx_RaiseNeedMoreValuesError(index);
-        }
+static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_uint32(npy_uint32 val) {
+    const npy_uint32 neg_one = (npy_uint32)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (sizeof(npy_uint32) <  sizeof(long)) {
+        return PyInt_FromLong((long)val);
+    } else if (sizeof(npy_uint32) == sizeof(long)) {
+        if (is_unsigned)
+            return PyLong_FromUnsignedLong((unsigned long)val);
+        else
+            return PyInt_FromLong((long)val);
+    } else { /* (sizeof(npy_uint32) > sizeof(long)) */
+        if (is_unsigned)
+            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
+        else
+            return PyLong_FromLongLong((PY_LONG_LONG)val);
     }
-    return item;
 }
 
-static int __Pyx_EndUnpack(PyObject *iter) {
-    PyObject *item;
-    if ((item = PyIter_Next(iter))) {
-        Py_DECREF(item);
-        __Pyx_RaiseTooManyValuesError();
-        return -1;
-    }
-    else if (!PyErr_Occurred())
-        return 0;
-    else
-        return -1;
-}
-
+#if PY_MAJOR_VERSION < 3
 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
     Py_XINCREF(type);
     Py_XINCREF(value);
@@ -10495,6 +11164,7 @@
             }
         #endif
     }
+
     __Pyx_ErrRestore(type, value, tb);
     return;
 raise_error:
@@ -10504,26 +11174,227 @@
     return;
 }
 
-static INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32 val) {
-  /**/ if (sizeof(npy_int32) <  sizeof(long))
-      return PyInt_FromLong((long)val);
-  else if (sizeof(npy_int32) == sizeof(long))
-     return (((npy_int32)-1) < ((npy_int32)0)) ? 
-            PyInt_FromLong((long)val) :
-            PyLong_FromUnsignedLong((unsigned long)val);
-  else /* (sizeof(npy_int32) >  sizeof(long)) */
-     return (((npy_int32)-1) < ((npy_int32)0)) ?
-            PyLong_FromLongLong((PY_LONG_LONG)val) :
-            PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
+#else /* Python 3+ */
+
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
+    if (tb == Py_None) {
+        tb = 0;
+    } else if (tb && !PyTraceBack_Check(tb)) {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: arg 3 must be a traceback or None");
+        goto bad;
+    }
+    if (value == Py_None)
+        value = 0;
+
+    if (PyExceptionInstance_Check(type)) {
+        if (value) {
+            PyErr_SetString(PyExc_TypeError,
+                "instance exception may not have a separate value");
+            goto bad;
+        }
+        value = type;
+        type = (PyObject*) Py_TYPE(value);
+    } else if (!PyExceptionClass_Check(type)) {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: exception class must be a subclass of BaseException");
+        goto bad;
+    }
+
+    PyErr_SetObject(type, value);
+
+    if (tb) {
+        PyThreadState *tstate = PyThreadState_GET();
+        PyObject* tmp_tb = tstate->curexc_traceback;
+        if (tb != tmp_tb) {
+            Py_INCREF(tb);
+            tstate->curexc_traceback = tb;
+            Py_XDECREF(tmp_tb);
+        }
+    }
+
+bad:
+    return;
 }
+#endif
 
-static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
+static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32 val) {
+    const npy_int32 neg_one = (npy_int32)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (sizeof(npy_int32) <  sizeof(long)) {
+        return PyInt_FromLong((long)val);
+    } else if (sizeof(npy_int32) == sizeof(long)) {
+        if (is_unsigned)
+            return PyLong_FromUnsignedLong((unsigned long)val);
+        else
+            return PyInt_FromLong((long)val);
+    } else { /* (sizeof(npy_int32) > sizeof(long)) */
+        if (is_unsigned)
+            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
+        else
+            return PyLong_FromLongLong((PY_LONG_LONG)val);
+    }
+}
+
+#if CYTHON_CCOMPLEX
+  #ifdef __cplusplus
+    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
+      return ::std::complex< double >(x, y);
+    }
+  #else
+    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
+      return x + y*(__pyx_t_double_complex)_Complex_I;
+    }
+  #endif
+#else
+    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
+      __pyx_t_double_complex z;
+      z.real = x;
+      z.imag = y;
+      return z;
+    }
+#endif
+
+#if CYTHON_CCOMPLEX
+#else
+    static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+       return (a.real == b.real) && (a.imag == b.imag);
+    }
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+        __pyx_t_double_complex z;
+        z.real = a.real + b.real;
+        z.imag = a.imag + b.imag;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+        __pyx_t_double_complex z;
+        z.real = a.real - b.real;
+        z.imag = a.imag - b.imag;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+        __pyx_t_double_complex z;
+        z.real = a.real * b.real - a.imag * b.imag;
+        z.imag = a.real * b.imag + a.imag * b.real;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+        __pyx_t_double_complex z;
+        double denom = b.real * b.real + b.imag * b.imag;
+        z.real = (a.real * b.real + a.imag * b.imag) / denom;
+        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) {
+        __pyx_t_double_complex z;
+        z.real = -a.real;
+        z.imag = -a.imag;
+        return z;
+    }
+    static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) {
+       return (a.real == 0) && (a.imag == 0);
+    }
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) {
+        __pyx_t_double_complex z;
+        z.real =  a.real;
+        z.imag = -a.imag;
+        return z;
+    }
+/*
+    static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) {
+#if HAVE_HYPOT
+        return hypot(z.real, z.imag);
+#else
+        return sqrt(z.real*z.real + z.imag*z.imag);
+#endif
+    }
+*/
+#endif
+
+#if CYTHON_CCOMPLEX
+  #ifdef __cplusplus
+    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
+      return ::std::complex< float >(x, y);
+    }
+  #else
+    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
+      return x + y*(__pyx_t_float_complex)_Complex_I;
+    }
+  #endif
+#else
+    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
+      __pyx_t_float_complex z;
+      z.real = x;
+      z.imag = y;
+      return z;
+    }
+#endif
+
+#if CYTHON_CCOMPLEX
+#else
+    static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+       return (a.real == b.real) && (a.imag == b.imag);
+    }
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+        __pyx_t_float_complex z;
+        z.real = a.real + b.real;
+        z.imag = a.imag + b.imag;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+        __pyx_t_float_complex z;
+        z.real = a.real - b.real;
+        z.imag = a.imag - b.imag;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+        __pyx_t_float_complex z;
+        z.real = a.real * b.real - a.imag * b.imag;
+        z.imag = a.real * b.imag + a.imag * b.real;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+        __pyx_t_float_complex z;
+        float denom = b.real * b.real + b.imag * b.imag;
+        z.real = (a.real * b.real + a.imag * b.imag) / denom;
+        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) {
+        __pyx_t_float_complex z;
+        z.real = -a.real;
+        z.imag = -a.imag;
+        return z;
+    }
+    static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) {
+       return (a.real == 0) && (a.imag == 0);
+    }
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) {
+        __pyx_t_float_complex z;
+        z.real =  a.real;
+        z.imag = -a.imag;
+        return z;
+    }
+/*
+    static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) {
+#if HAVE_HYPOT
+        return hypotf(z.real, z.imag);
+#else
+        return sqrtf(z.real*z.real + z.imag*z.imag);
+#endif
+    }
+*/
+#endif
+
+static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
+    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
     if (sizeof(unsigned char) < sizeof(long)) {
         long val = __Pyx_PyInt_AsLong(x);
         if (unlikely(val != (long)(unsigned char)val)) {
             if (!unlikely(val == -1 && PyErr_Occurred())) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (((unsigned char)-1) > ((unsigned char)0) && unlikely(val < 0)) ?
+                    (is_unsigned && unlikely(val < 0)) ?
                     "can't convert negative value to unsigned char" :
                     "value too large to convert to unsigned char");
             }
@@ -10534,13 +11405,15 @@
     return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
 }
 
-static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
+static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
+    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
     if (sizeof(unsigned short) < sizeof(long)) {
         long val = __Pyx_PyInt_AsLong(x);
         if (unlikely(val != (long)(unsigned short)val)) {
             if (!unlikely(val == -1 && PyErr_Occurred())) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (((unsigned short)-1) > ((unsigned short)0) && unlikely(val < 0)) ?
+                    (is_unsigned && unlikely(val < 0)) ?
                     "can't convert negative value to unsigned short" :
                     "value too large to convert to unsigned short");
             }
@@ -10551,13 +11424,15 @@
     return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
 }
 
-static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
+static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
+    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
     if (sizeof(unsigned int) < sizeof(long)) {
         long val = __Pyx_PyInt_AsLong(x);
         if (unlikely(val != (long)(unsigned int)val)) {
             if (!unlikely(val == -1 && PyErr_Occurred())) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (((unsigned int)-1) > ((unsigned int)0) && unlikely(val < 0)) ?
+                    (is_unsigned && unlikely(val < 0)) ?
                     "can't convert negative value to unsigned int" :
                     "value too large to convert to unsigned int");
             }
@@ -10568,13 +11443,15 @@
     return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
 }
 
-static INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
+static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
+    const char neg_one = (char)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
     if (sizeof(char) < sizeof(long)) {
         long val = __Pyx_PyInt_AsLong(x);
         if (unlikely(val != (long)(char)val)) {
             if (!unlikely(val == -1 && PyErr_Occurred())) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (((char)-1) > ((char)0) && unlikely(val < 0)) ?
+                    (is_unsigned && unlikely(val < 0)) ?
                     "can't convert negative value to char" :
                     "value too large to convert to char");
             }
@@ -10585,13 +11462,15 @@
     return (char)__Pyx_PyInt_AsLong(x);
 }
 
-static INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
+static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
+    const short neg_one = (short)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
     if (sizeof(short) < sizeof(long)) {
         long val = __Pyx_PyInt_AsLong(x);
         if (unlikely(val != (long)(short)val)) {
             if (!unlikely(val == -1 && PyErr_Occurred())) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (((short)-1) > ((short)0) && unlikely(val < 0)) ?
+                    (is_unsigned && unlikely(val < 0)) ?
                     "can't convert negative value to short" :
                     "value too large to convert to short");
             }
@@ -10602,13 +11481,15 @@
     return (short)__Pyx_PyInt_AsLong(x);
 }
 
-static INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
+static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
+    const int neg_one = (int)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
     if (sizeof(int) < sizeof(long)) {
         long val = __Pyx_PyInt_AsLong(x);
         if (unlikely(val != (long)(int)val)) {
             if (!unlikely(val == -1 && PyErr_Occurred())) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (((int)-1) > ((int)0) && unlikely(val < 0)) ?
+                    (is_unsigned && unlikely(val < 0)) ?
                     "can't convert negative value to int" :
                     "value too large to convert to int");
             }
@@ -10619,13 +11500,15 @@
     return (int)__Pyx_PyInt_AsLong(x);
 }
 
-static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
+static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
+    const signed char neg_one = (signed char)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
     if (sizeof(signed char) < sizeof(long)) {
         long val = __Pyx_PyInt_AsLong(x);
         if (unlikely(val != (long)(signed char)val)) {
             if (!unlikely(val == -1 && PyErr_Occurred())) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (((signed char)-1) > ((signed char)0) && unlikely(val < 0)) ?
+                    (is_unsigned && unlikely(val < 0)) ?
                     "can't convert negative value to signed char" :
                     "value too large to convert to signed char");
             }
@@ -10636,13 +11519,15 @@
     return (signed char)__Pyx_PyInt_AsSignedLong(x);
 }
 
-static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
+static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
+    const signed short neg_one = (signed short)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
     if (sizeof(signed short) < sizeof(long)) {
         long val = __Pyx_PyInt_AsLong(x);
         if (unlikely(val != (long)(signed short)val)) {
             if (!unlikely(val == -1 && PyErr_Occurred())) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (((signed short)-1) > ((signed short)0) && unlikely(val < 0)) ?
+                    (is_unsigned && unlikely(val < 0)) ?
                     "can't convert negative value to signed short" :
                     "value too large to convert to signed short");
             }
@@ -10653,13 +11538,15 @@
     return (signed short)__Pyx_PyInt_AsSignedLong(x);
 }
 
-static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
+static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
+    const signed int neg_one = (signed int)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
     if (sizeof(signed int) < sizeof(long)) {
         long val = __Pyx_PyInt_AsLong(x);
         if (unlikely(val != (long)(signed int)val)) {
             if (!unlikely(val == -1 && PyErr_Occurred())) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (((signed int)-1) > ((signed int)0) && unlikely(val < 0)) ?
+                    (is_unsigned && unlikely(val < 0)) ?
                     "can't convert negative value to signed int" :
                     "value too large to convert to signed int");
             }
@@ -10670,11 +11557,13 @@
     return (signed int)__Pyx_PyInt_AsSignedLong(x);
 }
 
-static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
+static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
+    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
 #if PY_VERSION_HEX < 0x03000000
     if (likely(PyInt_Check(x))) {
         long val = PyInt_AS_LONG(x);
-        if (((unsigned long)-1) > ((unsigned long)0) && unlikely(val < 0)) {
+        if (is_unsigned && unlikely(val < 0)) {
             PyErr_SetString(PyExc_OverflowError,
                             "can't convert negative value to unsigned long");
             return (unsigned long)-1;
@@ -10683,14 +11572,16 @@
     } else
 #endif
     if (likely(PyLong_Check(x))) {
-        if (((unsigned long)-1) > ((unsigned long)0) && unlikely(Py_SIZE(x) < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to unsigned long");
-            return (unsigned long)-1;
+        if (is_unsigned) {
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to unsigned long");
+                return (unsigned long)-1;
+            }
+            return PyLong_AsUnsignedLong(x);
+        } else {
+            return PyLong_AsLong(x);
         }
-        return (((unsigned long)-1) < ((unsigned long)0)) ?
-               PyLong_AsLong(x) :
-               PyLong_AsUnsignedLong(x);
     } else {
         unsigned long val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
@@ -10701,11 +11592,13 @@
     }
 }
 
-static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
+static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
+    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
 #if PY_VERSION_HEX < 0x03000000
     if (likely(PyInt_Check(x))) {
         long val = PyInt_AS_LONG(x);
-        if (((unsigned PY_LONG_LONG)-1) > ((unsigned PY_LONG_LONG)0) && unlikely(val < 0)) {
+        if (is_unsigned && unlikely(val < 0)) {
             PyErr_SetString(PyExc_OverflowError,
                             "can't convert negative value to unsigned PY_LONG_LONG");
             return (unsigned PY_LONG_LONG)-1;
@@ -10714,14 +11607,16 @@
     } else
 #endif
     if (likely(PyLong_Check(x))) {
-        if (((unsigned PY_LONG_LONG)-1) > ((unsigned PY_LONG_LONG)0) && unlikely(Py_SIZE(x) < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to unsigned PY_LONG_LONG");
-            return (unsigned PY_LONG_LONG)-1;
+        if (is_unsigned) {
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to unsigned PY_LONG_LONG");
+                return (unsigned PY_LONG_LONG)-1;
+            }
+            return PyLong_AsUnsignedLongLong(x);
+        } else {
+            return PyLong_AsLongLong(x);
         }
-        return (((unsigned PY_LONG_LONG)-1) < ((unsigned PY_LONG_LONG)0)) ?
-               PyLong_AsLongLong(x) :
-               PyLong_AsUnsignedLongLong(x);
     } else {
         unsigned PY_LONG_LONG val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
@@ -10732,11 +11627,13 @@
     }
 }
 
-static INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
+static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
+    const long neg_one = (long)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
 #if PY_VERSION_HEX < 0x03000000
     if (likely(PyInt_Check(x))) {
         long val = PyInt_AS_LONG(x);
-        if (((long)-1) > ((long)0) && unlikely(val < 0)) {
+        if (is_unsigned && unlikely(val < 0)) {
             PyErr_SetString(PyExc_OverflowError,
                             "can't convert negative value to long");
             return (long)-1;
@@ -10745,14 +11642,16 @@
     } else
 #endif
     if (likely(PyLong_Check(x))) {
-        if (((long)-1) > ((long)0) && unlikely(Py_SIZE(x) < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to long");
-            return (long)-1;
+        if (is_unsigned) {
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to long");
+                return (long)-1;
+            }
+            return PyLong_AsUnsignedLong(x);
+        } else {
+            return PyLong_AsLong(x);
         }
-        return (((long)-1) < ((long)0)) ?
-               PyLong_AsLong(x) :
-               PyLong_AsUnsignedLong(x);
     } else {
         long val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
@@ -10763,11 +11662,13 @@
     }
 }
 
-static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
+static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
+    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
 #if PY_VERSION_HEX < 0x03000000
     if (likely(PyInt_Check(x))) {
         long val = PyInt_AS_LONG(x);
-        if (((PY_LONG_LONG)-1) > ((PY_LONG_LONG)0) && unlikely(val < 0)) {
+        if (is_unsigned && unlikely(val < 0)) {
             PyErr_SetString(PyExc_OverflowError,
                             "can't convert negative value to PY_LONG_LONG");
             return (PY_LONG_LONG)-1;
@@ -10776,14 +11677,16 @@
     } else
 #endif
     if (likely(PyLong_Check(x))) {
-        if (((PY_LONG_LONG)-1) > ((PY_LONG_LONG)0) && unlikely(Py_SIZE(x) < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to PY_LONG_LONG");
-            return (PY_LONG_LONG)-1;
+        if (is_unsigned) {
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to PY_LONG_LONG");
+                return (PY_LONG_LONG)-1;
+            }
+            return PyLong_AsUnsignedLongLong(x);
+        } else {
+            return PyLong_AsLongLong(x);
         }
-        return (((PY_LONG_LONG)-1) < ((PY_LONG_LONG)0)) ?
-               PyLong_AsLongLong(x) :
-               PyLong_AsUnsignedLongLong(x);
     } else {
         PY_LONG_LONG val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
@@ -10794,11 +11697,13 @@
     }
 }
 
-static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
+static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
+    const signed long neg_one = (signed long)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
 #if PY_VERSION_HEX < 0x03000000
     if (likely(PyInt_Check(x))) {
         long val = PyInt_AS_LONG(x);
-        if (((signed long)-1) > ((signed long)0) && unlikely(val < 0)) {
+        if (is_unsigned && unlikely(val < 0)) {
             PyErr_SetString(PyExc_OverflowError,
                             "can't convert negative value to signed long");
             return (signed long)-1;
@@ -10807,14 +11712,16 @@
     } else
 #endif
     if (likely(PyLong_Check(x))) {
-        if (((signed long)-1) > ((signed long)0) && unlikely(Py_SIZE(x) < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to signed long");
-            return (signed long)-1;
+        if (is_unsigned) {
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to signed long");
+                return (signed long)-1;
+            }
+            return PyLong_AsUnsignedLong(x);
+        } else {
+            return PyLong_AsLong(x);
         }
-        return (((signed long)-1) < ((signed long)0)) ?
-               PyLong_AsLong(x) :
-               PyLong_AsUnsignedLong(x);
     } else {
         signed long val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
@@ -10825,11 +11732,13 @@
     }
 }
 
-static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
+static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
+    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
 #if PY_VERSION_HEX < 0x03000000
     if (likely(PyInt_Check(x))) {
         long val = PyInt_AS_LONG(x);
-        if (((signed PY_LONG_LONG)-1) > ((signed PY_LONG_LONG)0) && unlikely(val < 0)) {
+        if (is_unsigned && unlikely(val < 0)) {
             PyErr_SetString(PyExc_OverflowError,
                             "can't convert negative value to signed PY_LONG_LONG");
             return (signed PY_LONG_LONG)-1;
@@ -10838,14 +11747,16 @@
     } else
 #endif
     if (likely(PyLong_Check(x))) {
-        if (((signed PY_LONG_LONG)-1) > ((signed PY_LONG_LONG)0) && unlikely(Py_SIZE(x) < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to signed PY_LONG_LONG");
-            return (signed PY_LONG_LONG)-1;
+        if (is_unsigned) {
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to signed PY_LONG_LONG");
+                return (signed PY_LONG_LONG)-1;
+            }
+            return PyLong_AsUnsignedLongLong(x);
+        } else {
+            return PyLong_AsLongLong(x);
         }
-        return (((signed PY_LONG_LONG)-1) < ((signed PY_LONG_LONG)0)) ?
-               PyLong_AsLongLong(x) :
-               PyLong_AsUnsignedLongLong(x);
     } else {
         signed PY_LONG_LONG val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
@@ -10856,36 +11767,45 @@
     }
 }
 
-static INLINE npy_uint32 __Pyx_PyInt_from_py_npy_uint32(PyObject* x) {
-  /**/ if (sizeof(npy_uint32) == sizeof(char))
-     return (((npy_uint32)-1) < ((npy_uint32)0)) ?
-            (npy_uint32)__Pyx_PyInt_AsSignedChar(x) :
-            (npy_uint32)__Pyx_PyInt_AsUnsignedChar(x);
-  else if (sizeof(npy_uint32) == sizeof(short))
-     return (((npy_uint32)-1) < ((npy_uint32)0)) ?
-            (npy_uint32)__Pyx_PyInt_AsSignedShort(x) :
-            (npy_uint32)__Pyx_PyInt_AsUnsignedShort(x);
-  else if (sizeof(npy_uint32) == sizeof(int))
-     return (((npy_uint32)-1) < ((npy_uint32)0)) ?
-            (npy_uint32)__Pyx_PyInt_AsSignedInt(x) :
-            (npy_uint32)__Pyx_PyInt_AsUnsignedInt(x);
-  else if (sizeof(npy_uint32) == sizeof(long))
-     return (((npy_uint32)-1) < ((npy_uint32)0)) ?
-            (npy_uint32)__Pyx_PyInt_AsSignedLong(x) :
-            (npy_uint32)__Pyx_PyInt_AsUnsignedLong(x);
-  else if (sizeof(npy_uint32) == sizeof(PY_LONG_LONG))
-     return (((npy_uint32)-1) < ((npy_uint32)0)) ?
-            (npy_uint32)__Pyx_PyInt_AsSignedLongLong(x) :
-            (npy_uint32)__Pyx_PyInt_AsUnsignedLongLong(x);
+static CYTHON_INLINE npy_uint32 __Pyx_PyInt_from_py_npy_uint32(PyObject* x) {
+    const npy_uint32 neg_one = (npy_uint32)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (sizeof(npy_uint32) == sizeof(char)) {
+        if (is_unsigned)
+            return (npy_uint32)__Pyx_PyInt_AsUnsignedChar(x);
+        else
+            return (npy_uint32)__Pyx_PyInt_AsSignedChar(x);
+    } else if (sizeof(npy_uint32) == sizeof(short)) {
+        if (is_unsigned)
+            return (npy_uint32)__Pyx_PyInt_AsUnsignedShort(x);
+        else
+            return (npy_uint32)__Pyx_PyInt_AsSignedShort(x);
+    } else if (sizeof(npy_uint32) == sizeof(int)) {
+        if (is_unsigned)
+            return (npy_uint32)__Pyx_PyInt_AsUnsignedInt(x);
+        else
+            return (npy_uint32)__Pyx_PyInt_AsSignedInt(x);
+    } else if (sizeof(npy_uint32) == sizeof(long)) {
+        if (is_unsigned)
+            return (npy_uint32)__Pyx_PyInt_AsUnsignedLong(x);
+        else
+            return (npy_uint32)__Pyx_PyInt_AsSignedLong(x);
+    } else if (sizeof(npy_uint32) == sizeof(PY_LONG_LONG)) {
+        if (is_unsigned)
+            return (npy_uint32)__Pyx_PyInt_AsUnsignedLongLong(x);
+        else
+            return (npy_uint32)__Pyx_PyInt_AsSignedLongLong(x);
 #if 0
-  else if (sizeof(npy_uint32) > sizeof(short) &&
-           sizeof(npy_uint32) < sizeof(int)) /*  __int32 ILP64 ? */
-     return (((npy_uint32)-1) < ((npy_uint32)0)) ?
-            (npy_uint32)__Pyx_PyInt_AsSignedInt(x) :
-            (npy_uint32)__Pyx_PyInt_AsUnsignedInt(x);
+    } else if (sizeof(npy_uint32) > sizeof(short) &&
+               sizeof(npy_uint32) < sizeof(int)) { /*  __int32 ILP64 ? */
+        if (is_unsigned)
+            return (npy_uint32)__Pyx_PyInt_AsUnsignedInt(x);
+        else
+            return (npy_uint32)__Pyx_PyInt_AsSignedInt(x);
 #endif
-  PyErr_SetString(PyExc_TypeError, "npy_uint32");
-  return (npy_uint32)-1;
+    }
+    PyErr_SetString(PyExc_TypeError, "npy_uint32");
+    return (npy_uint32)-1;
 }
 
 static void __Pyx_WriteUnraisable(const char *name) {
@@ -10907,32 +11827,31 @@
 }
 
 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
-    PyObject *pycobj = 0;
-    int result;
-    
-    pycobj = PyCObject_FromVoidPtr(vtable, 0);
-    if (!pycobj)
+#if PY_VERSION_HEX < 0x03010000
+    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
+#else
+    PyObject *ob = PyCapsule_New(vtable, 0, 0);
+#endif
+    if (!ob)
         goto bad;
-    if (PyDict_SetItemString(dict, "__pyx_vtable__", pycobj) < 0)
+    if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0)
         goto bad;
-    result = 0;
-    goto done;
-
+    Py_DECREF(ob);
+    return 0;
 bad:
-    result = -1;
-done:
-    Py_XDECREF(pycobj);
-    return result;
+    Py_XDECREF(ob);
+    return -1;
 }
 
 #ifndef __PYX_HAVE_RT_ImportType
 #define __PYX_HAVE_RT_ImportType
 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
-    long size)
+    long size, int strict)
 {
     PyObject *py_module = 0;
     PyObject *result = 0;
     PyObject *py_name = 0;
+    char warning[200];
 
     py_module = __Pyx_ImportModule(module_name);
     if (!py_module)
@@ -10957,9 +11876,15 @@
             module_name, class_name);
         goto bad;
     }
-    if (((PyTypeObject *)result)->tp_basicsize != size) {
+    if (!strict && ((PyTypeObject *)result)->tp_basicsize > size) {
+        PyOS_snprintf(warning, sizeof(warning), 
+            "%s.%s size changed, may indicate binary incompatibility",
+            module_name, class_name);
+        PyErr_WarnEx(NULL, warning, 0);
+    }
+    else if (((PyTypeObject *)result)->tp_basicsize != size) {
         PyErr_Format(PyExc_ValueError, 
-            "%s.%s does not appear to be the correct type object",
+            "%s.%s has the wrong size, try recompiling",
             module_name, class_name);
         goto bad;
     }
@@ -10994,43 +11919,37 @@
 #endif
 
 static int __Pyx_GetVtable(PyObject *dict, void *vtabptr) {
-    int result;
-    PyObject *pycobj;
-
-    pycobj = PyMapping_GetItemString(dict, (char *)"__pyx_vtable__");
-    if (!pycobj)
+    PyObject *ob = PyMapping_GetItemString(dict, (char *)"__pyx_vtable__");
+    if (!ob)
         goto bad;
-    *(void **)vtabptr = PyCObject_AsVoidPtr(pycobj);
+#if PY_VERSION_HEX < 0x03010000
+    *(void **)vtabptr = PyCObject_AsVoidPtr(ob);
+#else
+    *(void **)vtabptr = PyCapsule_GetPointer(ob, 0);
+#endif
     if (!*(void **)vtabptr)
         goto bad;
-    result = 0;
-    goto done;
-
+    Py_DECREF(ob);
+    return 0;
 bad:
-    result = -1;
-done:
-    Py_XDECREF(pycobj);
-    return result;
+    Py_XDECREF(ob);
+    return -1;
 }
 
 #ifndef __PYX_HAVE_RT_ImportFunction
 #define __PYX_HAVE_RT_ImportFunction
 static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
-#if PY_VERSION_HEX < 0x02050000
-    char *api = (char *)"__pyx_capi__";
-#else
-    const char *api = "__pyx_capi__";
-#endif
     PyObject *d = 0;
     PyObject *cobj = 0;
-    const char *desc;
-    const char *s1, *s2;
     union {
         void (*fp)(void);
         void *p;
     } tmp;
+#if PY_VERSION_HEX < 0x03010000
+    const char *desc, *s1, *s2;
+#endif
 
-    d = PyObject_GetAttrString(module, api);
+    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
     if (!d)
         goto bad;
     cobj = PyDict_GetItemString(d, funcname);
@@ -11040,6 +11959,7 @@
                 PyModule_GetName(module), funcname);
         goto bad;
     }
+#if PY_VERSION_HEX < 0x03010000
     desc = (const char *)PyCObject_GetDesc(cobj);
     if (!desc)
         goto bad;
@@ -11052,7 +11972,18 @@
         goto bad;
     }
     tmp.p = PyCObject_AsVoidPtr(cobj);
+#else
+    if (!PyCapsule_IsValid(cobj, sig)) {
+        PyErr_Format(PyExc_TypeError,
+            "C function %s.%s has wrong signature (expected %s, got %s)",
+             PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
+        goto bad;
+    }
+    tmp.p = PyCapsule_GetPointer(cobj, sig);
+#endif
     *f = tmp.fp;
+    if (!(*f))
+        goto bad;
     Py_DECREF(d);
     return 0;
 bad:
@@ -11134,7 +12065,7 @@
 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
     while (t->p) {
         #if PY_MAJOR_VERSION < 3
-        if (t->is_unicode && (!t->is_identifier)) {
+        if (t->is_unicode) {
             *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
         } else if (t->intern) {
             *t->p = PyString_InternFromString(t->s);
@@ -11142,10 +12073,14 @@
             *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
         }
         #else  /* Python 3+ has unicode identifiers */
-        if (t->is_identifier || (t->is_unicode && t->intern)) {
-            *t->p = PyUnicode_InternFromString(t->s);
-        } else if (t->is_unicode) {
-            *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
+        if (t->is_unicode | t->is_str) {
+            if (t->intern) {
+                *t->p = PyUnicode_InternFromString(t->s);
+            } else if (t->encoding) {
+                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
+            } else {
+                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
+            }
         } else {
             *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
         }
@@ -11159,13 +12094,13 @@
 
 /* Type Conversion Functions */
 
-static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
    if (x == Py_True) return 1;
    else if ((x == Py_False) | (x == Py_None)) return 0;
    else return PyObject_IsTrue(x);
 }
 
-static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
   PyNumberMethods *m;
   const char *name = NULL;
   PyObject *res = NULL;
@@ -11211,7 +12146,7 @@
   return res;
 }
 
-static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
   Py_ssize_t ival;
   PyObject* x = PyNumber_Index(b);
   if (!x) return -1;
@@ -11220,7 +12155,7 @@
   return ival;
 }
 
-static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
 #if PY_VERSION_HEX < 0x02050000
    if (ival <= LONG_MAX)
        return PyInt_FromLong((long)ival);
@@ -11234,7 +12169,7 @@
 #endif
 }
 
-static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
+static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
    unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
    if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
        return (size_t)-1;

Modified: trunk/scipy/io/matlab/mio5_utils.pyx
===================================================================
--- trunk/scipy/io/matlab/mio5_utils.pyx	2010-05-25 05:55:08 UTC (rev 6412)
+++ trunk/scipy/io/matlab/mio5_utils.pyx	2010-05-26 19:29:32 UTC (rev 6413)
@@ -56,7 +56,7 @@
 
 cimport streams
 import scipy.io.matlab.miobase as miob
-from scipy.io.matlab.mio_utils import process_element
+from scipy.io.matlab.mio_utils import squeeze_element, chars_to_strings
 import scipy.io.matlab.mio5_params as mio5p
 import scipy.sparse
 
@@ -139,7 +139,7 @@
     # cached here for convenience in later array creation
     cdef cnp.dtype U1_dtype
     cdef cnp.dtype bool_dtype
-    # process_element options
+    # element processing options
     cdef:
         int mat_dtype
         int squeeze_me
@@ -158,7 +158,7 @@
         self.uint16_codec = preader.uint16_codec
         # set c-optimized stream object from python file-like object
         self.set_stream(preader.mat_stream)
-        # options for process_element
+        # options for element processing
         self.mat_dtype = preader.mat_dtype
         self.chars_as_strings = preader.chars_as_strings
         self.squeeze_me = preader.squeeze_me
@@ -632,6 +632,8 @@
             return arr
         elif mc == mxCHAR_CLASS:
             arr = self.read_char(header)
+            if process and self.chars_as_strings:
+                arr = chars_to_strings(arr)
         elif mc == mxCELL_CLASS:
             arr = self.read_cells(header)
         elif mc == mxSTRUCT_CLASS:
@@ -643,17 +645,15 @@
         elif mc == mxFUNCTION_CLASS: # just a matrix of struct type
             arr = self.read_mi_matrix()
             arr = mio5p.MatlabFunction(arr)
-            # to make them more re-writeable - don't process
+            # to make them more re-writeable - don't squeeze
             return arr
         elif mc == mxOPAQUE_CLASS:
             arr = self.read_opaque(header)
             arr = mio5p.MatlabOpaque(arr)
-            # to make them more re-writeable - don't process
+            # to make them more re-writeable - don't squeeze
             return arr
-        if process:
-            return process_element(arr,
-                                   self.chars_as_strings,
-                                   self.squeeze_me)
+        if process and self.squeeze_me:
+            return squeeze_element(arr)
         return arr
 
     cpdef cnp.ndarray read_real_complex(self, VarHeader5 header):
@@ -707,7 +707,7 @@
         ''' Read char matrices from stream as arrays
 
         Matrices of char are likely to be converted to matrices of
-        string by later processing in ``process_element``
+        string by later processing in ``array_from_header``
         '''
         '''Notes to friendly fellow-optimizer
         
@@ -720,7 +720,7 @@
         how to deal with UCS-2 and UCS-4 builds of python, and how numpy
         deals with unicode strings passed as memory,
 
-        My own introduction here:
+        My own unicode introduction here:
         https://cirl.berkeley.edu/mb312/pydagogue/python_unicode.html
         '''
         cdef:

Modified: trunk/scipy/io/matlab/mio_utils.c
===================================================================
--- trunk/scipy/io/matlab/mio_utils.c	2010-05-25 05:55:08 UTC (rev 6412)
+++ trunk/scipy/io/matlab/mio_utils.c	2010-05-26 19:29:32 UTC (rev 6413)
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.11.3 on Sat Jan  9 17:30:46 2010 */
+/* Generated by Cython 0.12.1 on Wed May 26 12:20:27 2010 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
@@ -6,6 +6,7 @@
 #ifndef Py_PYTHON_H
     #error Python headers needed to compile C extensions, please install development version of Python.
 #else
+
 #ifndef PY_LONG_LONG
   #define PY_LONG_LONG LONG_LONG
 #endif
@@ -15,7 +16,9 @@
 #if PY_VERSION_HEX < 0x02040000
   #define METH_COEXIST 0
   #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
+  #define PyDict_Contains(d,o)   PySequence_Contains(d,o)
 #endif
+
 #if PY_VERSION_HEX < 0x02050000
   typedef int Py_ssize_t;
   #define PY_SSIZE_T_MAX INT_MAX
@@ -25,7 +28,9 @@
   #define PyInt_AsSsize_t(o)   PyInt_AsLong(o)
   #define PyNumber_Index(o)    PyNumber_Int(o)
   #define PyIndex_Check(o)     PyNumber_Check(o)
+  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
 #endif
+
 #if PY_VERSION_HEX < 0x02060000
   #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
   #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
@@ -35,17 +40,17 @@
   #define PyType_Modified(t)
 
   typedef struct {
-       void *buf;
-       PyObject *obj;
-       Py_ssize_t len;
-       Py_ssize_t itemsize;
-       int readonly;
-       int ndim;
-       char *format;
-       Py_ssize_t *shape;
-       Py_ssize_t *strides;
-       Py_ssize_t *suboffsets;
-       void *internal;
+     void *buf;
+     PyObject *obj;
+     Py_ssize_t len;
+     Py_ssize_t itemsize;
+     int readonly;
+     int ndim;
+     char *format;
+     Py_ssize_t *shape;
+     Py_ssize_t *strides;
+     Py_ssize_t *suboffsets;
+     void *internal;
   } Py_buffer;
 
   #define PyBUF_SIMPLE 0
@@ -59,22 +64,32 @@
   #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
 
 #endif
+
 #if PY_MAJOR_VERSION < 3
   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
 #else
   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
 #endif
+
 #if PY_MAJOR_VERSION >= 3
   #define Py_TPFLAGS_CHECKTYPES 0
   #define Py_TPFLAGS_HAVE_INDEX 0
 #endif
+
 #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
 #endif
+
 #if PY_MAJOR_VERSION >= 3
   #define PyBaseString_Type            PyUnicode_Type
-  #define PyString_Type                PyBytes_Type
-  #define PyString_CheckExact          PyBytes_CheckExact
+  #define PyString_Type                PyUnicode_Type
+  #define PyString_CheckExact          PyUnicode_CheckExact
+#else
+  #define PyBytes_Type                 PyString_Type
+  #define PyBytes_CheckExact           PyString_CheckExact
+#endif
+
+#if PY_MAJOR_VERSION >= 3
   #define PyInt_Type                   PyLong_Type
   #define PyInt_Check(op)              PyLong_Check(op)
   #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
@@ -89,13 +104,17 @@
   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
 #else
   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
-  #define PyBytes_Type                 PyString_Type
+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
+
 #endif
+
 #if PY_MAJOR_VERSION >= 3
   #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
 #endif
+
 #if !defined(WIN32) && !defined(MS_WINDOWS)
   #ifndef __stdcall
     #define __stdcall
@@ -109,6 +128,7 @@
 #else
   #define _USE_MATH_DEFINES
 #endif
+
 #if PY_VERSION_HEX < 0x02050000
   #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
   #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
@@ -118,6 +138,7 @@
   #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
   #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
 #endif
+
 #if PY_VERSION_HEX < 0x02050000
   #define __Pyx_NAMESTR(n) ((char *)(n))
   #define __Pyx_DOCSTR(n)  ((char *)(n))
@@ -135,24 +156,21 @@
 #include "stdlib.h"
 #include "stdio.h"
 #include "numpy/arrayobject.h"
-#define __PYX_USE_C99_COMPLEX defined(_Complex_I)
+#include "numpy/ufuncobject.h"
 
-
-#ifdef __GNUC__
-#define INLINE __inline__
-#elif _WIN32
-#define INLINE __inline
-#else
-#define INLINE 
+#ifndef CYTHON_INLINE
+  #if defined(__GNUC__)
+    #define CYTHON_INLINE __inline__
+  #elif defined(_MSC_VER)
+    #define CYTHON_INLINE __inline
+  #else
+    #define CYTHON_INLINE 
+  #endif
 #endif
 
-typedef struct {PyObject **p; char *s; long n; char is_unicode; char intern; char is_identifier;} __Pyx_StringTabEntry; /*proto*/
+typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
 
 
-
-static int __pyx_skip_dispatch = 0;
-
-
 /* Type Conversion Predeclarations */
 
 #if PY_MAJOR_VERSION < 3
@@ -169,8 +187,8 @@
 #define __Pyx_PyBytes_AsUString(s)        ((unsigned char*) __Pyx_PyBytes_AsString(s))
 
 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
-static INLINE int __Pyx_PyObject_IsTrue(PyObject*);
-static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
 
 #if !defined(T_PYSSIZET)
 #if PY_VERSION_HEX < 0x02050000
@@ -234,9 +252,9 @@
 #endif
 #endif
 
-static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
-static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
-static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
 
 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
 
@@ -265,41 +283,146 @@
 static const char *__pyx_filename;
 static const char **__pyx_f;
 
-static char __pyx_mdoc[] = " Utilities for generic processing of return arrays from read\n";
 
+#if !defined(CYTHON_CCOMPLEX)
+  #if defined(__cplusplus)
+    #define CYTHON_CCOMPLEX 1
+  #elif defined(_Complex_I)
+    #define CYTHON_CCOMPLEX 1
+  #else
+    #define CYTHON_CCOMPLEX 0
+  #endif
+#endif
 
-#ifdef CYTHON_REFNANNY
-typedef struct {
-  void (*INCREF)(void*, PyObject*, int);
-  void (*DECREF)(void*, PyObject*, int);
-  void (*GOTREF)(void*, PyObject*, int);
-  void (*GIVEREF)(void*, PyObject*, int);
-  void* (*NewContext)(const char*, int, const char*);
-  void (*FinishContext)(void**);
-} __Pyx_RefnannyAPIStruct;
-static __Pyx_RefnannyAPIStruct *__Pyx_Refnanny = NULL;
-#define __Pyx_ImportRefcountAPI(name)   (__Pyx_RefnannyAPIStruct *) PyCObject_Import((char *)name, (char *)"RefnannyAPI")
-#define __Pyx_INCREF(r) __Pyx_Refnanny->INCREF(__pyx_refchk, (PyObject *)(r), __LINE__)
-#define __Pyx_DECREF(r) __Pyx_Refnanny->DECREF(__pyx_refchk, (PyObject *)(r), __LINE__)
-#define __Pyx_GOTREF(r) __Pyx_Refnanny->GOTREF(__pyx_refchk, (PyObject *)(r), __LINE__)
-#define __Pyx_GIVEREF(r) __Pyx_Refnanny->GIVEREF(__pyx_refchk, (PyObject *)(r), __LINE__)
-#define __Pyx_XDECREF(r) if((r) == NULL) ; else __Pyx_DECREF(r)
-#define __Pyx_SetupRefcountContext(name)   void* __pyx_refchk = __Pyx_Refnanny->NewContext((name), __LINE__, __FILE__)
-#define __Pyx_FinishRefcountContext()   __Pyx_Refnanny->FinishContext(&__pyx_refchk)
+#if CYTHON_CCOMPLEX
+  #ifdef __cplusplus
+    #include <complex>
+  #else
+    #include <complex.h>
+  #endif
+#endif
+
+#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
+  #undef _Complex_I
+  #define _Complex_I 1.0fj
+#endif
+
+typedef npy_int8 __pyx_t_5numpy_int8_t;
+
+typedef npy_int16 __pyx_t_5numpy_int16_t;
+
+typedef npy_int32 __pyx_t_5numpy_int32_t;
+
+typedef npy_int64 __pyx_t_5numpy_int64_t;
+
+typedef npy_uint8 __pyx_t_5numpy_uint8_t;
+
+typedef npy_uint16 __pyx_t_5numpy_uint16_t;
+
+typedef npy_uint32 __pyx_t_5numpy_uint32_t;
+
+typedef npy_uint64 __pyx_t_5numpy_uint64_t;
+
+typedef npy_float32 __pyx_t_5numpy_float32_t;
+
+typedef npy_float64 __pyx_t_5numpy_float64_t;
+
+typedef npy_long __pyx_t_5numpy_int_t;
+
+typedef npy_longlong __pyx_t_5numpy_long_t;
+
+typedef npy_intp __pyx_t_5numpy_intp_t;
+
+typedef npy_uintp __pyx_t_5numpy_uintp_t;
+
+typedef npy_ulong __pyx_t_5numpy_uint_t;
+
+typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
+
+typedef npy_double __pyx_t_5numpy_float_t;
+
+typedef npy_double __pyx_t_5numpy_double_t;
+
+typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
+
+#if CYTHON_CCOMPLEX
+  #ifdef __cplusplus
+    typedef ::std::complex< float > __pyx_t_float_complex;
+  #else
+    typedef float _Complex __pyx_t_float_complex;
+  #endif
 #else
-#define __Pyx_INCREF(r) Py_INCREF(r)
-#define __Pyx_DECREF(r) Py_DECREF(r)
-#define __Pyx_GOTREF(r)
-#define __Pyx_GIVEREF(r)
-#define __Pyx_XDECREF(r) Py_XDECREF(r)
-#define __Pyx_SetupRefcountContext(name)
-#define __Pyx_FinishRefcountContext()
+    typedef struct { float real, imag; } __pyx_t_float_complex;
+#endif
+
+#if CYTHON_CCOMPLEX
+  #ifdef __cplusplus
+    typedef ::std::complex< double > __pyx_t_double_complex;
+  #else
+    typedef double _Complex __pyx_t_double_complex;
+  #endif
+#else
+    typedef struct { double real, imag; } __pyx_t_double_complex;
+#endif
+
+/* Type declarations */
+
+typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
+
+typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
+
+typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
+
+typedef npy_cdouble __pyx_t_5numpy_complex_t;
+
+#ifndef CYTHON_REFNANNY
+  #define CYTHON_REFNANNY 0
+#endif
+
+#if CYTHON_REFNANNY
+  typedef struct {
+    void (*INCREF)(void*, PyObject*, int);
+    void (*DECREF)(void*, PyObject*, int);
+    void (*GOTREF)(void*, PyObject*, int);
+    void (*GIVEREF)(void*, PyObject*, int);
+    void* (*SetupContext)(const char*, int, const char*);
+    void (*FinishContext)(void**);
+  } __Pyx_RefNannyAPIStruct;
+  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
+  static __Pyx_RefNannyAPIStruct * __Pyx_RefNannyImportAPI(const char *modname) {
+    PyObject *m = NULL, *p = NULL;
+    void *r = NULL;
+    m = PyImport_ImportModule((char *)modname);
+    if (!m) goto end;
+    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
+    if (!p) goto end;
+    r = PyLong_AsVoidPtr(p);
+  end:
+    Py_XDECREF(p);
+    Py_XDECREF(m);
+    return (__Pyx_RefNannyAPIStruct *)r;
+  }
+  #define __Pyx_RefNannySetupContext(name)           void *__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+  #define __Pyx_RefNannyFinishContext()           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
+  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0)
+#else
+  #define __Pyx_RefNannySetupContext(name)
+  #define __Pyx_RefNannyFinishContext()
+  #define __Pyx_INCREF(r) Py_INCREF(r)
+  #define __Pyx_DECREF(r) Py_DECREF(r)
+  #define __Pyx_GOTREF(r)
+  #define __Pyx_GIVEREF(r)
+  #define __Pyx_XDECREF(r) Py_XDECREF(r)
 #endif /* CYTHON_REFNANNY */
-#define __Pyx_XGIVEREF(r) if((r) == NULL) ; else __Pyx_GIVEREF(r)
-#define __Pyx_XGOTREF(r) if((r) == NULL) ; else __Pyx_GOTREF(r)
+#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
+#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)
 
 
-static INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
     PyObject *r;
     if (!j) return NULL;
     r = PyObject_GetItem(o, j);
@@ -312,7 +435,7 @@
                                                     __Pyx_GetItemInt_List_Fast(o, i, size <= sizeof(long)) : \
                                                     __Pyx_GetItemInt_Generic(o, to_py_func(i)))
 
-static INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
     if (likely(o != Py_None)) {
         if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
             PyObject *r = PyList_GET_ITEM(o, i);
@@ -332,7 +455,7 @@
                                                     __Pyx_GetItemInt_Tuple_Fast(o, i, size <= sizeof(long)) : \
                                                     __Pyx_GetItemInt_Generic(o, to_py_func(i)))
 
-static INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
     if (likely(o != Py_None)) {
         if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
             PyObject *r = PyTuple_GET_ITEM(o, i);
@@ -353,7 +476,7 @@
                                                     __Pyx_GetItemInt_Fast(o, i, size <= sizeof(long)) : \
                                                     __Pyx_GetItemInt_Generic(o, to_py_func(i)))
 
-static INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
     PyObject *r;
     if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
         r = PyList_GET_ITEM(o, i);
@@ -372,22 +495,17 @@
     return r;
 }
 
-static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
 
-static void __Pyx_RaiseDoubleKeywordsError(
-    const char* func_name, PyObject* kw_name); /*proto*/
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
 
-static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
-    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void);
 
-static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/
+static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
+static int __Pyx_EndUnpack(PyObject *); /*proto*/
 
-static INLINE void __Pyx_RaiseNoneNotIterableError(void);
+static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
 
-static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
-
-static INLINE void __Pyx_RaiseTooManyValuesError(void);
-
 static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/
 
 static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
@@ -397,333 +515,137 @@
 
 static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
 
-static INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp);
+static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp);
 
-#if __PYX_USE_C99_COMPLEX
-    #define __Pyx_REAL_PART(z) __real__(z)
-    #define __Pyx_IMAG_PART(z) __imag__(z)
+#if CYTHON_CCOMPLEX
+  #ifdef __cplusplus
+    #define __Pyx_CREAL(z) ((z).real())
+    #define __Pyx_CIMAG(z) ((z).imag())
+  #else
+    #define __Pyx_CREAL(z) (__real__(z))
+    #define __Pyx_CIMAG(z) (__imag__(z))
+  #endif
 #else
-    #define __Pyx_REAL_PART(z) ((z).real)
-    #define __Pyx_IMAG_PART(z) ((z).imag)
+    #define __Pyx_CREAL(z) ((z).real)
+    #define __Pyx_CIMAG(z) ((z).imag)
 #endif
 
-#define __pyx_PyObject_from_complex(z) PyComplex_FromDoubles((double)__Pyx_REAL_PART(z), (double)__Pyx_IMAG_PART(z))
-
-#if __PYX_USE_C99_COMPLEX
-
-    typedef float _Complex __pyx_t_float_complex;
-    static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
-      return x + y*(__pyx_t_float_complex)_Complex_I;
-    }
-    
-    #define __pyx_t_float_complex_is_zero(a) ((a) == 0)
-    #define __pyx_t_float_complex_eq(a, b) ((a) == (b))
-    #define __pyx_t_float_complex_add(a, b) ((a)+(b))
-    #define __pyx_t_float_complex_sub(a, b) ((a)-(b))
-    #define __pyx_t_float_complex_mul(a, b) ((a)*(b))
-    #define __pyx_t_float_complex_div(a, b) ((a)/(b))
-    #define __pyx_t_float_complex_neg(a) (-(a))
-
+#if defined(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX
+    #define __Pyx_SET_CREAL(z,x) ((z).real(x))
+    #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
 #else
-
-    typedef struct { float real, imag; } __pyx_t_float_complex;
-    static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
-      __pyx_t_float_complex c; c.real = x; c.imag = y; return c;
-    }
-    
-    static INLINE int __pyx_t_float_complex_is_zero(__pyx_t_float_complex a) {
-       return (a.real == 0) & (a.imag == 0);
-    }
-
-    static INLINE int __pyx_t_float_complex_eq(__pyx_t_float_complex a, __pyx_t_float_complex b) {
-       return (a.real == b.real) & (a.imag == b.imag);
-    }
-
-    static INLINE __pyx_t_float_complex __pyx_t_float_complex_add(__pyx_t_float_complex a, __pyx_t_float_complex b) {
-        __pyx_t_float_complex z;
-        z.real = a.real + b.real;
-        z.imag = a.imag + b.imag;
-        return z;
-    }
-
-    static INLINE __pyx_t_float_complex __pyx_t_float_complex_sub(__pyx_t_float_complex a, __pyx_t_float_complex b) {
-        __pyx_t_float_complex z;
-        z.real = a.real - b.real;
-        z.imag = a.imag - b.imag;
-        return z;
-    }
-
-    static INLINE __pyx_t_float_complex __pyx_t_float_complex_mul(__pyx_t_float_complex a, __pyx_t_float_complex b) {
-        __pyx_t_float_complex z;
-        z.real = a.real * b.real - a.imag * b.imag;
-        z.imag = a.real * b.imag + a.imag * b.real;
-        return z;
-    }
-
-    static INLINE __pyx_t_float_complex __pyx_t_float_complex_div(__pyx_t_float_complex a, __pyx_t_float_complex b) {
-        __pyx_t_float_complex z;
-        float denom = b.real*b.real + b.imag*b.imag;
-        z.real = (a.real * b.real + a.imag * b.imag) / denom;
-        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
-        return z;
-    }
-
-    static INLINE __pyx_t_float_complex __pyx_t_float_complex_neg(__pyx_t_float_complex a) {
-        __pyx_t_float_complex z;
-        z.real = -a.real;
-        z.imag = -a.imag;
-        return z;
-    }
-
+    #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
+    #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
 #endif
 
-#if __PYX_USE_C99_COMPLEX
+static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
 
-    typedef double _Complex __pyx_t_double_complex;
-    static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
-      return x + y*(__pyx_t_double_complex)_Complex_I;
-    }
-    
-    #define __pyx_t_double_complex_is_zero(a) ((a) == 0)
-    #define __pyx_t_double_complex_eq(a, b) ((a) == (b))
-    #define __pyx_t_double_complex_add(a, b) ((a)+(b))
-    #define __pyx_t_double_complex_sub(a, b) ((a)-(b))
-    #define __pyx_t_double_complex_mul(a, b) ((a)*(b))
-    #define __pyx_t_double_complex_div(a, b) ((a)/(b))
-    #define __pyx_t_double_complex_neg(a) (-(a))
-
+#if CYTHON_CCOMPLEX
+    #define __Pyx_c_eqf(a, b)   ((a)==(b))
+    #define __Pyx_c_sumf(a, b)  ((a)+(b))
+    #define __Pyx_c_difff(a, b) ((a)-(b))
+    #define __Pyx_c_prodf(a, b) ((a)*(b))
+    #define __Pyx_c_quotf(a, b) ((a)/(b))
+    #define __Pyx_c_negf(a)     (-(a))
+  #ifdef __cplusplus
+    #define __Pyx_c_is_zerof(z) ((z)==(float)0)
+    #define __Pyx_c_conjf(z)    (::std::conj(z))
+    /*#define __Pyx_c_absf(z)     (::std::abs(z))*/
+  #else
+    #define __Pyx_c_is_zerof(z) ((z)==0)
+    #define __Pyx_c_conjf(z)    (conjf(z))
+    /*#define __Pyx_c_absf(z)     (cabsf(z))*/
+ #endif
 #else
-
-    typedef struct { double real, imag; } __pyx_t_double_complex;
-    static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
-      __pyx_t_double_complex c; c.real = x; c.imag = y; return c;
-    }
-    
-    static INLINE int __pyx_t_double_complex_is_zero(__pyx_t_double_complex a) {
-       return (a.real == 0) & (a.imag == 0);
-    }
-
-    static INLINE int __pyx_t_double_complex_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) {
-       return (a.real == b.real) & (a.imag == b.imag);
-    }
-
-    static INLINE __pyx_t_double_complex __pyx_t_double_complex_add(__pyx_t_double_complex a, __pyx_t_double_complex b) {
-        __pyx_t_double_complex z;
-        z.real = a.real + b.real;
-        z.imag = a.imag + b.imag;
-        return z;
-    }
-
-    static INLINE __pyx_t_double_complex __pyx_t_double_complex_sub(__pyx_t_double_complex a, __pyx_t_double_complex b) {
-        __pyx_t_double_complex z;
-        z.real = a.real - b.real;
-        z.imag = a.imag - b.imag;
-        return z;
-    }
-
-    static INLINE __pyx_t_double_complex __pyx_t_double_complex_mul(__pyx_t_double_complex a, __pyx_t_double_complex b) {
-        __pyx_t_double_complex z;
-        z.real = a.real * b.real - a.imag * b.imag;
-        z.imag = a.real * b.imag + a.imag * b.real;
-        return z;
-    }
-
-    static INLINE __pyx_t_double_complex __pyx_t_double_complex_div(__pyx_t_double_complex a, __pyx_t_double_complex b) {
-        __pyx_t_double_complex z;
-        double denom = b.real*b.real + b.imag*b.imag;
-        z.real = (a.real * b.real + a.imag * b.imag) / denom;
-        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
-        return z;
-    }
-
-    static INLINE __pyx_t_double_complex __pyx_t_double_complex_neg(__pyx_t_double_complex a) {
-        __pyx_t_double_complex z;
-        z.real = -a.real;
-        z.imag = -a.imag;
-        return z;
-    }
-
+    static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex);
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex);
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex);
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex);
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex);
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex);
+    static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex);
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex);
+    /*static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex);*/
 #endif
 
-#if __PYX_USE_C99_COMPLEX
+static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
 
-    typedef long double _Complex __pyx_t_long__double_complex;
-    static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_from_parts(long double x, long double y) {
-      return x + y*(__pyx_t_long__double_complex)_Complex_I;
-    }
-    
-    #define __pyx_t_long__double_complex_is_zero(a) ((a) == 0)
-    #define __pyx_t_long__double_complex_eq(a, b) ((a) == (b))
-    #define __pyx_t_long__double_complex_add(a, b) ((a)+(b))
-    #define __pyx_t_long__double_complex_sub(a, b) ((a)-(b))
-    #define __pyx_t_long__double_complex_mul(a, b) ((a)*(b))
-    #define __pyx_t_long__double_complex_div(a, b) ((a)/(b))
-    #define __pyx_t_long__double_complex_neg(a) (-(a))
-
+#if CYTHON_CCOMPLEX
+    #define __Pyx_c_eq(a, b)   ((a)==(b))
+    #define __Pyx_c_sum(a, b)  ((a)+(b))
+    #define __Pyx_c_diff(a, b) ((a)-(b))
+    #define __Pyx_c_prod(a, b) ((a)*(b))
+    #define __Pyx_c_quot(a, b) ((a)/(b))
+    #define __Pyx_c_neg(a)     (-(a))
+  #ifdef __cplusplus
+    #define __Pyx_c_is_zero(z) ((z)==(double)0)
+    #define __Pyx_c_conj(z)    (::std::conj(z))
+    /*#define __Pyx_c_abs(z)     (::std::abs(z))*/
+  #else
+    #define __Pyx_c_is_zero(z) ((z)==0)
+    #define __Pyx_c_conj(z)    (conj(z))
+    /*#define __Pyx_c_abs(z)     (cabs(z))*/
+ #endif
 #else
+    static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex);
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex);
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex);
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex);
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex);
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex);
+    static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex);
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex);
+    /*static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex);*/
+#endif
 
-    typedef struct { long double real, imag; } __pyx_t_long__double_complex;
-    static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_from_parts(long double x, long double y) {
-      __pyx_t_long__double_complex c; c.real = x; c.imag = y; return c;
-    }
-    
-    static INLINE int __pyx_t_long__double_complex_is_zero(__pyx_t_long__double_complex a) {
-       return (a.real == 0) & (a.imag == 0);
-    }
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
 
-    static INLINE int __pyx_t_long__double_complex_eq(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) {
-       return (a.real == b.real) & (a.imag == b.imag);
-    }
-
-    static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_add(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) {
-        __pyx_t_long__double_complex z;
-        z.real = a.real + b.real;
-        z.imag = a.imag + b.imag;
-        return z;
-    }
-
-    static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_sub(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) {
-        __pyx_t_long__double_complex z;
-        z.real = a.real - b.real;
-        z.imag = a.imag - b.imag;
-        return z;
-    }
-
-    static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_mul(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) {
-        __pyx_t_long__double_complex z;
-        z.real = a.real * b.real - a.imag * b.imag;
-        z.imag = a.real * b.imag + a.imag * b.real;
-        return z;
-    }
-
-    static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_div(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) {
-        __pyx_t_long__double_complex z;
-        long double denom = b.real*b.real + b.imag*b.imag;
-        z.real = (a.real * b.real + a.imag * b.imag) / denom;
-        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
-        return z;
-    }
-
-    static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_neg(__pyx_t_long__double_complex a) {
-        __pyx_t_long__double_complex z;
-        z.real = -a.real;
-        z.imag = -a.imag;
-        return z;
-    }
-
-#endif
-
 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
 
-static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
-static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
 
-static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
-static int __Pyx_EndUnpack(PyObject *); /*proto*/
+static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
 
-static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
+static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
 
-static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
+static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
 
-static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
+static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
 
-static INLINE char __Pyx_PyInt_AsChar(PyObject *);
+static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
 
-static INLINE short __Pyx_PyInt_AsShort(PyObject *);
+static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
 
-static INLINE int __Pyx_PyInt_AsInt(PyObject *);
+static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
 
-static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
+static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
 
-static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
+static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
 
-static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
+static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
 
-static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
+static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
 
-static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
+static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
 
-static INLINE long __Pyx_PyInt_AsLong(PyObject *);
+static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
 
-static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
+static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
 
-static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
-
-static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
-
 static void __Pyx_WriteUnraisable(const char *name); /*proto*/
 
-static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size);  /*proto*/
+static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size, int strict);  /*proto*/
 
 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
 
 static void __Pyx_AddTraceback(const char *funcname); /*proto*/
 
 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
+/* Module declarations from python_buffer */
 
-/* Type declarations */
+/* Module declarations from python_ref */
 
-typedef npy_int8 __pyx_t_5numpy_int8_t;
-
-typedef npy_int16 __pyx_t_5numpy_int16_t;
-
-typedef npy_int32 __pyx_t_5numpy_int32_t;
-
-typedef npy_int64 __pyx_t_5numpy_int64_t;
-
-typedef npy_uint8 __pyx_t_5numpy_uint8_t;
-
-typedef npy_uint16 __pyx_t_5numpy_uint16_t;
-
-typedef npy_uint32 __pyx_t_5numpy_uint32_t;
-
-typedef npy_uint64 __pyx_t_5numpy_uint64_t;
-
-typedef npy_float32 __pyx_t_5numpy_float32_t;
-
-typedef npy_float64 __pyx_t_5numpy_float64_t;
-
-typedef __pyx_t_float_complex __pyx_t_5numpy_complex64_t;
-
-typedef __pyx_t_double_complex __pyx_t_5numpy_complex128_t;
-
-typedef npy_long __pyx_t_5numpy_int_t;
-
-typedef npy_longlong __pyx_t_5numpy_long_t;
-
-typedef npy_ulong __pyx_t_5numpy_uint_t;
-
-typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
-
-typedef npy_double __pyx_t_5numpy_float_t;
-
-typedef npy_double __pyx_t_5numpy_double_t;
-
-typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
-
-typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
-
-typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
-
-typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
-
-typedef npy_cdouble __pyx_t_5numpy_complex_t;
-
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":17
- * 
- * 
- * cpdef object process_element(cnp.ndarray arr,             # <<<<<<<<<<<<<<
- *                                   int chars_as_strings = 1,
- *                                   int squeeze_me = 0):
- */
-
-struct __pyx_opt_args_5scipy_2io_6matlab_9mio_utils_process_element {
-  int __pyx_n;
-  int chars_as_strings;
-  int squeeze_me;
-};
-/* Module declarations from python_buffer */
-
 /* Module declarations from stdlib */
 
 /* Module declarations from stdio */
@@ -736,122 +658,132 @@
 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
-static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
+static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *, PyObject *); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *, PyObject *, PyObject *); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
+static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
+static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *, PyObject *); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *); /*proto*/
 /* Module declarations from scipy.io.matlab.mio_utils */
 
 static size_t __pyx_f_5scipy_2io_6matlab_9mio_utils_cproduct(PyObject *, int __pyx_skip_dispatch); /*proto*/
-static PyObject *__pyx_f_5scipy_2io_6matlab_9mio_utils_process_element(PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5scipy_2io_6matlab_9mio_utils_process_element *__pyx_optional_args); /*proto*/
+static PyObject *__pyx_f_5scipy_2io_6matlab_9mio_utils_squeeze_element(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
 static PyArrayObject *__pyx_f_5scipy_2io_6matlab_9mio_utils_chars_to_strings(PyObject *, int __pyx_skip_dispatch); /*proto*/
 #define __Pyx_MODULE_NAME "scipy.io.matlab.mio_utils"
 int __pyx_module_is_main_scipy__io__matlab__mio_utils = 0;
 
 /* Implementation of scipy.io.matlab.mio_utils */
-static char __pyx_k___main__[] = "__main__";
-static PyObject *__pyx_kp___main__;
-static char __pyx_k_cproduct[] = "cproduct";
-static PyObject *__pyx_kp_cproduct;
-static char __pyx_k_process_element[] = "process_element";
-static PyObject *__pyx_kp_process_element;
-static char __pyx_k_chars_to_strings[] = "chars_to_strings";
-static PyObject *__pyx_kp_chars_to_strings;
-static char __pyx_k_tup[] = "tup";
-static PyObject *__pyx_kp_tup;
-static char __pyx_k_arr[] = "arr";
-static PyObject *__pyx_kp_arr;
-static char __pyx_k_chars_as_strings[] = "chars_as_strings";
-static PyObject *__pyx_kp_chars_as_strings;
-static char __pyx_k_squeeze_me[] = "squeeze_me";
-static PyObject *__pyx_kp_squeeze_me;
-static char __pyx_k_in_arr[] = "in_arr";
-static PyObject *__pyx_kp_in_arr;
-static char __pyx_k_numpy[] = "numpy";
-static PyObject *__pyx_kp_numpy;
-static char __pyx_k_np[] = "np";
-static PyObject *__pyx_kp_np;
-static char __pyx_k_range[] = "range";
-static PyObject *__pyx_kp_range;
-static char __pyx_k_dtype[] = "dtype";
-static PyObject *__pyx_kp_dtype;
-static char __pyx_k_kind[] = "kind";
-static PyObject *__pyx_kp_kind;
-static char __pyx_k_31[] = "U";
-static PyObject *__pyx_kp_31;
-static char __pyx_k_size[] = "size";
-static PyObject *__pyx_kp_size;
-static char __pyx_k_array[] = "array";
-static PyObject *__pyx_kp_array;
-static char __pyx_k_squeeze[] = "squeeze";
-static PyObject *__pyx_kp_squeeze;
-static char __pyx_k_isbuiltin[] = "isbuiltin";
-static PyObject *__pyx_kp_isbuiltin;
-static char __pyx_k_item[] = "item";
-static PyObject *__pyx_kp_item;
-static char __pyx_k_str[] = "str";
-static PyObject *__pyx_kp_str;
-static char __pyx_k_ascontiguousarray[] = "ascontiguousarray";
-static PyObject *__pyx_kp_ascontiguousarray;
-static char __pyx_k_view[] = "view";
-static PyObject *__pyx_kp_view;
-static char __pyx_k_reshape[] = "reshape";
-static PyObject *__pyx_kp_reshape;
-static char __pyx_k_shape[] = "shape";
-static PyObject *__pyx_kp_shape;
 static PyObject *__pyx_builtin_range;
-static PyObject *__pyx_int_15;
-static char __pyx_k___getbuffer__[] = "__getbuffer__";
-static PyObject *__pyx_kp___getbuffer__;
-static char __pyx_k___releasebuffer__[] = "__releasebuffer__";
-static PyObject *__pyx_kp___releasebuffer__;
-static char __pyx_k_info[] = "info";
-static PyObject *__pyx_kp_info;
-static char __pyx_k_flags[] = "flags";
-static PyObject *__pyx_kp_flags;
-static char __pyx_k_ValueError[] = "ValueError";
-static PyObject *__pyx_kp_ValueError;
-static char __pyx_k_RuntimeError[] = "RuntimeError";
-static PyObject *__pyx_kp_RuntimeError;
-static PyObject *__pyx_kp_1;
-static PyObject *__pyx_kp_2;
-static PyObject *__pyx_kp_5;
-static PyObject *__pyx_kp_23;
 static PyObject *__pyx_builtin_ValueError;
 static PyObject *__pyx_builtin_RuntimeError;
 static char __pyx_k_1[] = "ndarray is not C contiguous";
 static char __pyx_k_2[] = "ndarray is not Fortran contiguous";
-static char __pyx_k_3[] = ">";
-static char __pyx_k_4[] = "<";
-static char __pyx_k_5[] = "Non-native byte order not supported";
-static char __pyx_k_6[] = "b";
-static char __pyx_k_7[] = "B";
-static char __pyx_k_8[] = "h";
-static char __pyx_k_9[] = "H";
-static char __pyx_k_10[] = "i";
-static char __pyx_k_11[] = "I";
-static char __pyx_k_12[] = "l";
-static char __pyx_k_13[] = "L";
-static char __pyx_k_14[] = "q";
-static char __pyx_k_15[] = "Q";
-static char __pyx_k_16[] = "f";
-static char __pyx_k_17[] = "d";
-static char __pyx_k_18[] = "g";
-static char __pyx_k_19[] = "Zf";
-static char __pyx_k_20[] = "Zd";
-static char __pyx_k_21[] = "Zg";
-static char __pyx_k_22[] = "O";
-static char __pyx_k_23[] = "unknown dtype code in numpy.pxd (%d)";
-static char __pyx_k_24[] = "^";
-static PyObject *__pyx_kp_25;
-static PyObject *__pyx_kp_28;
-static PyObject *__pyx_kp_29;
-static PyObject *__pyx_kp_30;
-static char __pyx_k_25[] = "Format string allocated too short, see comment in numpy.pxd";
-static char __pyx_k_26[] = ">";
-static char __pyx_k_27[] = "<";
-static char __pyx_k_28[] = "Non-native byte order not supported";
-static char __pyx_k_29[] = "Format string allocated too short.";
-static char __pyx_k_30[] = "unknown dtype code in numpy.pxd (%d)";
+static char __pyx_k_3[] = "Non-native byte order not supported";
+static char __pyx_k_4[] = "unknown dtype code in numpy.pxd (%d)";
+static char __pyx_k_5[] = "Format string allocated too short, see comment in numpy.pxd";
+static char __pyx_k_6[] = "Format string allocated too short.";
+static char __pyx_k_7[] = " Utilities for generic processing of return arrays from read\n";
+static char __pyx_k_8[] = "squeeze_element (line 17)";
+static char __pyx_k_9[] = "chars_to_strings (line 30)";
+static char __pyx_k__B[] = "B";
+static char __pyx_k__H[] = "H";
+static char __pyx_k__I[] = "I";
+static char __pyx_k__L[] = "L";
+static char __pyx_k__O[] = "O";
+static char __pyx_k__Q[] = "Q";
+static char __pyx_k__b[] = "b";
+static char __pyx_k__d[] = "d";
+static char __pyx_k__f[] = "f";
+static char __pyx_k__g[] = "g";
+static char __pyx_k__h[] = "h";
+static char __pyx_k__i[] = "i";
+static char __pyx_k__l[] = "l";
+static char __pyx_k__q[] = "q";
+static char __pyx_k__Zd[] = "Zd";
+static char __pyx_k__Zf[] = "Zf";
+static char __pyx_k__Zg[] = "Zg";
+static char __pyx_k__np[] = "np";
+static char __pyx_k__buf[] = "buf";
+static char __pyx_k__obj[] = "obj";
+static char __pyx_k__str[] = "str";
+static char __pyx_k__base[] = "base";
+static char __pyx_k__item[] = "item";
+static char __pyx_k__ndim[] = "ndim";
+static char __pyx_k__size[] = "size";
+static char __pyx_k__view[] = "view";
+static char __pyx_k__array[] = "array";
+static char __pyx_k__descr[] = "descr";
+static char __pyx_k__dtype[] = "dtype";
+static char __pyx_k__names[] = "names";
+static char __pyx_k__numpy[] = "numpy";
+static char __pyx_k__range[] = "range";
+static char __pyx_k__shape[] = "shape";
+static char __pyx_k__fields[] = "fields";
+static char __pyx_k__format[] = "format";
+static char __pyx_k__reshape[] = "reshape";
+static char __pyx_k__squeeze[] = "squeeze";
+static char __pyx_k__strides[] = "strides";
+static char __pyx_k____main__[] = "__main__";
+static char __pyx_k____test__[] = "__test__";
+static char __pyx_k__isscalar[] = "isscalar";
+static char __pyx_k__itemsize[] = "itemsize";
+static char __pyx_k__readonly[] = "readonly";
+static char __pyx_k__type_num[] = "type_num";
+static char __pyx_k__byteorder[] = "byteorder";
+static char __pyx_k__ValueError[] = "ValueError";
+static char __pyx_k__suboffsets[] = "suboffsets";
+static char __pyx_k__RuntimeError[] = "RuntimeError";
+static char __pyx_k__squeeze_element[] = "squeeze_element";
+static char __pyx_k__chars_to_strings[] = "chars_to_strings";
+static char __pyx_k__ascontiguousarray[] = "ascontiguousarray";
+static PyObject *__pyx_kp_u_1;
+static PyObject *__pyx_kp_u_2;
+static PyObject *__pyx_kp_u_3;
+static PyObject *__pyx_kp_u_4;
+static PyObject *__pyx_kp_u_5;
+static PyObject *__pyx_kp_u_6;
+static PyObject *__pyx_kp_u_8;
+static PyObject *__pyx_kp_u_9;
+static PyObject *__pyx_n_s__RuntimeError;
+static PyObject *__pyx_n_s__ValueError;
+static PyObject *__pyx_n_s____main__;
+static PyObject *__pyx_n_s____test__;
+static PyObject *__pyx_n_s__array;
+static PyObject *__pyx_n_s__ascontiguousarray;
+static PyObject *__pyx_n_s__base;
+static PyObject *__pyx_n_s__buf;
+static PyObject *__pyx_n_s__byteorder;
+static PyObject *__pyx_n_s__chars_to_strings;
+static PyObject *__pyx_n_s__descr;
+static PyObject *__pyx_n_s__dtype;
+static PyObject *__pyx_n_s__fields;
+static PyObject *__pyx_n_s__format;
+static PyObject *__pyx_n_s__isscalar;
+static PyObject *__pyx_n_s__item;
+static PyObject *__pyx_n_s__itemsize;
+static PyObject *__pyx_n_s__names;
+static PyObject *__pyx_n_s__ndim;
+static PyObject *__pyx_n_s__np;
+static PyObject *__pyx_n_s__numpy;
+static PyObject *__pyx_n_s__obj;
+static PyObject *__pyx_n_s__range;
+static PyObject *__pyx_n_s__readonly;
+static PyObject *__pyx_n_s__reshape;
+static PyObject *__pyx_n_s__shape;
+static PyObject *__pyx_n_s__size;
+static PyObject *__pyx_n_s__squeeze;
+static PyObject *__pyx_n_s__squeeze_element;
+static PyObject *__pyx_n_s__str;
+static PyObject *__pyx_n_s__strides;
+static PyObject *__pyx_n_s__suboffsets;
+static PyObject *__pyx_n_s__type_num;
+static PyObject *__pyx_n_s__view;
+static PyObject *__pyx_int_15;
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":9
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":9
  * 
  * 
  * cpdef size_t cproduct(tup):             # <<<<<<<<<<<<<<
@@ -864,13 +796,14 @@
   size_t __pyx_v_res;
   int __pyx_v_i;
   size_t __pyx_r;
-  PyObject *__pyx_1 = 0;
   Py_ssize_t __pyx_t_1;
   int __pyx_t_2;
-  size_t __pyx_t_3;
-  __Pyx_SetupRefcountContext("cproduct");
+  PyObject *__pyx_t_3 = NULL;
+  size_t __pyx_t_4;
+  __Pyx_RefNannySetupContext("cproduct");
+  __Pyx_INCREF(__pyx_v_tup);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":10
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":10
  * 
  * cpdef size_t cproduct(tup):
  *     cdef size_t res = 1             # <<<<<<<<<<<<<<
@@ -879,7 +812,7 @@
  */
   __pyx_v_res = 1;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":12
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":12
  *     cdef size_t res = 1
  *     cdef int i
  *     for i in range(len(tup)):             # <<<<<<<<<<<<<<
@@ -890,21 +823,21 @@
   for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
     __pyx_v_i = __pyx_t_2;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":13
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":13
  *     cdef int i
  *     for i in range(len(tup)):
  *         res *= tup[i]             # <<<<<<<<<<<<<<
  *     return res
  * 
  */
-    __pyx_1 = __Pyx_GetItemInt(__pyx_v_tup, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    __pyx_t_3 = __Pyx_PyInt_AsSize_t(__pyx_1); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-    __pyx_v_res *= __pyx_t_3;
+    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_tup, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = __Pyx_PyInt_AsSize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_v_res *= __pyx_t_4;
   }
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":14
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":14
  *     for i in range(len(tup)):
  *         res *= tup[i]
  *     return res             # <<<<<<<<<<<<<<
@@ -917,15 +850,16 @@
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_1);
+  __Pyx_XDECREF(__pyx_t_3);
   __Pyx_WriteUnraisable("scipy.io.matlab.mio_utils.cproduct");
   __pyx_r = 0;
   __pyx_L0:;
-  __Pyx_FinishRefcountContext();
+  __Pyx_DECREF(__pyx_v_tup);
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":9
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":9
  * 
  * 
  * cpdef size_t cproduct(tup):             # <<<<<<<<<<<<<<
@@ -937,7 +871,7 @@
 static PyObject *__pyx_pf_5scipy_2io_6matlab_9mio_utils_cproduct(PyObject *__pyx_self, PyObject *__pyx_v_tup) {
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
-  __Pyx_SetupRefcountContext("cproduct");
+  __Pyx_RefNannySetupContext("cproduct");
   __pyx_self = __pyx_self;
   __Pyx_XDECREF(__pyx_r);
   __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_f_5scipy_2io_6matlab_9mio_utils_cproduct(__pyx_v_tup, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -954,214 +888,148 @@
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":17
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":17
  * 
  * 
- * cpdef object process_element(cnp.ndarray arr,             # <<<<<<<<<<<<<<
- *                                   int chars_as_strings = 1,
- *                                   int squeeze_me = 0):
+ * cpdef object squeeze_element(cnp.ndarray arr):             # <<<<<<<<<<<<<<
+ *     ''' Return squeezed element
+ * 
  */
 
-static PyObject *__pyx_pf_5scipy_2io_6matlab_9mio_utils_process_element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static  PyObject *__pyx_f_5scipy_2io_6matlab_9mio_utils_process_element(PyArrayObject *__pyx_v_arr, int __pyx_skip_dispatch, struct __pyx_opt_args_5scipy_2io_6matlab_9mio_utils_process_element *__pyx_optional_args) {
-  int __pyx_v_chars_as_strings = 1;
-  int __pyx_v_squeeze_me = 0;
+static PyObject *__pyx_pf_5scipy_2io_6matlab_9mio_utils_squeeze_element(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
+static  PyObject *__pyx_f_5scipy_2io_6matlab_9mio_utils_squeeze_element(PyArrayObject *__pyx_v_arr, int __pyx_skip_dispatch) {
   PyObject *__pyx_r = NULL;
-  PyObject *__pyx_1 = 0;
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_t_4;
-  int __pyx_t_5;
-  PyObject *__pyx_t_6 = NULL;
-  int __pyx_t_7;
-  __Pyx_SetupRefcountContext("process_element");
-  if (__pyx_optional_args) {
-    if (__pyx_optional_args->__pyx_n > 0) {
-      __pyx_v_chars_as_strings = __pyx_optional_args->chars_as_strings;
-      if (__pyx_optional_args->__pyx_n > 1) {
-        __pyx_v_squeeze_me = __pyx_optional_args->squeeze_me;
-      }
-    }
-  }
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  __Pyx_RefNannySetupContext("squeeze_element");
   __Pyx_INCREF((PyObject *)__pyx_v_arr);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":24
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":22
  *     The returned object may not be an ndarray - for example if we do
  *     ``arr.item`` to return a ``mat_struct`` object from a struct array '''
- *     if chars_as_strings and arr.dtype.kind == 'U':             # <<<<<<<<<<<<<<
- *         arr = chars_to_strings(arr)
- *     if squeeze_me:
+ *     if not arr.size:             # <<<<<<<<<<<<<<
+ *         return np.array([])
+ *     arr = np.squeeze(arr)
  */
-  __pyx_t_1 = __pyx_v_chars_as_strings;
-  if (__pyx_t_1) {
-    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_kp_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_kp_kind); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_kp_31, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_5 = __pyx_t_4;
-  } else {
-    __pyx_t_5 = __pyx_t_1;
-  }
-  if (__pyx_t_5) {
+  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = (!__pyx_t_2);
+  if (__pyx_t_3) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":25
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":23
  *     ``arr.item`` to return a ``mat_struct`` object from a struct array '''
- *     if chars_as_strings and arr.dtype.kind == 'U':
- *         arr = chars_to_strings(arr)             # <<<<<<<<<<<<<<
- *     if squeeze_me:
- *         if not arr.size:
+ *     if not arr.size:
+ *         return np.array([])             # <<<<<<<<<<<<<<
+ *     arr = np.squeeze(arr)
+ *     if np.isscalar(arr): # 0d coverted to scalar
  */
-    __pyx_t_2 = ((PyObject *)__pyx_f_5scipy_2io_6matlab_9mio_utils_chars_to_strings(((PyObject *)__pyx_v_arr), 0)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(((PyObject *)__pyx_v_arr));
-    __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
-    __pyx_t_2 = 0;
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_1));
+    __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+    __pyx_t_1 = 0;
+    __pyx_t_1 = PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":26
- *     if chars_as_strings and arr.dtype.kind == 'U':
- *         arr = chars_to_strings(arr)
- *     if squeeze_me:             # <<<<<<<<<<<<<<
- *         if not arr.size:
- *             arr = np.array([])
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":24
+ *     if not arr.size:
+ *         return np.array([])
+ *     arr = np.squeeze(arr)             # <<<<<<<<<<<<<<
+ *     if np.isscalar(arr): # 0d coverted to scalar
+ *         return arr.item()
  */
-  __pyx_t_1 = __pyx_v_squeeze_me;
-  if (__pyx_t_1) {
+  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__squeeze); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(((PyObject *)__pyx_v_arr));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_arr));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_arr));
+  __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_v_arr));
+  __pyx_v_arr = ((PyArrayObject *)__pyx_t_4);
+  __pyx_t_4 = 0;
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":27
- *         arr = chars_to_strings(arr)
- *     if squeeze_me:
- *         if not arr.size:             # <<<<<<<<<<<<<<
- *             arr = np.array([])
- *         else:
- */
-    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_kp_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_4 = (!__pyx_t_5);
-    if (__pyx_t_4) {
-
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":28
- *     if squeeze_me:
- *         if not arr.size:
- *             arr = np.array([])             # <<<<<<<<<<<<<<
- *         else:
- *             arr = np.squeeze(arr)
- */
-      __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_1);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
-      PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_3));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
-      __pyx_t_3 = 0;
-      __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-      if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(((PyObject *)__pyx_v_arr));
-      __pyx_v_arr = ((PyArrayObject *)__pyx_t_3);
-      __pyx_t_3 = 0;
-      goto __pyx_L5;
-    }
-    /*else*/ {
-
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":30
- *             arr = np.array([])
- *         else:
- *             arr = np.squeeze(arr)             # <<<<<<<<<<<<<<
- *             if not arr.shape and arr.dtype.isbuiltin: # 0d coverted to scalar
- *                 return arr.item()
- */
-      __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_1);
-      __pyx_t_3 = PyObject_GetAttr(__pyx_1, __pyx_kp_squeeze); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
-      __Pyx_INCREF(((PyObject *)__pyx_v_arr));
-      PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_arr));
-      __Pyx_GIVEREF(((PyObject *)__pyx_v_arr));
-      __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-      if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(((PyObject *)__pyx_v_arr));
-      __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
-      __pyx_t_2 = 0;
-
-      /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":31
- *         else:
- *             arr = np.squeeze(arr)
- *             if not arr.shape and arr.dtype.isbuiltin: # 0d coverted to scalar             # <<<<<<<<<<<<<<
- *                 return arr.item()
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":25
+ *         return np.array([])
+ *     arr = np.squeeze(arr)
+ *     if np.isscalar(arr): # 0d coverted to scalar             # <<<<<<<<<<<<<<
+ *         return arr.item()
  *     return arr
  */
-      __pyx_t_4 = (!(__pyx_v_arr->dimensions != 0));
-      if (__pyx_t_4) {
-        __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_kp_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_kp_isbuiltin); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-        __pyx_t_7 = __pyx_t_5;
-      } else {
-        __pyx_t_7 = __pyx_t_4;
-      }
-      if (__pyx_t_7) {
+  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__isscalar); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_INCREF(((PyObject *)__pyx_v_arr));
+  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_arr));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_arr));
+  __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if (__pyx_t_3) {
 
-        /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":32
- *             arr = np.squeeze(arr)
- *             if not arr.shape and arr.dtype.isbuiltin: # 0d coverted to scalar
- *                 return arr.item()             # <<<<<<<<<<<<<<
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":26
+ *     arr = np.squeeze(arr)
+ *     if np.isscalar(arr): # 0d coverted to scalar
+ *         return arr.item()             # <<<<<<<<<<<<<<
  *     return arr
  * 
  */
-        __Pyx_XDECREF(__pyx_r);
-        __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_kp_item); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-        __pyx_r = __pyx_t_2;
-        __pyx_t_2 = 0;
-        goto __pyx_L0;
-        goto __pyx_L6;
-      }
-      __pyx_L6:;
-    }
-    __pyx_L5:;
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__item); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_r = __pyx_t_4;
+    __pyx_t_4 = 0;
+    goto __pyx_L0;
     goto __pyx_L4;
   }
   __pyx_L4:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":33
- *             if not arr.shape and arr.dtype.isbuiltin: # 0d coverted to scalar
- *                 return arr.item()
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":27
+ *     if np.isscalar(arr): # 0d coverted to scalar
+ *         return arr.item()
  *     return arr             # <<<<<<<<<<<<<<
  * 
  * 
@@ -1174,103 +1042,36 @@
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_AddTraceback("scipy.io.matlab.mio_utils.process_element");
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("scipy.io.matlab.mio_utils.squeeze_element");
   __pyx_r = 0;
   __pyx_L0:;
   __Pyx_DECREF((PyObject *)__pyx_v_arr);
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":17
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":17
  * 
  * 
- * cpdef object process_element(cnp.ndarray arr,             # <<<<<<<<<<<<<<
- *                                   int chars_as_strings = 1,
- *                                   int squeeze_me = 0):
+ * cpdef object squeeze_element(cnp.ndarray arr):             # <<<<<<<<<<<<<<
+ *     ''' Return squeezed element
+ * 
  */
 
-static PyObject *__pyx_pf_5scipy_2io_6matlab_9mio_utils_process_element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5scipy_2io_6matlab_9mio_utils_process_element[] = " Return processed object\n\n    The returned object may not be an ndarray - for example if we do\n    ``arr.item`` to return a ``mat_struct`` object from a struct array ";
-static PyObject *__pyx_pf_5scipy_2io_6matlab_9mio_utils_process_element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyArrayObject *__pyx_v_arr = 0;
-  int __pyx_v_chars_as_strings;
-  int __pyx_v_squeeze_me;
+static PyObject *__pyx_pf_5scipy_2io_6matlab_9mio_utils_squeeze_element(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
+static char __pyx_doc_5scipy_2io_6matlab_9mio_utils_squeeze_element[] = " Return squeezed element\n\n    The returned object may not be an ndarray - for example if we do\n    ``arr.item`` to return a ``mat_struct`` object from a struct array ";
+static PyObject *__pyx_pf_5scipy_2io_6matlab_9mio_utils_squeeze_element(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
   PyObject *__pyx_r = NULL;
-  struct __pyx_opt_args_5scipy_2io_6matlab_9mio_utils_process_element __pyx_1;
   PyObject *__pyx_t_1 = NULL;
-  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_arr,&__pyx_kp_chars_as_strings,&__pyx_kp_squeeze_me,0};
-  __Pyx_SetupRefcountContext("process_element");
+  __Pyx_RefNannySetupContext("squeeze_element");
   __pyx_self = __pyx_self;
-  if (unlikely(__pyx_kwds)) {
-    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
-    PyObject* values[3] = {0,0,0};
-    switch (PyTuple_GET_SIZE(__pyx_args)) {
-      case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-      case  0: break;
-      default: goto __pyx_L5_argtuple_error;
-    }
-    switch (PyTuple_GET_SIZE(__pyx_args)) {
-      case  0:
-      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_arr);
-      if (likely(values[0])) kw_args--;
-      else goto __pyx_L5_argtuple_error;
-      case  1:
-      if (kw_args > 0) {
-        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_chars_as_strings);
-        if (unlikely(value)) { values[1] = value; kw_args--; }
-      }
-      case  2:
-      if (kw_args > 0) {
-        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_squeeze_me);
-        if (unlikely(value)) { values[2] = value; kw_args--; }
-      }
-    }
-    if (unlikely(kw_args > 0)) {
-      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "process_element") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    }
-    __pyx_v_arr = ((PyArrayObject *)values[0]);
-    if (values[1]) {
-      __pyx_v_chars_as_strings = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_chars_as_strings == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    } else {
-      __pyx_v_chars_as_strings = 1;
-    }
-    if (values[2]) {
-      __pyx_v_squeeze_me = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_squeeze_me == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    } else {
-      __pyx_v_squeeze_me = 0;
-    }
-  } else {
-    __pyx_v_chars_as_strings = 1;
-    __pyx_v_squeeze_me = 0;
-    switch (PyTuple_GET_SIZE(__pyx_args)) {
-      case  3: __pyx_v_squeeze_me = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_squeeze_me == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      case  2: __pyx_v_chars_as_strings = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_chars_as_strings == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      case  1: __pyx_v_arr = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
-      break;
-      default: goto __pyx_L5_argtuple_error;
-    }
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("process_element", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("scipy.io.matlab.mio_utils.process_element");
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_XDECREF(__pyx_r);
-  __pyx_1.__pyx_n = 2;
-  __pyx_1.chars_as_strings = __pyx_v_chars_as_strings;
-  __pyx_1.squeeze_me = __pyx_v_squeeze_me;
-  __pyx_t_1 = __pyx_f_5scipy_2io_6matlab_9mio_utils_process_element(__pyx_v_arr, 0, &__pyx_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_f_5scipy_2io_6matlab_9mio_utils_squeeze_element(((PyArrayObject *)__pyx_v_arr), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
@@ -1280,15 +1081,15 @@
   goto __pyx_L0;
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("scipy.io.matlab.mio_utils.process_element");
+  __Pyx_AddTraceback("scipy.io.matlab.mio_utils.squeeze_element");
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":36
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":30
  * 
  * 
  * cpdef cnp.ndarray chars_to_strings(in_arr):             # <<<<<<<<<<<<<<
@@ -1304,26 +1105,26 @@
   npy_intp __pyx_v_last_dim;
   PyObject *__pyx_v_new_dt_str;
   PyArrayObject *__pyx_r = NULL;
-  PyObject *__pyx_1 = 0;
   int __pyx_t_1;
   PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
   PyObject *__pyx_t_4 = NULL;
-  __Pyx_SetupRefcountContext("chars_to_strings");
+  __Pyx_RefNannySetupContext("chars_to_strings");
+  __Pyx_INCREF(__pyx_v_in_arr);
   __pyx_v_new_dt_str = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":50
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":44
  *        ``arr``
  *     '''
  *     cdef cnp.ndarray arr = in_arr             # <<<<<<<<<<<<<<
  *     cdef int ndim = arr.ndim
  *     cdef cnp.npy_intp *dims = arr.shape
  */
-  if (!(__Pyx_TypeTest(__pyx_v_in_arr, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!(likely(((__pyx_v_in_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_in_arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_INCREF(__pyx_v_in_arr);
   __pyx_v_arr = ((PyArrayObject *)__pyx_v_in_arr);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":51
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":45
  *     '''
  *     cdef cnp.ndarray arr = in_arr
  *     cdef int ndim = arr.ndim             # <<<<<<<<<<<<<<
@@ -1332,7 +1133,7 @@
  */
   __pyx_v_ndim = __pyx_v_arr->nd;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":52
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":46
  *     cdef cnp.ndarray arr = in_arr
  *     cdef int ndim = arr.ndim
  *     cdef cnp.npy_intp *dims = arr.shape             # <<<<<<<<<<<<<<
@@ -1341,7 +1142,7 @@
  */
   __pyx_v_dims = __pyx_v_arr->dimensions;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":53
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":47
  *     cdef int ndim = arr.ndim
  *     cdef cnp.npy_intp *dims = arr.shape
  *     cdef cnp.npy_intp last_dim = dims[ndim-1]             # <<<<<<<<<<<<<<
@@ -1350,7 +1151,7 @@
  */
   __pyx_v_last_dim = (__pyx_v_dims[(__pyx_v_ndim - 1)]);
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":55
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":49
  *     cdef cnp.npy_intp last_dim = dims[ndim-1]
  *     cdef object new_dt_str
  *     if last_dim == 0: # deal with empty array case             # <<<<<<<<<<<<<<
@@ -1360,16 +1161,16 @@
   __pyx_t_1 = (__pyx_v_last_dim == 0);
   if (__pyx_t_1) {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":56
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":50
  *     cdef object new_dt_str
  *     if last_dim == 0: # deal with empty array case
  *         new_dt_str = arr.dtype.str             # <<<<<<<<<<<<<<
  *     else: # make new dtype string with N appended
  *         new_dt_str = arr.dtype.str[:-1] + str(last_dim)
  */
-    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_kp_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_kp_str); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__str); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_DECREF(__pyx_v_new_dt_str);
@@ -1379,120 +1180,119 @@
   }
   /*else*/ {
 
-    /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":58
+    /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":52
  *         new_dt_str = arr.dtype.str
  *     else: # make new dtype string with N appended
  *         new_dt_str = arr.dtype.str[:-1] + str(last_dim)             # <<<<<<<<<<<<<<
  *     # Copy to deal with F ordered arrays
  *     arr = np.ascontiguousarray(arr)
  */
-    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_kp_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_kp_str); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__str); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_1 = PySequence_GetSlice(__pyx_t_2, 0, -1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
+    __pyx_t_3 = PySequence_GetSlice(__pyx_t_2, 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_2 = __Pyx_PyInt_to_py_npy_intp(__pyx_v_last_dim); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyInt_to_py_npy_intp(__pyx_v_last_dim); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
     __Pyx_GIVEREF(__pyx_t_2);
     __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-    __pyx_t_3 = PyNumber_Add(__pyx_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_DECREF(__pyx_v_new_dt_str);
-    __pyx_v_new_dt_str = __pyx_t_3;
-    __pyx_t_3 = 0;
+    __pyx_v_new_dt_str = __pyx_t_4;
+    __pyx_t_4 = 0;
   }
   __pyx_L3:;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":60
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":54
  *         new_dt_str = arr.dtype.str[:-1] + str(last_dim)
  *     # Copy to deal with F ordered arrays
  *     arr = np.ascontiguousarray(arr)             # <<<<<<<<<<<<<<
  *     arr = arr.view(new_dt_str)
  *     return arr.reshape(in_arr.shape[:-1])
  */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_1, __pyx_kp_ascontiguousarray); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
   __Pyx_INCREF(((PyObject *)__pyx_v_arr));
-  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_arr));
+  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_arr));
   __Pyx_GIVEREF(((PyObject *)__pyx_v_arr));
-  __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(((PyObject *)__pyx_v_arr));
-  __pyx_v_arr = ((PyArrayObject *)__pyx_t_4);
-  __pyx_t_4 = 0;
+  __pyx_v_arr = ((PyArrayObject *)__pyx_t_3);
+  __pyx_t_3 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":61
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":55
  *     # Copy to deal with F ordered arrays
  *     arr = np.ascontiguousarray(arr)
  *     arr = arr.view(new_dt_str)             # <<<<<<<<<<<<<<
  *     return arr.reshape(in_arr.shape[:-1])
  */
-  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_kp_view); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__view); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_v_new_dt_str);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_new_dt_str);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_new_dt_str);
   __Pyx_GIVEREF(__pyx_v_new_dt_str);
-  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(((PyObject *)__pyx_v_arr));
-  __pyx_v_arr = ((PyArrayObject *)__pyx_t_3);
-  __pyx_t_3 = 0;
+  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
+  __pyx_t_2 = 0;
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":62
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":56
  *     arr = np.ascontiguousarray(arr)
  *     arr = arr.view(new_dt_str)
  *     return arr.reshape(in_arr.shape[:-1])             # <<<<<<<<<<<<<<
  */
   __Pyx_XDECREF(((PyObject *)__pyx_r));
-  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_kp_reshape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__reshape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_4 = PyObject_GetAttr(__pyx_v_in_arr, __pyx_n_s__shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = PySequence_GetSlice(__pyx_t_4, 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_in_arr, __pyx_kp_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_1 = PySequence_GetSlice(__pyx_t_2, 0, -1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_3 = 0;
+  __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_1);
-  __Pyx_GIVEREF(__pyx_1);
-  __pyx_1 = 0;
-  __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = ((PyArrayObject *)__pyx_t_4);
-  __pyx_t_4 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = ((PyArrayObject *)__pyx_t_3);
+  __pyx_t_3 = 0;
   goto __pyx_L0;
 
   __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_1);
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_4);
@@ -1501,12 +1301,13 @@
   __pyx_L0:;
   __Pyx_XDECREF((PyObject *)__pyx_v_arr);
   __Pyx_DECREF(__pyx_v_new_dt_str);
+  __Pyx_DECREF(__pyx_v_in_arr);
   __Pyx_XGIVEREF((PyObject *)__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":36
+/* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":30
  * 
  * 
  * cpdef cnp.ndarray chars_to_strings(in_arr):             # <<<<<<<<<<<<<<
@@ -1519,10 +1320,10 @@
 static PyObject *__pyx_pf_5scipy_2io_6matlab_9mio_utils_chars_to_strings(PyObject *__pyx_self, PyObject *__pyx_v_in_arr) {
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
-  __Pyx_SetupRefcountContext("chars_to_strings");
+  __Pyx_RefNannySetupContext("chars_to_strings");
   __pyx_self = __pyx_self;
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = ((PyObject *)__pyx_f_5scipy_2io_6matlab_9mio_utils_chars_to_strings(__pyx_v_in_arr, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = ((PyObject *)__pyx_f_5scipy_2io_6matlab_9mio_utils_chars_to_strings(__pyx_v_in_arr, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
@@ -1536,11 +1337,11 @@
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":152
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":187
  *         # experimental exception made for __getbuffer__ and __releasebuffer__
  *         # -- the details of this may change.
  *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
@@ -1562,18 +1363,21 @@
   int __pyx_v_hasfields;
   int __pyx_r;
   int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_t_4;
-  int __pyx_t_5;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
   int __pyx_t_6;
-  char *__pyx_t_7;
-  __Pyx_SetupRefcountContext("__getbuffer__");
+  int __pyx_t_7;
+  int __pyx_t_8;
+  char *__pyx_t_9;
+  __Pyx_RefNannySetupContext("__getbuffer__");
   if (__pyx_v_info == NULL) return 0;
   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
   __Pyx_GIVEREF(__pyx_v_info->obj);
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":158
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":193
  *             # of flags
  *             cdef int copy_shape, i, ndim
  *             cdef int endian_detector = 1             # <<<<<<<<<<<<<<
@@ -1582,7 +1386,7 @@
  */
   __pyx_v_endian_detector = 1;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":159
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":194
  *             cdef int copy_shape, i, ndim
  *             cdef int endian_detector = 1
  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
@@ -1591,7 +1395,7 @@
  */
   __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":161
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":196
  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
  * 
  *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
@@ -1600,7 +1404,7 @@
  */
   __pyx_v_ndim = PyArray_NDIM(((PyArrayObject *)__pyx_v_self));
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":163
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":198
  *             ndim = PyArray_NDIM(self)
  * 
  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
@@ -1610,7 +1414,7 @@
   __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
   if (__pyx_t_1) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":164
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":199
  * 
  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
  *                 copy_shape = 1             # <<<<<<<<<<<<<<
@@ -1622,7 +1426,7 @@
   }
   /*else*/ {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":166
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":201
  *                 copy_shape = 1
  *             else:
  *                 copy_shape = 0             # <<<<<<<<<<<<<<
@@ -1633,96 +1437,100 @@
   }
   __pyx_L5:;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":168
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":203
  *                 copy_shape = 0
  * 
  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
  *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
- *                 raise ValueError("ndarray is not C contiguous")
+ *                 raise ValueError(u"ndarray is not C contiguous")
  */
-  if (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS)) {
+  __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS);
+  if (__pyx_t_1) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":169
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":204
  * 
  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
  *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):             # <<<<<<<<<<<<<<
- *                 raise ValueError("ndarray is not C contiguous")
+ *                 raise ValueError(u"ndarray is not C contiguous")
  * 
  */
-    __pyx_t_1 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_C_CONTIGUOUS));
+    __pyx_t_2 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_C_CONTIGUOUS));
+    __pyx_t_3 = __pyx_t_2;
   } else {
-    __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS);
+    __pyx_t_3 = __pyx_t_1;
   }
-  if (__pyx_t_1) {
+  if (__pyx_t_3) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":170
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":205
  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
  *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
- *                 raise ValueError("ndarray is not C contiguous")             # <<<<<<<<<<<<<<
+ *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
  * 
  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
  */
-    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __Pyx_INCREF(__pyx_kp_1);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_1);
-    __Pyx_GIVEREF(__pyx_kp_1);
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    __Pyx_Raise(__pyx_t_3, 0, 0);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(((PyObject *)__pyx_kp_u_1));
+    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_u_1));
+    __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_1));
+    __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_5, 0, 0);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L6;
   }
   __pyx_L6:;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":172
- *                 raise ValueError("ndarray is not C contiguous")
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":207
+ *                 raise ValueError(u"ndarray is not C contiguous")
  * 
  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
  *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
- *                 raise ValueError("ndarray is not Fortran contiguous")
+ *                 raise ValueError(u"ndarray is not Fortran contiguous")
  */
-  if (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS)) {
+  __pyx_t_3 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS);
+  if (__pyx_t_3) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":173
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":208
  * 
  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
  *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):             # <<<<<<<<<<<<<<
- *                 raise ValueError("ndarray is not Fortran contiguous")
+ *                 raise ValueError(u"ndarray is not Fortran contiguous")
  * 
  */
     __pyx_t_1 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_F_CONTIGUOUS));
+    __pyx_t_2 = __pyx_t_1;
   } else {
-    __pyx_t_1 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS);
+    __pyx_t_2 = __pyx_t_3;
   }
-  if (__pyx_t_1) {
+  if (__pyx_t_2) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":174
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":209
  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
  *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
- *                 raise ValueError("ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
+ *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
  * 
  *             info.buf = PyArray_DATA(self)
  */
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-    __Pyx_INCREF(__pyx_kp_2);
-    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_2);
-    __Pyx_GIVEREF(__pyx_kp_2);
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-    __Pyx_Raise(__pyx_t_2, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_INCREF(((PyObject *)__pyx_kp_u_2));
+    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_u_2));
+    __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_2));
+    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_Raise(__pyx_t_4, 0, 0);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L7;
   }
   __pyx_L7:;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":176
- *                 raise ValueError("ndarray is not Fortran contiguous")
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":211
+ *                 raise ValueError(u"ndarray is not Fortran contiguous")
  * 
  *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
  *             info.ndim = ndim
@@ -1730,7 +1538,7 @@
  */
   __pyx_v_info->buf = PyArray_DATA(((PyArrayObject *)__pyx_v_self));
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":177
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":212
  * 
  *             info.buf = PyArray_DATA(self)
  *             info.ndim = ndim             # <<<<<<<<<<<<<<
@@ -1739,17 +1547,17 @@
  */
   __pyx_v_info->ndim = __pyx_v_ndim;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":178
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":213
  *             info.buf = PyArray_DATA(self)
  *             info.ndim = ndim
  *             if copy_shape:             # <<<<<<<<<<<<<<
  *                 # Allocate new buffer for strides and shape info. This is allocated
  *                 # as one block, strides first.
  */
-  __pyx_t_4 = __pyx_v_copy_shape;
-  if (__pyx_t_4) {
+  __pyx_t_6 = __pyx_v_copy_shape;
+  if (__pyx_t_6) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":181
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":216
  *                 # Allocate new buffer for strides and shape info. This is allocated
  *                 # as one block, strides first.
  *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)             # <<<<<<<<<<<<<<
@@ -1758,7 +1566,7 @@
  */
     __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * __pyx_v_ndim) * 2)));
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":182
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":217
  *                 # as one block, strides first.
  *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)
  *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
@@ -1767,17 +1575,18 @@
  */
     __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":183
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":218
  *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)
  *                 info.shape = info.strides + ndim
  *                 for i in range(ndim):             # <<<<<<<<<<<<<<
  *                     info.strides[i] = PyArray_STRIDES(self)[i]
  *                     info.shape[i] = PyArray_DIMS(self)[i]
  */
-    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_v_ndim; __pyx_t_4+=1) {
-      __pyx_v_i = __pyx_t_4;
+    __pyx_t_6 = __pyx_v_ndim;
+    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+      __pyx_v_i = __pyx_t_7;
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":184
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":219
  *                 info.shape = info.strides + ndim
  *                 for i in range(ndim):
  *                     info.strides[i] = PyArray_STRIDES(self)[i]             # <<<<<<<<<<<<<<
@@ -1786,7 +1595,7 @@
  */
       (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(((PyArrayObject *)__pyx_v_self))[__pyx_v_i]);
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":185
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":220
  *                 for i in range(ndim):
  *                     info.strides[i] = PyArray_STRIDES(self)[i]
  *                     info.shape[i] = PyArray_DIMS(self)[i]             # <<<<<<<<<<<<<<
@@ -1799,7 +1608,7 @@
   }
   /*else*/ {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":187
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":222
  *                     info.shape[i] = PyArray_DIMS(self)[i]
  *             else:
  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
@@ -1808,7 +1617,7 @@
  */
     __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(((PyArrayObject *)__pyx_v_self)));
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":188
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":223
  *             else:
  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)             # <<<<<<<<<<<<<<
@@ -1819,7 +1628,7 @@
   }
   __pyx_L8:;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":189
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":224
  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
  *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
@@ -1828,7 +1637,7 @@
  */
   __pyx_v_info->suboffsets = NULL;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":190
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":225
  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
  *             info.suboffsets = NULL
  *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
@@ -1837,7 +1646,7 @@
  */
   __pyx_v_info->itemsize = PyArray_ITEMSIZE(((PyArrayObject *)__pyx_v_self));
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":191
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":226
  *             info.suboffsets = NULL
  *             info.itemsize = PyArray_ITEMSIZE(self)
  *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
@@ -1846,7 +1655,7 @@
  */
   __pyx_v_info->readonly = (!PyArray_ISWRITEABLE(((PyArrayObject *)__pyx_v_self)));
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":194
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":229
  * 
  *             cdef int t
  *             cdef char* f = NULL             # <<<<<<<<<<<<<<
@@ -1855,7 +1664,7 @@
  */
   __pyx_v_f = NULL;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":195
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":230
  *             cdef int t
  *             cdef char* f = NULL
  *             cdef dtype descr = self.descr             # <<<<<<<<<<<<<<
@@ -1865,7 +1674,7 @@
   __Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_self)->descr));
   __pyx_v_descr = ((PyArrayObject *)__pyx_v_self)->descr;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":199
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":234
  *             cdef int offset
  * 
  *             cdef bint hasfields = PyDataType_HASFIELDS(descr)             # <<<<<<<<<<<<<<
@@ -1874,21 +1683,23 @@
  */
   __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":201
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":236
  *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
  * 
  *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
  *                 # do not call releasebuffer
  *                 info.obj = None
  */
-  if ((!__pyx_v_hasfields)) {
-    __pyx_t_1 = (!__pyx_v_copy_shape);
+  __pyx_t_2 = (!__pyx_v_hasfields);
+  if (__pyx_t_2) {
+    __pyx_t_3 = (!__pyx_v_copy_shape);
+    __pyx_t_1 = __pyx_t_3;
   } else {
-    __pyx_t_1 = (!__pyx_v_hasfields);
+    __pyx_t_1 = __pyx_t_2;
   }
   if (__pyx_t_1) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":203
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":238
  *             if not hasfields and not copy_shape:
  *                 # do not call releasebuffer
  *                 info.obj = None             # <<<<<<<<<<<<<<
@@ -1904,7 +1715,7 @@
   }
   /*else*/ {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":206
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":241
  *             else:
  *                 # need to call releasebuffer
  *                 info.obj = self             # <<<<<<<<<<<<<<
@@ -1919,7 +1730,7 @@
   }
   __pyx_L11:;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":208
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":243
  *                 info.obj = self
  * 
  *             if not hasfields:             # <<<<<<<<<<<<<<
@@ -1929,7 +1740,7 @@
   __pyx_t_1 = (!__pyx_v_hasfields);
   if (__pyx_t_1) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":209
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":244
  * 
  *             if not hasfields:
  *                 t = descr.type_num             # <<<<<<<<<<<<<<
@@ -1938,319 +1749,322 @@
  */
     __pyx_v_t = __pyx_v_descr->type_num;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":210
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":245
  *             if not hasfields:
  *                 t = descr.type_num
  *                 if ((descr.byteorder == '>' and little_endian) or             # <<<<<<<<<<<<<<
  *                     (descr.byteorder == '<' and not little_endian)):
- *                     raise ValueError("Non-native byte order not supported")
+ *                     raise ValueError(u"Non-native byte order not supported")
  */
-    if ((__pyx_v_descr->byteorder == '>')) {
-      __pyx_t_1 = __pyx_v_little_endian;
+    __pyx_t_1 = (__pyx_v_descr->byteorder == '>');
+    if (__pyx_t_1) {
+      __pyx_t_2 = __pyx_v_little_endian;
     } else {
-      __pyx_t_1 = (__pyx_v_descr->byteorder == '>');
+      __pyx_t_2 = __pyx_t_1;
     }
-    if (!__pyx_t_1) {
+    if (!__pyx_t_2) {
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":211
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":246
  *                 t = descr.type_num
  *                 if ((descr.byteorder == '>' and little_endian) or
  *                     (descr.byteorder == '<' and not little_endian)):             # <<<<<<<<<<<<<<
- *                     raise ValueError("Non-native byte order not supported")
+ *                     raise ValueError(u"Non-native byte order not supported")
  *                 if   t == NPY_BYTE:        f = "b"
  */
-      if ((__pyx_v_descr->byteorder == '<')) {
-        __pyx_t_5 = (!__pyx_v_little_endian);
+      __pyx_t_1 = (__pyx_v_descr->byteorder == '<');
+      if (__pyx_t_1) {
+        __pyx_t_3 = (!__pyx_v_little_endian);
+        __pyx_t_8 = __pyx_t_3;
       } else {
-        __pyx_t_5 = (__pyx_v_descr->byteorder == '<');
+        __pyx_t_8 = __pyx_t_1;
       }
-      __pyx_t_6 = __pyx_t_5;
+      __pyx_t_1 = __pyx_t_8;
     } else {
-      __pyx_t_6 = __pyx_t_1;
+      __pyx_t_1 = __pyx_t_2;
     }
-    if (__pyx_t_6) {
+    if (__pyx_t_1) {
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":212
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":247
  *                 if ((descr.byteorder == '>' and little_endian) or
  *                     (descr.byteorder == '<' and not little_endian)):
- *                     raise ValueError("Non-native byte order not supported")             # <<<<<<<<<<<<<<
+ *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
  *                 if   t == NPY_BYTE:        f = "b"
  *                 elif t == NPY_UBYTE:       f = "B"
  */
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-      __Pyx_INCREF(__pyx_kp_5);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_5);
-      __Pyx_GIVEREF(__pyx_kp_5);
-      __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      __Pyx_Raise(__pyx_t_3, 0, 0);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_INCREF(((PyObject *)__pyx_kp_u_3));
+      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_u_3));
+      __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_3));
+      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_Raise(__pyx_t_5, 0, 0);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L13;
     }
     __pyx_L13:;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":213
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":248
  *                     (descr.byteorder == '<' and not little_endian)):
- *                     raise ValueError("Non-native byte order not supported")
+ *                     raise ValueError(u"Non-native byte order not supported")
  *                 if   t == NPY_BYTE:        f = "b"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_UBYTE:       f = "B"
  *                 elif t == NPY_SHORT:       f = "h"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_BYTE);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_6;
+    __pyx_t_1 = (__pyx_v_t == NPY_BYTE);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__b;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":214
- *                     raise ValueError("Non-native byte order not supported")
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":249
+ *                     raise ValueError(u"Non-native byte order not supported")
  *                 if   t == NPY_BYTE:        f = "b"
  *                 elif t == NPY_UBYTE:       f = "B"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_SHORT:       f = "h"
  *                 elif t == NPY_USHORT:      f = "H"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_UBYTE);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_7;
+    __pyx_t_1 = (__pyx_v_t == NPY_UBYTE);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__B;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":215
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":250
  *                 if   t == NPY_BYTE:        f = "b"
  *                 elif t == NPY_UBYTE:       f = "B"
  *                 elif t == NPY_SHORT:       f = "h"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_USHORT:      f = "H"
  *                 elif t == NPY_INT:         f = "i"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_SHORT);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_8;
+    __pyx_t_1 = (__pyx_v_t == NPY_SHORT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__h;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":216
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":251
  *                 elif t == NPY_UBYTE:       f = "B"
  *                 elif t == NPY_SHORT:       f = "h"
  *                 elif t == NPY_USHORT:      f = "H"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_INT:         f = "i"
  *                 elif t == NPY_UINT:        f = "I"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_USHORT);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_9;
+    __pyx_t_1 = (__pyx_v_t == NPY_USHORT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__H;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":217
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":252
  *                 elif t == NPY_SHORT:       f = "h"
  *                 elif t == NPY_USHORT:      f = "H"
  *                 elif t == NPY_INT:         f = "i"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_UINT:        f = "I"
  *                 elif t == NPY_LONG:        f = "l"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_INT);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_10;
+    __pyx_t_1 = (__pyx_v_t == NPY_INT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__i;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":218
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":253
  *                 elif t == NPY_USHORT:      f = "H"
  *                 elif t == NPY_INT:         f = "i"
  *                 elif t == NPY_UINT:        f = "I"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_LONG:        f = "l"
  *                 elif t == NPY_ULONG:       f = "L"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_UINT);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_11;
+    __pyx_t_1 = (__pyx_v_t == NPY_UINT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__I;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":219
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":254
  *                 elif t == NPY_INT:         f = "i"
  *                 elif t == NPY_UINT:        f = "I"
  *                 elif t == NPY_LONG:        f = "l"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_ULONG:       f = "L"
  *                 elif t == NPY_LONGLONG:    f = "q"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_LONG);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_12;
+    __pyx_t_1 = (__pyx_v_t == NPY_LONG);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__l;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":220
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":255
  *                 elif t == NPY_UINT:        f = "I"
  *                 elif t == NPY_LONG:        f = "l"
  *                 elif t == NPY_ULONG:       f = "L"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_LONGLONG:    f = "q"
  *                 elif t == NPY_ULONGLONG:   f = "Q"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_ULONG);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_13;
+    __pyx_t_1 = (__pyx_v_t == NPY_ULONG);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__L;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":221
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":256
  *                 elif t == NPY_LONG:        f = "l"
  *                 elif t == NPY_ULONG:       f = "L"
  *                 elif t == NPY_LONGLONG:    f = "q"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_ULONGLONG:   f = "Q"
  *                 elif t == NPY_FLOAT:       f = "f"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_LONGLONG);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_14;
+    __pyx_t_1 = (__pyx_v_t == NPY_LONGLONG);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__q;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":222
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":257
  *                 elif t == NPY_ULONG:       f = "L"
  *                 elif t == NPY_LONGLONG:    f = "q"
  *                 elif t == NPY_ULONGLONG:   f = "Q"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_FLOAT:       f = "f"
  *                 elif t == NPY_DOUBLE:      f = "d"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_ULONGLONG);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_15;
+    __pyx_t_1 = (__pyx_v_t == NPY_ULONGLONG);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__Q;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":223
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":258
  *                 elif t == NPY_LONGLONG:    f = "q"
  *                 elif t == NPY_ULONGLONG:   f = "Q"
  *                 elif t == NPY_FLOAT:       f = "f"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_DOUBLE:      f = "d"
  *                 elif t == NPY_LONGDOUBLE:  f = "g"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_FLOAT);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_16;
+    __pyx_t_1 = (__pyx_v_t == NPY_FLOAT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__f;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":224
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":259
  *                 elif t == NPY_ULONGLONG:   f = "Q"
  *                 elif t == NPY_FLOAT:       f = "f"
  *                 elif t == NPY_DOUBLE:      f = "d"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_LONGDOUBLE:  f = "g"
  *                 elif t == NPY_CFLOAT:      f = "Zf"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_DOUBLE);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_17;
+    __pyx_t_1 = (__pyx_v_t == NPY_DOUBLE);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__d;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":225
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":260
  *                 elif t == NPY_FLOAT:       f = "f"
  *                 elif t == NPY_DOUBLE:      f = "d"
  *                 elif t == NPY_LONGDOUBLE:  f = "g"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_CFLOAT:      f = "Zf"
  *                 elif t == NPY_CDOUBLE:     f = "Zd"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_LONGDOUBLE);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_18;
+    __pyx_t_1 = (__pyx_v_t == NPY_LONGDOUBLE);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__g;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":226
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":261
  *                 elif t == NPY_DOUBLE:      f = "d"
  *                 elif t == NPY_LONGDOUBLE:  f = "g"
  *                 elif t == NPY_CFLOAT:      f = "Zf"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_CDOUBLE:     f = "Zd"
  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_CFLOAT);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_19;
+    __pyx_t_1 = (__pyx_v_t == NPY_CFLOAT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__Zf;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":227
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":262
  *                 elif t == NPY_LONGDOUBLE:  f = "g"
  *                 elif t == NPY_CFLOAT:      f = "Zf"
  *                 elif t == NPY_CDOUBLE:     f = "Zd"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
  *                 elif t == NPY_OBJECT:      f = "O"
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_CDOUBLE);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_20;
+    __pyx_t_1 = (__pyx_v_t == NPY_CDOUBLE);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__Zd;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":228
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":263
  *                 elif t == NPY_CFLOAT:      f = "Zf"
  *                 elif t == NPY_CDOUBLE:     f = "Zd"
  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"             # <<<<<<<<<<<<<<
  *                 elif t == NPY_OBJECT:      f = "O"
  *                 else:
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_CLONGDOUBLE);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_21;
+    __pyx_t_1 = (__pyx_v_t == NPY_CLONGDOUBLE);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__Zg;
       goto __pyx_L14;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":229
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":264
  *                 elif t == NPY_CDOUBLE:     f = "Zd"
  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
  *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
  *                 else:
- *                     raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
+ *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
  */
-    __pyx_t_6 = (__pyx_v_t == NPY_OBJECT);
-    if (__pyx_t_6) {
-      __pyx_v_f = __pyx_k_22;
+    __pyx_t_1 = (__pyx_v_t == NPY_OBJECT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__O;
       goto __pyx_L14;
     }
     /*else*/ {
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":231
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":266
  *                 elif t == NPY_OBJECT:      f = "O"
  *                 else:
- *                     raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
+ *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
  *                 info.format = f
  *                 return
  */
-      __pyx_t_3 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_2 = PyNumber_Remainder(__pyx_kp_23, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
-      __Pyx_GIVEREF(__pyx_t_2);
-      __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-      __Pyx_Raise(__pyx_t_2, 0, 0);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_4), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+      __Pyx_GIVEREF(__pyx_t_4);
+      __pyx_t_4 = 0;
+      __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_Raise(__pyx_t_4, 0, 0);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
     __pyx_L14:;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":232
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":267
  *                 else:
- *                     raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
+ *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
  *                 info.format = f             # <<<<<<<<<<<<<<
  *                 return
  *             else:
  */
     __pyx_v_info->format = __pyx_v_f;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":233
- *                     raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":268
+ *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
  *                 info.format = f
  *                 return             # <<<<<<<<<<<<<<
  *             else:
@@ -2262,7 +2076,7 @@
   }
   /*else*/ {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":235
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":270
  *                 return
  *             else:
  *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)             # <<<<<<<<<<<<<<
@@ -2271,7 +2085,7 @@
  */
     __pyx_v_info->format = ((char *)malloc(255));
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":236
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":271
  *             else:
  *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
  *                 info.format[0] = '^' # Native data types, manual alignment             # <<<<<<<<<<<<<<
@@ -2280,7 +2094,7 @@
  */
     (__pyx_v_info->format[0]) = '^';
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":237
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":272
  *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
  *                 info.format[0] = '^' # Native data types, manual alignment
  *                 offset = 0             # <<<<<<<<<<<<<<
@@ -2289,17 +2103,17 @@
  */
     __pyx_v_offset = 0;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":240
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":275
  *                 f = _util_dtypestring(descr, info.format + 1,
  *                                       info.format + _buffer_format_string_len,
  *                                       &offset)             # <<<<<<<<<<<<<<
  *                 f[0] = 0 # Terminate format string
  * 
  */
-    __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_f = __pyx_t_7;
+    __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_f = __pyx_t_9;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":241
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":276
  *                                       info.format + _buffer_format_string_len,
  *                                       &offset)
  *                 f[0] = 0 # Terminate format string             # <<<<<<<<<<<<<<
@@ -2313,8 +2127,8 @@
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
   __Pyx_AddTraceback("numpy.ndarray.__getbuffer__");
   __pyx_r = -1;
   __Pyx_GOTREF(__pyx_v_info->obj);
@@ -2327,11 +2141,12 @@
   }
   __pyx_L2:;
   __Pyx_XDECREF((PyObject *)__pyx_v_descr);
-  __Pyx_FinishRefcountContext();
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":243
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":278
  *                 f[0] = 0 # Terminate format string
  * 
  *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
@@ -2342,9 +2157,10 @@
 static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
 static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
   int __pyx_t_1;
-  __Pyx_SetupRefcountContext("__releasebuffer__");
+  __Pyx_RefNannySetupContext("__releasebuffer__");
+  __Pyx_INCREF((PyObject *)__pyx_v_self);
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":244
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":279
  * 
  *         def __releasebuffer__(ndarray self, Py_buffer* info):
  *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
@@ -2354,7 +2170,7 @@
   __pyx_t_1 = PyArray_HASFIELDS(((PyArrayObject *)__pyx_v_self));
   if (__pyx_t_1) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":245
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":280
  *         def __releasebuffer__(ndarray self, Py_buffer* info):
  *             if PyArray_HASFIELDS(self):
  *                 stdlib.free(info.format)             # <<<<<<<<<<<<<<
@@ -2366,7 +2182,7 @@
   }
   __pyx_L5:;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":246
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":281
  *             if PyArray_HASFIELDS(self):
  *                 stdlib.free(info.format)
  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
@@ -2376,7 +2192,7 @@
   __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
   if (__pyx_t_1) {
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":247
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":282
  *                 stdlib.free(info.format)
  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
  *                 stdlib.free(info.strides)             # <<<<<<<<<<<<<<
@@ -2388,18 +2204,214 @@
   }
   __pyx_L6:;
 
-  __Pyx_FinishRefcountContext();
+  __Pyx_DECREF((PyObject *)__pyx_v_self);
+  __Pyx_RefNannyFinishContext();
 }
 
-/* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":690
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":755
  * ctypedef npy_cdouble     complex_t
  * 
+ * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
+ *     return PyArray_MultiIterNew(1, <void*>a)
+ * 
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1");
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":756
+ * 
+ * cdef inline object PyArray_MultiIterNew1(a):
+ *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline object PyArray_MultiIterNew2(a, b):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1");
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":758
+ *     return PyArray_MultiIterNew(1, <void*>a)
+ * 
+ * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
+ *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
+ * 
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2");
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":759
+ * 
+ * cdef inline object PyArray_MultiIterNew2(a, b):
+ *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline object PyArray_MultiIterNew3(a, b, c):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2");
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":761
+ *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
+ * 
+ * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
+ *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
+ * 
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3");
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":762
+ * 
+ * cdef inline object PyArray_MultiIterNew3(a, b, c):
+ *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3");
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":764
+ *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
+ * 
+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
+ *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
+ * 
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4");
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":765
+ * 
+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
+ *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4");
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":767
+ *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
+ * 
+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
+ *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
+ * 
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5");
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":768
+ * 
+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
+ *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5");
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":770
+ *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
+ * 
  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
  *     # Recursive utility function used in __getbuffer__ to get format
  *     # string. The new location in the format string is returned.
  */
 
-static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
+static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
   PyArray_Descr *__pyx_v_child;
   int __pyx_v_endian_detector;
   int __pyx_v_little_endian;
@@ -2408,9 +2420,6 @@
   PyObject *__pyx_v_new_offset;
   PyObject *__pyx_v_t;
   char *__pyx_r;
-  PyObject *__pyx_1 = 0;
-  PyObject *__pyx_2 = 0;
-  PyObject *__pyx_3 = 0;
   Py_ssize_t __pyx_t_1;
   PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
@@ -2419,15 +2428,17 @@
   int __pyx_t_6;
   int __pyx_t_7;
   int __pyx_t_8;
-  char *__pyx_t_9;
-  __Pyx_SetupRefcountContext("_util_dtypestring");
+  int __pyx_t_9;
+  char *__pyx_t_10;
+  __Pyx_RefNannySetupContext("_util_dtypestring");
+  __Pyx_INCREF((PyObject *)__pyx_v_descr);
   __pyx_v_child = ((PyArray_Descr *)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_fields = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_childname = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_new_offset = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_t = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":697
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":777
  *     cdef int delta_offset
  *     cdef tuple i
  *     cdef int endian_detector = 1             # <<<<<<<<<<<<<<
@@ -2436,7 +2447,7 @@
  */
   __pyx_v_endian_detector = 1;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":698
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":778
  *     cdef tuple i
  *     cdef int endian_detector = 1
  *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
@@ -2445,7 +2456,7 @@
  */
   __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":701
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":781
  *     cdef tuple fields
  * 
  *     for childname in descr.names:             # <<<<<<<<<<<<<<
@@ -2455,7 +2466,7 @@
   if (likely(((PyObject *)__pyx_v_descr->names) != Py_None)) {
     __pyx_t_1 = 0; __pyx_t_2 = ((PyObject *)__pyx_v_descr->names); __Pyx_INCREF(__pyx_t_2);
   } else {
-    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   for (;;) {
     if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
@@ -2464,21 +2475,21 @@
     __pyx_v_childname = __pyx_t_3;
     __pyx_t_3 = 0;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":702
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":782
  * 
  *     for childname in descr.names:
  *         fields = descr.fields[childname]             # <<<<<<<<<<<<<<
  *         child, new_offset = fields
  * 
  */
-    __pyx_1 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    if (!(likely(PyTuple_CheckExact(__pyx_1)) || (__pyx_1) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected tuple, got %s", Py_TYPE(__pyx_1)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(((PyObject *)__pyx_v_fields));
-    __pyx_v_fields = ((PyObject *)__pyx_1);
-    __pyx_1 = 0;
+    __pyx_v_fields = ((PyObject *)__pyx_t_3);
+    __pyx_t_3 = 0;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":703
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":783
  *     for childname in descr.names:
  *         fields = descr.fields[childname]
  *         child, new_offset = fields             # <<<<<<<<<<<<<<
@@ -2487,122 +2498,125 @@
  */
     if (likely(((PyObject *)__pyx_v_fields) != Py_None) && likely(PyTuple_GET_SIZE(((PyObject *)__pyx_v_fields)) == 2)) {
       PyObject* tuple = ((PyObject *)__pyx_v_fields);
-      __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
-      if (!(__Pyx_TypeTest(__pyx_2, __pyx_ptype_5numpy_dtype))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
+      __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
+      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
       __Pyx_DECREF(((PyObject *)__pyx_v_child));
-      __pyx_v_child = ((PyArray_Descr *)__pyx_2);
-      __pyx_2 = 0;
+      __pyx_v_child = ((PyArray_Descr *)__pyx_t_3);
+      __pyx_t_3 = 0;
       __Pyx_DECREF(__pyx_v_new_offset);
-      __pyx_v_new_offset = __pyx_3;
-      __pyx_3 = 0;
+      __pyx_v_new_offset = __pyx_t_4;
+      __pyx_t_4 = 0;
     } else {
       __Pyx_UnpackTupleError(((PyObject *)__pyx_v_fields), 2);
-      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":705
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":785
  *         child, new_offset = fields
  * 
  *         if (end - f) - (new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
- *             raise RuntimeError("Format string allocated too short, see comment in numpy.pxd")
+ *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
  * 
  */
-    __pyx_t_3 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_4 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     if (__pyx_t_6) {
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":706
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":786
  * 
  *         if (end - f) - (new_offset - offset[0]) < 15:
- *             raise RuntimeError("Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
+ *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
  * 
  *         if ((child.byteorder == '>' and little_endian) or
  */
-      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-      __Pyx_INCREF(__pyx_kp_25);
-      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_25);
-      __Pyx_GIVEREF(__pyx_kp_25);
-      __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-      __Pyx_Raise(__pyx_t_4, 0, 0);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_INCREF(((PyObject *)__pyx_kp_u_5));
+      PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_u_5));
+      __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_5));
+      __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_Raise(__pyx_t_3, 0, 0);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L5;
     }
     __pyx_L5:;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":708
- *             raise RuntimeError("Format string allocated too short, see comment in numpy.pxd")
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":788
+ *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
  * 
  *         if ((child.byteorder == '>' and little_endian) or             # <<<<<<<<<<<<<<
  *             (child.byteorder == '<' and not little_endian)):
- *             raise ValueError("Non-native byte order not supported")
+ *             raise ValueError(u"Non-native byte order not supported")
  */
-    if ((__pyx_v_child->byteorder == '>')) {
-      __pyx_t_6 = __pyx_v_little_endian;
+    __pyx_t_6 = (__pyx_v_child->byteorder == '>');
+    if (__pyx_t_6) {
+      __pyx_t_7 = __pyx_v_little_endian;
     } else {
-      __pyx_t_6 = (__pyx_v_child->byteorder == '>');
+      __pyx_t_7 = __pyx_t_6;
     }
-    if (!__pyx_t_6) {
+    if (!__pyx_t_7) {
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":709
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":789
  * 
  *         if ((child.byteorder == '>' and little_endian) or
  *             (child.byteorder == '<' and not little_endian)):             # <<<<<<<<<<<<<<
- *             raise ValueError("Non-native byte order not supported")
+ *             raise ValueError(u"Non-native byte order not supported")
  *             # One could encode it in the format string and have Cython
  */
-      if ((__pyx_v_child->byteorder == '<')) {
-        __pyx_t_7 = (!__pyx_v_little_endian);
+      __pyx_t_6 = (__pyx_v_child->byteorder == '<');
+      if (__pyx_t_6) {
+        __pyx_t_8 = (!__pyx_v_little_endian);
+        __pyx_t_9 = __pyx_t_8;
       } else {
-        __pyx_t_7 = (__pyx_v_child->byteorder == '<');
+        __pyx_t_9 = __pyx_t_6;
       }
-      __pyx_t_8 = __pyx_t_7;
+      __pyx_t_6 = __pyx_t_9;
     } else {
-      __pyx_t_8 = __pyx_t_6;
+      __pyx_t_6 = __pyx_t_7;
     }
-    if (__pyx_t_8) {
+    if (__pyx_t_6) {
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":710
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":790
  *         if ((child.byteorder == '>' and little_endian) or
  *             (child.byteorder == '<' and not little_endian)):
- *             raise ValueError("Non-native byte order not supported")             # <<<<<<<<<<<<<<
+ *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
  *             # One could encode it in the format string and have Cython
  *             # complain instead, BUT: < and > in format strings also imply
  */
-      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-      __Pyx_INCREF(__pyx_kp_28);
-      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_28);
-      __Pyx_GIVEREF(__pyx_kp_28);
-      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_INCREF(((PyObject *)__pyx_kp_u_3));
+      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_u_3));
+      __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_3));
+      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
       __Pyx_Raise(__pyx_t_5, 0, 0);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L6;
     }
     __pyx_L6:;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":720
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":800
  * 
  *         # Output padding bytes
  *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
@@ -2610,16 +2624,16 @@
  *             f += 1
  */
     while (1) {
-      __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (!__pyx_t_8) break;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (!__pyx_t_6) break;
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":721
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":801
  *         # Output padding bytes
  *         while offset[0] < new_offset:
  *             f[0] = 120 # "x"; pad byte             # <<<<<<<<<<<<<<
@@ -2628,7 +2642,7 @@
  */
       (__pyx_v_f[0]) = 120;
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":722
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":802
  *         while offset[0] < new_offset:
  *             f[0] = 120 # "x"; pad byte
  *             f += 1             # <<<<<<<<<<<<<<
@@ -2637,7 +2651,7 @@
  */
       __pyx_v_f += 1;
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":723
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":803
  *             f[0] = 120 # "x"; pad byte
  *             f += 1
  *             offset[0] += 1             # <<<<<<<<<<<<<<
@@ -2647,7 +2661,7 @@
       (__pyx_v_offset[0]) += 1;
     }
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":725
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":805
  *             offset[0] += 1
  * 
  *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
@@ -2656,417 +2670,417 @@
  */
     (__pyx_v_offset[0]) += __pyx_v_child->elsize;
 
-    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":727
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":807
  *         offset[0] += child.itemsize
  * 
  *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
  *             t = child.type_num
  *             if end - f < 5:
  */
-    __pyx_t_8 = (!PyDataType_HASFIELDS(__pyx_v_child));
-    if (__pyx_t_8) {
+    __pyx_t_6 = (!PyDataType_HASFIELDS(__pyx_v_child));
+    if (__pyx_t_6) {
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":728
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":808
  * 
  *         if not PyDataType_HASFIELDS(child):
  *             t = child.type_num             # <<<<<<<<<<<<<<
  *             if end - f < 5:
- *                 raise RuntimeError("Format string allocated too short.")
+ *                 raise RuntimeError(u"Format string allocated too short.")
  */
-      __pyx_t_4 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_v_t);
-      __pyx_v_t = __pyx_t_4;
-      __pyx_t_4 = 0;
+      __pyx_v_t = __pyx_t_3;
+      __pyx_t_3 = 0;
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":729
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":809
  *         if not PyDataType_HASFIELDS(child):
  *             t = child.type_num
  *             if end - f < 5:             # <<<<<<<<<<<<<<
- *                 raise RuntimeError("Format string allocated too short.")
+ *                 raise RuntimeError(u"Format string allocated too short.")
  * 
  */
-      __pyx_t_8 = ((__pyx_v_end - __pyx_v_f) < 5);
-      if (__pyx_t_8) {
+      __pyx_t_6 = ((__pyx_v_end - __pyx_v_f) < 5);
+      if (__pyx_t_6) {
 
-        /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":730
+        /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":810
  *             t = child.type_num
  *             if end - f < 5:
- *                 raise RuntimeError("Format string allocated too short.")             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
  * 
  *             # Until ticket #99 is fixed, use integers to avoid warnings
  */
-        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-        __Pyx_INCREF(__pyx_kp_29);
-        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_29);
-        __Pyx_GIVEREF(__pyx_kp_29);
-        __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_INCREF(((PyObject *)__pyx_kp_u_6));
+        PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_u_6));
+        __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_6));
+        __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_5);
-        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
         __Pyx_Raise(__pyx_t_5, 0, 0);
         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         goto __pyx_L10;
       }
       __pyx_L10:;
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":733
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":813
  * 
  *             # Until ticket #99 is fixed, use integers to avoid warnings
  *             if   t == NPY_BYTE:        f[0] =  98 #"b"             # <<<<<<<<<<<<<<
  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
  */
-      __pyx_t_5 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 98;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":734
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":814
  *             # Until ticket #99 is fixed, use integers to avoid warnings
  *             if   t == NPY_BYTE:        f[0] =  98 #"b"
  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"             # <<<<<<<<<<<<<<
  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
  */
-      __pyx_t_4 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (__pyx_t_8) {
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 66;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":735
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":815
  *             if   t == NPY_BYTE:        f[0] =  98 #"b"
  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
  *             elif t == NPY_SHORT:       f[0] = 104 #"h"             # <<<<<<<<<<<<<<
  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
  *             elif t == NPY_INT:         f[0] = 105 #"i"
  */
-      __pyx_t_5 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 104;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":736
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":816
  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
  *             elif t == NPY_USHORT:      f[0] =  72 #"H"             # <<<<<<<<<<<<<<
  *             elif t == NPY_INT:         f[0] = 105 #"i"
  *             elif t == NPY_UINT:        f[0] =  73 #"I"
  */
-      __pyx_t_4 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (__pyx_t_8) {
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 72;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":737
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":817
  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
  *             elif t == NPY_INT:         f[0] = 105 #"i"             # <<<<<<<<<<<<<<
  *             elif t == NPY_UINT:        f[0] =  73 #"I"
  *             elif t == NPY_LONG:        f[0] = 108 #"l"
  */
-      __pyx_t_5 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 105;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":738
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":818
  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
  *             elif t == NPY_INT:         f[0] = 105 #"i"
  *             elif t == NPY_UINT:        f[0] =  73 #"I"             # <<<<<<<<<<<<<<
  *             elif t == NPY_LONG:        f[0] = 108 #"l"
  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
  */
-      __pyx_t_4 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (__pyx_t_8) {
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 73;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":739
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":819
  *             elif t == NPY_INT:         f[0] = 105 #"i"
  *             elif t == NPY_UINT:        f[0] =  73 #"I"
  *             elif t == NPY_LONG:        f[0] = 108 #"l"             # <<<<<<<<<<<<<<
  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
  */
-      __pyx_t_5 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 108;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":740
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":820
  *             elif t == NPY_UINT:        f[0] =  73 #"I"
  *             elif t == NPY_LONG:        f[0] = 108 #"l"
  *             elif t == NPY_ULONG:       f[0] = 76  #"L"             # <<<<<<<<<<<<<<
  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
  */
-      __pyx_t_4 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (__pyx_t_8) {
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 76;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":741
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":821
  *             elif t == NPY_LONG:        f[0] = 108 #"l"
  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"             # <<<<<<<<<<<<<<
  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
  */
-      __pyx_t_5 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 113;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":742
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":822
  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"             # <<<<<<<<<<<<<<
  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
  */
-      __pyx_t_4 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (__pyx_t_8) {
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 81;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":743
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":823
  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"             # <<<<<<<<<<<<<<
  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
  */
-      __pyx_t_5 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 102;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":744
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":824
  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"             # <<<<<<<<<<<<<<
  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
  */
-      __pyx_t_4 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (__pyx_t_8) {
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 100;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":745
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":825
  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"             # <<<<<<<<<<<<<<
  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
  */
-      __pyx_t_5 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 103;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":746
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":826
  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf             # <<<<<<<<<<<<<<
  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
  */
-      __pyx_t_4 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (__pyx_t_8) {
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 90;
         (__pyx_v_f[1]) = 102;
         __pyx_v_f += 1;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":747
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":827
  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd             # <<<<<<<<<<<<<<
  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
  */
-      __pyx_t_5 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 90;
         (__pyx_v_f[1]) = 100;
         __pyx_v_f += 1;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":748
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":828
  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg             # <<<<<<<<<<<<<<
  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
  *             else:
  */
-      __pyx_t_4 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (__pyx_t_8) {
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 90;
         (__pyx_v_f[1]) = 103;
         __pyx_v_f += 1;
         goto __pyx_L11;
       }
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":749
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":829
  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"             # <<<<<<<<<<<<<<
  *             else:
- *                 raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
+ *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
  */
-      __pyx_t_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_6) {
         (__pyx_v_f[0]) = 79;
         goto __pyx_L11;
       }
       /*else*/ {
 
-        /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":751
+        /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":831
  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
  *             else:
- *                 raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
+ *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
  *             f += 1
  *         else:
  */
-        __pyx_t_4 = PyNumber_Remainder(__pyx_kp_30, __pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
-        __Pyx_GIVEREF(__pyx_t_4);
-        __pyx_t_4 = 0;
-        __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-        __Pyx_Raise(__pyx_t_4, 0, 0);
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_4), __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
+        __Pyx_GIVEREF(__pyx_t_3);
+        __pyx_t_3 = 0;
+        __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_Raise(__pyx_t_3, 0, 0);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
       __pyx_L11:;
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":752
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":832
  *             else:
- *                 raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
+ *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
  *             f += 1             # <<<<<<<<<<<<<<
  *         else:
  *             # Cython ignores struct boundary information ("T{...}"),
@@ -3076,25 +3090,26 @@
     }
     /*else*/ {
 
-      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":756
+      /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":836
  *             # Cython ignores struct boundary information ("T{...}"),
  *             # so don't output it
  *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
  *     return f
  * 
  */
-      __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_v_f = __pyx_t_9;
+      __pyx_t_10 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_v_f = __pyx_t_10;
     }
     __pyx_L9:;
   }
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":757
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":837
  *             # so don't output it
  *             f = _util_dtypestring(child, f, end, offset)
  *     return f             # <<<<<<<<<<<<<<
  * 
+ * 
  */
   __pyx_r = __pyx_v_f;
   goto __pyx_L0;
@@ -3102,9 +3117,6 @@
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_1);
-  __Pyx_XDECREF(__pyx_2);
-  __Pyx_XDECREF(__pyx_3);
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_4);
@@ -3117,13 +3129,153 @@
   __Pyx_DECREF(__pyx_v_childname);
   __Pyx_DECREF(__pyx_v_new_offset);
   __Pyx_DECREF(__pyx_v_t);
-  __Pyx_FinishRefcountContext();
+  __Pyx_DECREF((PyObject *)__pyx_v_descr);
+  __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":952
+ * 
+ * 
+ * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
+ *      cdef PyObject* baseptr
+ *      if base is None:
+ */
+
+static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
+  PyObject *__pyx_v_baseptr;
+  int __pyx_t_1;
+  __Pyx_RefNannySetupContext("set_array_base");
+  __Pyx_INCREF((PyObject *)__pyx_v_arr);
+  __Pyx_INCREF(__pyx_v_base);
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":954
+ * cdef inline void set_array_base(ndarray arr, object base):
+ *      cdef PyObject* baseptr
+ *      if base is None:             # <<<<<<<<<<<<<<
+ *          baseptr = NULL
+ *      else:
+ */
+  __pyx_t_1 = (__pyx_v_base == Py_None);
+  if (__pyx_t_1) {
+
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":955
+ *      cdef PyObject* baseptr
+ *      if base is None:
+ *          baseptr = NULL             # <<<<<<<<<<<<<<
+ *      else:
+ *          Py_INCREF(base) # important to do this before decref below!
+ */
+    __pyx_v_baseptr = NULL;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":957
+ *          baseptr = NULL
+ *      else:
+ *          Py_INCREF(base) # important to do this before decref below!             # <<<<<<<<<<<<<<
+ *          baseptr = <PyObject*>base
+ *      Py_XDECREF(arr.base)
+ */
+    Py_INCREF(__pyx_v_base);
+
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":958
+ *      else:
+ *          Py_INCREF(base) # important to do this before decref below!
+ *          baseptr = <PyObject*>base             # <<<<<<<<<<<<<<
+ *      Py_XDECREF(arr.base)
+ *      arr.base = baseptr
+ */
+    __pyx_v_baseptr = ((PyObject *)__pyx_v_base);
+  }
+  __pyx_L3:;
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":959
+ *          Py_INCREF(base) # important to do this before decref below!
+ *          baseptr = <PyObject*>base
+ *      Py_XDECREF(arr.base)             # <<<<<<<<<<<<<<
+ *      arr.base = baseptr
+ * 
+ */
+  Py_XDECREF(__pyx_v_arr->base);
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":960
+ *          baseptr = <PyObject*>base
+ *      Py_XDECREF(arr.base)
+ *      arr.base = baseptr             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline object get_array_base(ndarray arr):
+ */
+  __pyx_v_arr->base = __pyx_v_baseptr;
+
+  __Pyx_DECREF((PyObject *)__pyx_v_arr);
+  __Pyx_DECREF(__pyx_v_base);
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":962
+ *      arr.base = baseptr
+ * 
+ * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
+ *     if arr.base is NULL:
+ *         return None
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
+  PyObject *__pyx_r = NULL;
+  int __pyx_t_1;
+  __Pyx_RefNannySetupContext("get_array_base");
+  __Pyx_INCREF((PyObject *)__pyx_v_arr);
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":963
+ * 
+ * cdef inline object get_array_base(ndarray arr):
+ *     if arr.base is NULL:             # <<<<<<<<<<<<<<
+ *         return None
+ *     else:
+ */
+  __pyx_t_1 = (__pyx_v_arr->base == NULL);
+  if (__pyx_t_1) {
+
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":964
+ * cdef inline object get_array_base(ndarray arr):
+ *     if arr.base is NULL:
+ *         return None             # <<<<<<<<<<<<<<
+ *     else:
+ *         return <object>arr.base
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":966
+ *         return None
+ *     else:
+ *         return <object>arr.base             # <<<<<<<<<<<<<<
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
+    __pyx_r = ((PyObject *)__pyx_v_arr->base);
+    goto __pyx_L0;
+  }
+  __pyx_L3:;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_L0:;
+  __Pyx_DECREF((PyObject *)__pyx_v_arr);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
 static struct PyMethodDef __pyx_methods[] = {
   {__Pyx_NAMESTR("cproduct"), (PyCFunction)__pyx_pf_5scipy_2io_6matlab_9mio_utils_cproduct, METH_O, __Pyx_DOCSTR(0)},
-  {__Pyx_NAMESTR("process_element"), (PyCFunction)__pyx_pf_5scipy_2io_6matlab_9mio_utils_process_element, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5scipy_2io_6matlab_9mio_utils_process_element)},
+  {__Pyx_NAMESTR("squeeze_element"), (PyCFunction)__pyx_pf_5scipy_2io_6matlab_9mio_utils_squeeze_element, METH_O, __Pyx_DOCSTR(__pyx_doc_5scipy_2io_6matlab_9mio_utils_squeeze_element)},
   {__Pyx_NAMESTR("chars_to_strings"), (PyCFunction)__pyx_pf_5scipy_2io_6matlab_9mio_utils_chars_to_strings, METH_O, __Pyx_DOCSTR(__pyx_doc_5scipy_2io_6matlab_9mio_utils_chars_to_strings)},
   {0, 0, 0, 0}
 };
@@ -3134,7 +3286,7 @@
 static struct PyModuleDef __pyx_moduledef = {
     PyModuleDef_HEAD_INIT,
     __Pyx_NAMESTR("mio_utils"),
-    __Pyx_DOCSTR(__pyx_mdoc), /* m_doc */
+    __Pyx_DOCSTR(__pyx_k_7), /* m_doc */
     -1, /* m_size */
     __pyx_methods /* m_methods */,
     NULL, /* m_reload */
@@ -3145,59 +3297,62 @@
 #endif
 
 static __Pyx_StringTabEntry __pyx_string_tab[] = {
-  {&__pyx_kp___main__, __pyx_k___main__, sizeof(__pyx_k___main__), 1, 1, 1},
-  {&__pyx_kp_cproduct, __pyx_k_cproduct, sizeof(__pyx_k_cproduct), 1, 1, 1},
-  {&__pyx_kp_process_element, __pyx_k_process_element, sizeof(__pyx_k_process_element), 1, 1, 1},
-  {&__pyx_kp_chars_to_strings, __pyx_k_chars_to_strings, sizeof(__pyx_k_chars_to_strings), 1, 1, 1},
-  {&__pyx_kp_tup, __pyx_k_tup, sizeof(__pyx_k_tup), 0, 1, 1},
-  {&__pyx_kp_arr, __pyx_k_arr, sizeof(__pyx_k_arr), 1, 1, 1},
-  {&__pyx_kp_chars_as_strings, __pyx_k_chars_as_strings, sizeof(__pyx_k_chars_as_strings), 1, 1, 1},
-  {&__pyx_kp_squeeze_me, __pyx_k_squeeze_me, sizeof(__pyx_k_squeeze_me), 1, 1, 1},
-  {&__pyx_kp_in_arr, __pyx_k_in_arr, sizeof(__pyx_k_in_arr), 0, 1, 1},
-  {&__pyx_kp_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 1, 1, 1},
-  {&__pyx_kp_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 1, 1},
-  {&__pyx_kp_range, __pyx_k_range, sizeof(__pyx_k_range), 1, 1, 1},
-  {&__pyx_kp_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 1, 1, 1},
-  {&__pyx_kp_kind, __pyx_k_kind, sizeof(__pyx_k_kind), 1, 1, 1},
-  {&__pyx_kp_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 1, 0},
-  {&__pyx_kp_size, __pyx_k_size, sizeof(__pyx_k_size), 1, 1, 1},
-  {&__pyx_kp_array, __pyx_k_array, sizeof(__pyx_k_array), 1, 1, 1},
-  {&__pyx_kp_squeeze, __pyx_k_squeeze, sizeof(__pyx_k_squeeze), 1, 1, 1},
-  {&__pyx_kp_isbuiltin, __pyx_k_isbuiltin, sizeof(__pyx_k_isbuiltin), 1, 1, 1},
-  {&__pyx_kp_item, __pyx_k_item, sizeof(__pyx_k_item), 1, 1, 1},
-  {&__pyx_kp_str, __pyx_k_str, sizeof(__pyx_k_str), 1, 1, 1},
-  {&__pyx_kp_ascontiguousarray, __pyx_k_ascontiguousarray, sizeof(__pyx_k_ascontiguousarray), 1, 1, 1},
-  {&__pyx_kp_view, __pyx_k_view, sizeof(__pyx_k_view), 1, 1, 1},
-  {&__pyx_kp_reshape, __pyx_k_reshape, sizeof(__pyx_k_reshape), 1, 1, 1},
-  {&__pyx_kp_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 1, 1, 1},
-  {&__pyx_kp___getbuffer__, __pyx_k___getbuffer__, sizeof(__pyx_k___getbuffer__), 1, 1, 1},
-  {&__pyx_kp___releasebuffer__, __pyx_k___releasebuffer__, sizeof(__pyx_k___releasebuffer__), 1, 1, 1},
-  {&__pyx_kp_info, __pyx_k_info, sizeof(__pyx_k_info), 1, 1, 1},
-  {&__pyx_kp_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 1, 1, 1},
-  {&__pyx_kp_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 1, 1, 1},
-  {&__pyx_kp_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 1, 1, 1},
-  {&__pyx_kp_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 0},
-  {&__pyx_kp_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 0},
-  {&__pyx_kp_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 0},
-  {&__pyx_kp_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 0},
-  {&__pyx_kp_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 0},
-  {&__pyx_kp_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 0},
-  {&__pyx_kp_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 0},
-  {&__pyx_kp_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 0},
-  {0, 0, 0, 0, 0, 0}
+  {&__pyx_kp_u_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 1, 0, 0},
+  {&__pyx_kp_u_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 1, 0, 0},
+  {&__pyx_kp_u_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 1, 0, 0},
+  {&__pyx_kp_u_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 1, 0, 0},
+  {&__pyx_kp_u_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 1, 0, 0},
+  {&__pyx_kp_u_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 1, 0, 0},
+  {&__pyx_kp_u_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 1, 0, 0},
+  {&__pyx_kp_u_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 1, 0, 0},
+  {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1},
+  {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
+  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
+  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
+  {&__pyx_n_s__array, __pyx_k__array, sizeof(__pyx_k__array), 0, 0, 1, 1},
+  {&__pyx_n_s__ascontiguousarray, __pyx_k__ascontiguousarray, sizeof(__pyx_k__ascontiguousarray), 0, 0, 1, 1},
+  {&__pyx_n_s__base, __pyx_k__base, sizeof(__pyx_k__base), 0, 0, 1, 1},
+  {&__pyx_n_s__buf, __pyx_k__buf, sizeof(__pyx_k__buf), 0, 0, 1, 1},
+  {&__pyx_n_s__byteorder, __pyx_k__byteorder, sizeof(__pyx_k__byteorder), 0, 0, 1, 1},
+  {&__pyx_n_s__chars_to_strings, __pyx_k__chars_to_strings, sizeof(__pyx_k__chars_to_strings), 0, 0, 1, 1},
+  {&__pyx_n_s__descr, __pyx_k__descr, sizeof(__pyx_k__descr), 0, 0, 1, 1},
+  {&__pyx_n_s__dtype, __pyx_k__dtype, sizeof(__pyx_k__dtype), 0, 0, 1, 1},
+  {&__pyx_n_s__fields, __pyx_k__fields, sizeof(__pyx_k__fields), 0, 0, 1, 1},
+  {&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1},
+  {&__pyx_n_s__isscalar, __pyx_k__isscalar, sizeof(__pyx_k__isscalar), 0, 0, 1, 1},
+  {&__pyx_n_s__item, __pyx_k__item, sizeof(__pyx_k__item), 0, 0, 1, 1},
+  {&__pyx_n_s__itemsize, __pyx_k__itemsize, sizeof(__pyx_k__itemsize), 0, 0, 1, 1},
+  {&__pyx_n_s__names, __pyx_k__names, sizeof(__pyx_k__names), 0, 0, 1, 1},
+  {&__pyx_n_s__ndim, __pyx_k__ndim, sizeof(__pyx_k__ndim), 0, 0, 1, 1},
+  {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1},
+  {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1},
+  {&__pyx_n_s__obj, __pyx_k__obj, sizeof(__pyx_k__obj), 0, 0, 1, 1},
+  {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
+  {&__pyx_n_s__readonly, __pyx_k__readonly, sizeof(__pyx_k__readonly), 0, 0, 1, 1},
+  {&__pyx_n_s__reshape, __pyx_k__reshape, sizeof(__pyx_k__reshape), 0, 0, 1, 1},
+  {&__pyx_n_s__shape, __pyx_k__shape, sizeof(__pyx_k__shape), 0, 0, 1, 1},
+  {&__pyx_n_s__size, __pyx_k__size, sizeof(__pyx_k__size), 0, 0, 1, 1},
+  {&__pyx_n_s__squeeze, __pyx_k__squeeze, sizeof(__pyx_k__squeeze), 0, 0, 1, 1},
+  {&__pyx_n_s__squeeze_element, __pyx_k__squeeze_element, sizeof(__pyx_k__squeeze_element), 0, 0, 1, 1},
+  {&__pyx_n_s__str, __pyx_k__str, sizeof(__pyx_k__str), 0, 0, 1, 1},
+  {&__pyx_n_s__strides, __pyx_k__strides, sizeof(__pyx_k__strides), 0, 0, 1, 1},
+  {&__pyx_n_s__suboffsets, __pyx_k__suboffsets, sizeof(__pyx_k__suboffsets), 0, 0, 1, 1},
+  {&__pyx_n_s__type_num, __pyx_k__type_num, sizeof(__pyx_k__type_num), 0, 0, 1, 1},
+  {&__pyx_n_s__view, __pyx_k__view, sizeof(__pyx_k__view), 0, 0, 1, 1},
+  {0, 0, 0, 0, 0, 0, 0}
 };
 static int __Pyx_InitCachedBuiltins(void) {
-  __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_kp_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_kp_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_kp_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   return 0;
   __pyx_L1_error:;
   return -1;
 }
 
 static int __Pyx_InitGlobals(void) {
+  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   return 0;
   __pyx_L1_error:;
   return -1;
@@ -3211,19 +3366,21 @@
 PyMODINIT_FUNC PyInit_mio_utils(void)
 #endif
 {
-  PyObject *__pyx_1 = 0;
-  __pyx_init_filenames();
-  #ifdef CYTHON_REFNANNY
-  void* __pyx_refchk = NULL;
-  __Pyx_Refnanny = __Pyx_ImportRefcountAPI("refnanny");
-  if (!__Pyx_Refnanny) {
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  #if CYTHON_REFNANNY
+  void* __pyx_refnanny = NULL;
+  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
+  if (!__Pyx_RefNanny) {
       PyErr_Clear();
-      __Pyx_Refnanny = __Pyx_ImportRefcountAPI("Cython.Runtime.refnanny");
-      if (!__Pyx_Refnanny)
-          Py_FatalError("failed to import refnanny module");
+      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
+      if (!__Pyx_RefNanny)
+          Py_FatalError("failed to import 'refnanny' module");
   }
-  __pyx_refchk = __Pyx_Refnanny->NewContext("PyMODINIT_FUNC PyInit_mio_utils(void)", __LINE__, __FILE__);
+  __pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit_mio_utils(void)", __LINE__, __FILE__);
   #endif
+  __pyx_init_filenames();
   __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   #if PY_MAJOR_VERSION < 3
   __pyx_empty_bytes = PyString_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -3239,7 +3396,7 @@
   #endif
   /*--- Module creation code ---*/
   #if PY_MAJOR_VERSION < 3
-  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("mio_utils"), __pyx_methods, __pyx_mdoc, 0, PYTHON_API_VERSION);
+  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("mio_utils"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_7), 0, PYTHON_API_VERSION);
   #else
   __pyx_m = PyModule_Create(&__pyx_moduledef);
   #endif
@@ -3250,38 +3407,62 @@
   __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
   if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  /*--- Initialize various global constants etc. ---*/
+  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__pyx_module_is_main_scipy__io__matlab__mio_utils) {
-    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_kp___main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   }
-  /*--- Initialize various global constants etc. ---*/
-  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   /*--- Builtin init code ---*/
   if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_skip_dispatch = 0;
   /*--- Global init code ---*/
   /*--- Function export code ---*/
   /*--- Type init code ---*/
   /*--- Type import code ---*/
-  __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr)); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject)); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject)); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject)); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   /*--- Function import code ---*/
   /*--- Execution code ---*/
 
-  /* "/Users/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":5
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":5
  * '''
  * 
  * import numpy as np             # <<<<<<<<<<<<<<
  * cimport numpy as cnp
  * 
  */
-  __pyx_1 = __Pyx_Import(__pyx_kp_numpy, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_kp_np, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/stdlib.pxd":2
+  /* "/home/mb312/scipybuild/scipy/scipy/io/matlab/mio_utils.pyx":1
+ * # -*- python -*- like file             # <<<<<<<<<<<<<<
+ * ''' Utilities for generic processing of return arrays from read
+ * '''
+ */
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__squeeze_element); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_2, "__doc__");
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_8), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__chars_to_strings); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__");
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_9), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+
+  /* "/home/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/stdlib.pxd":2
  * 
  * cdef extern from "stdlib.h" nogil:             # <<<<<<<<<<<<<<
  *     void free(void *ptr)
@@ -3289,7 +3470,9 @@
  */
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_1);
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
   if (__pyx_m) {
     __Pyx_AddTraceback("init scipy.io.matlab.mio_utils");
     Py_DECREF(__pyx_m); __pyx_m = 0;
@@ -3297,7 +3480,7 @@
     PyErr_SetString(PyExc_ImportError, "init scipy.io.matlab.mio_utils");
   }
   __pyx_L0:;
-  __Pyx_FinishRefcountContext();
+  __Pyx_RefNannyFinishContext();
   #if PY_MAJOR_VERSION < 3
   return;
   #else
@@ -3317,158 +3500,59 @@
 }
 
 
-static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
-    if (!type) {
+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
+    if (unlikely(!type)) {
         PyErr_Format(PyExc_SystemError, "Missing type object");
         return 0;
     }
-    if (obj == Py_None || PyObject_TypeCheck(obj, type))
+    if (likely(PyObject_TypeCheck(obj, type)))
         return 1;
-    PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s",
-        Py_TYPE(obj)->tp_name, type->tp_name);
+    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
+                 Py_TYPE(obj)->tp_name, type->tp_name);
     return 0;
 }
 
-static void __Pyx_RaiseDoubleKeywordsError(
-    const char* func_name,
-    PyObject* kw_name)
-{
-    PyErr_Format(PyExc_TypeError,
-        #if PY_MAJOR_VERSION >= 3
-        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
+    PyErr_Format(PyExc_ValueError,
+        #if PY_VERSION_HEX < 0x02050000
+                 "need more than %d value%s to unpack", (int)index,
         #else
-        "%s() got multiple values for keyword argument '%s'", func_name,
-        PyString_AS_STRING(kw_name));
+                 "need more than %zd value%s to unpack", index,
         #endif
+                 (index == 1) ? "" : "s");
 }
 
-static void __Pyx_RaiseArgtupleInvalid(
-    const char* func_name,
-    int exact,
-    Py_ssize_t num_min,
-    Py_ssize_t num_max,
-    Py_ssize_t num_found)
-{
-    Py_ssize_t num_expected;
-    const char *number, *more_or_less;
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void) {
+    PyErr_SetString(PyExc_ValueError, "too many values to unpack");
+}
 
-    if (num_found < num_min) {
-        num_expected = num_min;
-        more_or_less = "at least";
-    } else {
-        num_expected = num_max;
-        more_or_less = "at most";
+static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
+    PyObject *item;
+    if (!(item = PyIter_Next(iter))) {
+        if (!PyErr_Occurred()) {
+            __Pyx_RaiseNeedMoreValuesError(index);
+        }
     }
-    if (exact) {
-        more_or_less = "exactly";
-    }
-    number = (num_expected == 1) ? "" : "s";
-    PyErr_Format(PyExc_TypeError,
-        #if PY_VERSION_HEX < 0x02050000
-            "%s() takes %s %d positional argument%s (%d given)",
-        #else
-            "%s() takes %s %zd positional argument%s (%zd given)",
-        #endif
-        func_name, more_or_less, num_expected, number, num_found);
+    return item;
 }
 
-static int __Pyx_ParseOptionalKeywords(
-    PyObject *kwds,
-    PyObject **argnames[],
-    PyObject *kwds2,
-    PyObject *values[],
-    Py_ssize_t num_pos_args,
-    const char* function_name)
-{
-    PyObject *key = 0, *value = 0;
-    Py_ssize_t pos = 0;
-    PyObject*** name;
-    PyObject*** first_kw_arg = argnames + num_pos_args;
-
-    while (PyDict_Next(kwds, &pos, &key, &value)) {
-        name = first_kw_arg;
-        while (*name && (**name != key)) name++;
-        if (*name) {
-            values[name-argnames] = value;
-        } else {
-            #if PY_MAJOR_VERSION < 3
-            if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
-            #else
-            if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) {
-            #endif
-                goto invalid_keyword_type;
-            } else {
-                for (name = first_kw_arg; *name; name++) {
-                    #if PY_MAJOR_VERSION >= 3
-                    if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
-                        PyUnicode_Compare(**name, key) == 0) break;
-                    #else
-                    if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
-                        _PyString_Eq(**name, key)) break;
-                    #endif
-                }
-                if (*name) {
-                    values[name-argnames] = value;
-                } else {
-                    /* unexpected keyword found */
-                    for (name=argnames; name != first_kw_arg; name++) {
-                        if (**name == key) goto arg_passed_twice;
-                        #if PY_MAJOR_VERSION >= 3
-                        if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
-                            PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
-                        #else
-                        if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
-                            _PyString_Eq(**name, key)) goto arg_passed_twice;
-                        #endif
-                    }
-                    if (kwds2) {
-                        if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
-                    } else {
-                        goto invalid_keyword;
-                    }
-                }
-            }
-        }
+static int __Pyx_EndUnpack(PyObject *iter) {
+    PyObject *item;
+    if ((item = PyIter_Next(iter))) {
+        Py_DECREF(item);
+        __Pyx_RaiseTooManyValuesError();
+        return -1;
     }
-    return 0;
-arg_passed_twice:
-    __Pyx_RaiseDoubleKeywordsError(function_name, **name);
-    goto bad;
-invalid_keyword_type:
-    PyErr_Format(PyExc_TypeError,
-        "%s() keywords must be strings", function_name);
-    goto bad;
-invalid_keyword:
-    PyErr_Format(PyExc_TypeError,
-    #if PY_MAJOR_VERSION < 3
-        "%s() got an unexpected keyword argument '%s'",
-        function_name, PyString_AsString(key));
-    #else
-        "%s() got an unexpected keyword argument '%U'",
-        function_name, key);
-    #endif
-bad:
-    return -1;
+    else if (!PyErr_Occurred())
+        return 0;
+    else
+        return -1;
 }
 
-static INLINE void __Pyx_RaiseNoneNotIterableError(void) {
+static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
 }
 
-static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
-    PyErr_Format(PyExc_ValueError,
-        #if PY_VERSION_HEX < 0x02050000
-                 "need more than %d value%s to unpack", (int)index,
-        #else
-                 "need more than %zd value%s to unpack", index,
-        #endif
-                 (index == 1) ? "" : "s");
-}
-
-static INLINE void __Pyx_RaiseTooManyValuesError(void) {
-    PyErr_SetString(PyExc_ValueError, "too many values to unpack");
-}
-
 static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
     if (t == Py_None) {
       __Pyx_RaiseNoneNotIterableError();
@@ -3540,19 +3624,202 @@
     return result;
 }
 
-static INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp val) {
-  /**/ if (sizeof(npy_intp) <  sizeof(long))
-      return PyInt_FromLong((long)val);
-  else if (sizeof(npy_intp) == sizeof(long))
-     return (((npy_intp)-1) < ((npy_intp)0)) ? 
-            PyInt_FromLong((long)val) :
-            PyLong_FromUnsignedLong((unsigned long)val);
-  else /* (sizeof(npy_intp) >  sizeof(long)) */
-     return (((npy_intp)-1) < ((npy_intp)0)) ?
-            PyLong_FromLongLong((PY_LONG_LONG)val) :
-            PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
+static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp val) {
+    const npy_intp neg_one = (npy_intp)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (sizeof(npy_intp) <  sizeof(long)) {
+        return PyInt_FromLong((long)val);
+    } else if (sizeof(npy_intp) == sizeof(long)) {
+        if (is_unsigned)
+            return PyLong_FromUnsignedLong((unsigned long)val);
+        else
+            return PyInt_FromLong((long)val);
+    } else { /* (sizeof(npy_intp) > sizeof(long)) */
+        if (is_unsigned)
+            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
+        else
+            return PyLong_FromLongLong((PY_LONG_LONG)val);
+    }
 }
 
+#if CYTHON_CCOMPLEX
+  #ifdef __cplusplus
+    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
+      return ::std::complex< float >(x, y);
+    }
+  #else
+    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
+      return x + y*(__pyx_t_float_complex)_Complex_I;
+    }
+  #endif
+#else
+    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
+      __pyx_t_float_complex z;
+      z.real = x;
+      z.imag = y;
+      return z;
+    }
+#endif
+
+#if CYTHON_CCOMPLEX
+#else
+    static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+       return (a.real == b.real) && (a.imag == b.imag);
+    }
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+        __pyx_t_float_complex z;
+        z.real = a.real + b.real;
+        z.imag = a.imag + b.imag;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+        __pyx_t_float_complex z;
+        z.real = a.real - b.real;
+        z.imag = a.imag - b.imag;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+        __pyx_t_float_complex z;
+        z.real = a.real * b.real - a.imag * b.imag;
+        z.imag = a.real * b.imag + a.imag * b.real;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+        __pyx_t_float_complex z;
+        float denom = b.real * b.real + b.imag * b.imag;
+        z.real = (a.real * b.real + a.imag * b.imag) / denom;
+        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) {
+        __pyx_t_float_complex z;
+        z.real = -a.real;
+        z.imag = -a.imag;
+        return z;
+    }
+    static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) {
+       return (a.real == 0) && (a.imag == 0);
+    }
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) {
+        __pyx_t_float_complex z;
+        z.real =  a.real;
+        z.imag = -a.imag;
+        return z;
+    }
+/*
+    static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) {
+#if HAVE_HYPOT
+        return hypotf(z.real, z.imag);
+#else
+        return sqrtf(z.real*z.real + z.imag*z.imag);
+#endif
+    }
+*/
+#endif
+
+#if CYTHON_CCOMPLEX
+  #ifdef __cplusplus
+    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
+      return ::std::complex< double >(x, y);
+    }
+  #else
+    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
+      return x + y*(__pyx_t_double_complex)_Complex_I;
+    }
+  #endif
+#else
+    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
+      __pyx_t_double_complex z;
+      z.real = x;
+      z.imag = y;
+      return z;
+    }
+#endif
+
+#if CYTHON_CCOMPLEX
+#else
+    static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+       return (a.real == b.real) && (a.imag == b.imag);
+    }
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+        __pyx_t_double_complex z;
+        z.real = a.real + b.real;
+        z.imag = a.imag + b.imag;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+        __pyx_t_double_complex z;
+        z.real = a.real - b.real;
+        z.imag = a.imag - b.imag;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+        __pyx_t_double_complex z;
+        z.real = a.real * b.real - a.imag * b.imag;
+        z.imag = a.real * b.imag + a.imag * b.real;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+        __pyx_t_double_complex z;
+        double denom = b.real * b.real + b.imag * b.imag;
+        z.real = (a.real * b.real + a.imag * b.imag) / denom;
+        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) {
+        __pyx_t_double_complex z;
+        z.real = -a.real;
+        z.imag = -a.imag;
+        return z;
+    }
+    static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) {
+       return (a.real == 0) && (a.imag == 0);
+    }
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) {
+        __pyx_t_double_complex z;
+        z.real =  a.real;
+        z.imag = -a.imag;
+        return z;
+    }
+/*
+    static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) {
+#if HAVE_HYPOT
+        return hypot(z.real, z.imag);
+#else
+        return sqrt(z.real*z.real + z.imag*z.imag);
+#endif
+    }
+*/
+#endif
+
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+
+    tmp_type = tstate->curexc_type;
+    tmp_value = tstate->curexc_value;
+    tmp_tb = tstate->curexc_traceback;
+    tstate->curexc_type = type;
+    tstate->curexc_value = value;
+    tstate->curexc_traceback = tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+}
+
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
+    PyThreadState *tstate = PyThreadState_GET();
+    *type = tstate->curexc_type;
+    *value = tstate->curexc_value;
+    *tb = tstate->curexc_traceback;
+
+    tstate->curexc_type = 0;
+    tstate->curexc_value = 0;
+    tstate->curexc_traceback = 0;
+}
+
+
+#if PY_MAJOR_VERSION < 3
 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
     Py_XINCREF(type);
     Py_XINCREF(value);
@@ -3608,6 +3875,7 @@
             }
         #endif
     }
+
     __Pyx_ErrRestore(type, value, tb);
     return;
 raise_error:
@@ -3617,80 +3885,59 @@
     return;
 }
 
-static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
-    PyObject *tmp_type, *tmp_value, *tmp_tb;
-    PyThreadState *tstate = PyThreadState_GET();
+#else /* Python 3+ */
 
-#if PY_MAJOR_VERSION >= 3
-    /* Note: this is a temporary work-around to prevent crashes in Python 3.0 */
-    if ((tstate->exc_type != NULL) & (tstate->exc_type != Py_None)) {
-        tmp_type = tstate->exc_type;
-        tmp_value = tstate->exc_value;
-        tmp_tb = tstate->exc_traceback;
-        PyErr_NormalizeException(&type, &value, &tb);
-        PyErr_NormalizeException(&tmp_type, &tmp_value, &tmp_tb);
-        tstate->exc_type = 0;
-        tstate->exc_value = 0;
-        tstate->exc_traceback = 0;
-        PyException_SetContext(value, tmp_value);
-        Py_DECREF(tmp_type);
-        Py_XDECREF(tmp_tb);
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
+    if (tb == Py_None) {
+        tb = 0;
+    } else if (tb && !PyTraceBack_Check(tb)) {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: arg 3 must be a traceback or None");
+        goto bad;
     }
-#endif
+    if (value == Py_None)
+        value = 0;
 
-    tmp_type = tstate->curexc_type;
-    tmp_value = tstate->curexc_value;
-    tmp_tb = tstate->curexc_traceback;
-    tstate->curexc_type = type;
-    tstate->curexc_value = value;
-    tstate->curexc_traceback = tb;
-    Py_XDECREF(tmp_type);
-    Py_XDECREF(tmp_value);
-    Py_XDECREF(tmp_tb);
-}
+    if (PyExceptionInstance_Check(type)) {
+        if (value) {
+            PyErr_SetString(PyExc_TypeError,
+                "instance exception may not have a separate value");
+            goto bad;
+        }
+        value = type;
+        type = (PyObject*) Py_TYPE(value);
+    } else if (!PyExceptionClass_Check(type)) {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: exception class must be a subclass of BaseException");
+        goto bad;
+    }
 
-static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
-    PyThreadState *tstate = PyThreadState_GET();
-    *type = tstate->curexc_type;
-    *value = tstate->curexc_value;
-    *tb = tstate->curexc_traceback;
+    PyErr_SetObject(type, value);
 
-    tstate->curexc_type = 0;
-    tstate->curexc_value = 0;
-    tstate->curexc_traceback = 0;
-}
-
-
-static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
-    PyObject *item;
-    if (!(item = PyIter_Next(iter))) {
-        if (!PyErr_Occurred()) {
-            __Pyx_RaiseNeedMoreValuesError(index);
+    if (tb) {
+        PyThreadState *tstate = PyThreadState_GET();
+        PyObject* tmp_tb = tstate->curexc_traceback;
+        if (tb != tmp_tb) {
+            Py_INCREF(tb);
+            tstate->curexc_traceback = tb;
+            Py_XDECREF(tmp_tb);
         }
     }
-    return item;
-}
 
-static int __Pyx_EndUnpack(PyObject *iter) {
-    PyObject *item;
-    if ((item = PyIter_Next(iter))) {
-        Py_DECREF(item);
-        __Pyx_RaiseTooManyValuesError();
-        return -1;
-    }
-    else if (!PyErr_Occurred())
-        return 0;
-    else
-        return -1;
+bad:
+    return;
 }
+#endif
 
-static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
+static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
+    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
     if (sizeof(unsigned char) < sizeof(long)) {
         long val = __Pyx_PyInt_AsLong(x);
         if (unlikely(val != (long)(unsigned char)val)) {
             if (!unlikely(val == -1 && PyErr_Occurred())) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (((unsigned char)-1) > ((unsigned char)0) && unlikely(val < 0)) ?
+                    (is_unsigned && unlikely(val < 0)) ?
                     "can't convert negative value to unsigned char" :
                     "value too large to convert to unsigned char");
             }
@@ -3701,13 +3948,15 @@
     return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
 }
 
-static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
+static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
+    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
     if (sizeof(unsigned short) < sizeof(long)) {
         long val = __Pyx_PyInt_AsLong(x);
         if (unlikely(val != (long)(unsigned short)val)) {
             if (!unlikely(val == -1 && PyErr_Occurred())) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (((unsigned short)-1) > ((unsigned short)0) && unlikely(val < 0)) ?
+                    (is_unsigned && unlikely(val < 0)) ?
                     "can't convert negative value to unsigned short" :
                     "value too large to convert to unsigned short");
             }
@@ -3718,13 +3967,15 @@
     return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
 }
 
-static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
+static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
+    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
     if (sizeof(unsigned int) < sizeof(long)) {
         long val = __Pyx_PyInt_AsLong(x);
         if (unlikely(val != (long)(unsigned int)val)) {
             if (!unlikely(val == -1 && PyErr_Occurred())) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (((unsigned int)-1) > ((unsigned int)0) && unlikely(val < 0)) ?
+                    (is_unsigned && unlikely(val < 0)) ?
                     "can't convert negative value to unsigned int" :
                     "value too large to convert to unsigned int");
             }
@@ -3735,13 +3986,15 @@
     return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
 }
 
-static INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
+static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
+    const char neg_one = (char)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
     if (sizeof(char) < sizeof(long)) {
         long val = __Pyx_PyInt_AsLong(x);
         if (unlikely(val != (long)(char)val)) {
             if (!unlikely(val == -1 && PyErr_Occurred())) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (((char)-1) > ((char)0) && unlikely(val < 0)) ?
+                    (is_unsigned && unlikely(val < 0)) ?
                     "can't convert negative value to char" :
                     "value too large to convert to char");
             }
@@ -3752,13 +4005,15 @@
     return (char)__Pyx_PyInt_AsLong(x);
 }
 
-static INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
+static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
+    const short neg_one = (short)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
     if (sizeof(short) < sizeof(long)) {
         long val = __Pyx_PyInt_AsLong(x);
         if (unlikely(val != (long)(short)val)) {
             if (!unlikely(val == -1 && PyErr_Occurred())) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (((short)-1) > ((short)0) && unlikely(val < 0)) ?
+                    (is_unsigned && unlikely(val < 0)) ?
                     "can't convert negative value to short" :
                     "value too large to convert to short");
             }
@@ -3769,13 +4024,15 @@
     return (short)__Pyx_PyInt_AsLong(x);
 }
 
-static INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
+static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
+    const int neg_one = (int)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
     if (sizeof(int) < sizeof(long)) {
         long val = __Pyx_PyInt_AsLong(x);
         if (unlikely(val != (long)(int)val)) {
             if (!unlikely(val == -1 && PyErr_Occurred())) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (((int)-1) > ((int)0) && unlikely(val < 0)) ?
+                    (is_unsigned && unlikely(val < 0)) ?
                     "can't convert negative value to int" :
                     "value too large to convert to int");
             }
@@ -3786,13 +4043,15 @@
     return (int)__Pyx_PyInt_AsLong(x);
 }
 
-static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
+static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
+    const signed char neg_one = (signed char)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
     if (sizeof(signed char) < sizeof(long)) {
         long val = __Pyx_PyInt_AsLong(x);
         if (unlikely(val != (long)(signed char)val)) {
             if (!unlikely(val == -1 && PyErr_Occurred())) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (((signed char)-1) > ((signed char)0) && unlikely(val < 0)) ?
+                    (is_unsigned && unlikely(val < 0)) ?
                     "can't convert negative value to signed char" :
                     "value too large to convert to signed char");
             }
@@ -3803,13 +4062,15 @@
     return (signed char)__Pyx_PyInt_AsSignedLong(x);
 }
 
-static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
+static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
+    const signed short neg_one = (signed short)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
     if (sizeof(signed short) < sizeof(long)) {
         long val = __Pyx_PyInt_AsLong(x);
         if (unlikely(val != (long)(signed short)val)) {
             if (!unlikely(val == -1 && PyErr_Occurred())) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (((signed short)-1) > ((signed short)0) && unlikely(val < 0)) ?
+                    (is_unsigned && unlikely(val < 0)) ?
                     "can't convert negative value to signed short" :
                     "value too large to convert to signed short");
             }
@@ -3820,13 +4081,15 @@
     return (signed short)__Pyx_PyInt_AsSignedLong(x);
 }
 
-static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
+static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
+    const signed int neg_one = (signed int)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
     if (sizeof(signed int) < sizeof(long)) {
         long val = __Pyx_PyInt_AsLong(x);
         if (unlikely(val != (long)(signed int)val)) {
             if (!unlikely(val == -1 && PyErr_Occurred())) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (((signed int)-1) > ((signed int)0) && unlikely(val < 0)) ?
+                    (is_unsigned && unlikely(val < 0)) ?
                     "can't convert negative value to signed int" :
                     "value too large to convert to signed int");
             }
@@ -3837,11 +4100,13 @@
     return (signed int)__Pyx_PyInt_AsSignedLong(x);
 }
 
-static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
+static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
+    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
 #if PY_VERSION_HEX < 0x03000000
     if (likely(PyInt_Check(x))) {
         long val = PyInt_AS_LONG(x);
-        if (((unsigned long)-1) > ((unsigned long)0) && unlikely(val < 0)) {
+        if (is_unsigned && unlikely(val < 0)) {
             PyErr_SetString(PyExc_OverflowError,
                             "can't convert negative value to unsigned long");
             return (unsigned long)-1;
@@ -3850,14 +4115,16 @@
     } else
 #endif
     if (likely(PyLong_Check(x))) {
-        if (((unsigned long)-1) > ((unsigned long)0) && unlikely(Py_SIZE(x) < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to unsigned long");
-            return (unsigned long)-1;
+        if (is_unsigned) {
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to unsigned long");
+                return (unsigned long)-1;
+            }
+            return PyLong_AsUnsignedLong(x);
+        } else {
+            return PyLong_AsLong(x);
         }
-        return (((unsigned long)-1) < ((unsigned long)0)) ?
-               PyLong_AsLong(x) :
-               PyLong_AsUnsignedLong(x);
     } else {
         unsigned long val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
@@ -3868,11 +4135,13 @@
     }
 }
 
-static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
+static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
+    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
 #if PY_VERSION_HEX < 0x03000000
     if (likely(PyInt_Check(x))) {
         long val = PyInt_AS_LONG(x);
-        if (((unsigned PY_LONG_LONG)-1) > ((unsigned PY_LONG_LONG)0) && unlikely(val < 0)) {
+        if (is_unsigned && unlikely(val < 0)) {
             PyErr_SetString(PyExc_OverflowError,
                             "can't convert negative value to unsigned PY_LONG_LONG");
             return (unsigned PY_LONG_LONG)-1;
@@ -3881,14 +4150,16 @@
     } else
 #endif
     if (likely(PyLong_Check(x))) {
-        if (((unsigned PY_LONG_LONG)-1) > ((unsigned PY_LONG_LONG)0) && unlikely(Py_SIZE(x) < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to unsigned PY_LONG_LONG");
-            return (unsigned PY_LONG_LONG)-1;
+        if (is_unsigned) {
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to unsigned PY_LONG_LONG");
+                return (unsigned PY_LONG_LONG)-1;
+            }
+            return PyLong_AsUnsignedLongLong(x);
+        } else {
+            return PyLong_AsLongLong(x);
         }
-        return (((unsigned PY_LONG_LONG)-1) < ((unsigned PY_LONG_LONG)0)) ?
-               PyLong_AsLongLong(x) :
-               PyLong_AsUnsignedLongLong(x);
     } else {
         unsigned PY_LONG_LONG val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
@@ -3899,11 +4170,13 @@
     }
 }
 
-static INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
+static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
+    const long neg_one = (long)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
 #if PY_VERSION_HEX < 0x03000000
     if (likely(PyInt_Check(x))) {
         long val = PyInt_AS_LONG(x);
-        if (((long)-1) > ((long)0) && unlikely(val < 0)) {
+        if (is_unsigned && unlikely(val < 0)) {
             PyErr_SetString(PyExc_OverflowError,
                             "can't convert negative value to long");
             return (long)-1;
@@ -3912,14 +4185,16 @@
     } else
 #endif
     if (likely(PyLong_Check(x))) {
-        if (((long)-1) > ((long)0) && unlikely(Py_SIZE(x) < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to long");
-            return (long)-1;
+        if (is_unsigned) {
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to long");
+                return (long)-1;
+            }
+            return PyLong_AsUnsignedLong(x);
+        } else {
+            return PyLong_AsLong(x);
         }
-        return (((long)-1) < ((long)0)) ?
-               PyLong_AsLong(x) :
-               PyLong_AsUnsignedLong(x);
     } else {
         long val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
@@ -3930,11 +4205,13 @@
     }
 }
 
-static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
+static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
+    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
 #if PY_VERSION_HEX < 0x03000000
     if (likely(PyInt_Check(x))) {
         long val = PyInt_AS_LONG(x);
-        if (((PY_LONG_LONG)-1) > ((PY_LONG_LONG)0) && unlikely(val < 0)) {
+        if (is_unsigned && unlikely(val < 0)) {
             PyErr_SetString(PyExc_OverflowError,
                             "can't convert negative value to PY_LONG_LONG");
             return (PY_LONG_LONG)-1;
@@ -3943,14 +4220,16 @@
     } else
 #endif
     if (likely(PyLong_Check(x))) {
-        if (((PY_LONG_LONG)-1) > ((PY_LONG_LONG)0) && unlikely(Py_SIZE(x) < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to PY_LONG_LONG");
-            return (PY_LONG_LONG)-1;
+        if (is_unsigned) {
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to PY_LONG_LONG");
+                return (PY_LONG_LONG)-1;
+            }
+            return PyLong_AsUnsignedLongLong(x);
+        } else {
+            return PyLong_AsLongLong(x);
         }
-        return (((PY_LONG_LONG)-1) < ((PY_LONG_LONG)0)) ?
-               PyLong_AsLongLong(x) :
-               PyLong_AsUnsignedLongLong(x);
     } else {
         PY_LONG_LONG val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
@@ -3961,11 +4240,13 @@
     }
 }
 
-static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
+static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
+    const signed long neg_one = (signed long)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
 #if PY_VERSION_HEX < 0x03000000
     if (likely(PyInt_Check(x))) {
         long val = PyInt_AS_LONG(x);
-        if (((signed long)-1) > ((signed long)0) && unlikely(val < 0)) {
+        if (is_unsigned && unlikely(val < 0)) {
             PyErr_SetString(PyExc_OverflowError,
                             "can't convert negative value to signed long");
             return (signed long)-1;
@@ -3974,14 +4255,16 @@
     } else
 #endif
     if (likely(PyLong_Check(x))) {
-        if (((signed long)-1) > ((signed long)0) && unlikely(Py_SIZE(x) < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to signed long");
-            return (signed long)-1;
+        if (is_unsigned) {
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to signed long");
+                return (signed long)-1;
+            }
+            return PyLong_AsUnsignedLong(x);
+        } else {
+            return PyLong_AsLong(x);
         }
-        return (((signed long)-1) < ((signed long)0)) ?
-               PyLong_AsLong(x) :
-               PyLong_AsUnsignedLong(x);
     } else {
         signed long val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
@@ -3992,11 +4275,13 @@
     }
 }
 
-static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
+static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
+    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
 #if PY_VERSION_HEX < 0x03000000
     if (likely(PyInt_Check(x))) {
         long val = PyInt_AS_LONG(x);
-        if (((signed PY_LONG_LONG)-1) > ((signed PY_LONG_LONG)0) && unlikely(val < 0)) {
+        if (is_unsigned && unlikely(val < 0)) {
             PyErr_SetString(PyExc_OverflowError,
                             "can't convert negative value to signed PY_LONG_LONG");
             return (signed PY_LONG_LONG)-1;
@@ -4005,14 +4290,16 @@
     } else
 #endif
     if (likely(PyLong_Check(x))) {
-        if (((signed PY_LONG_LONG)-1) > ((signed PY_LONG_LONG)0) && unlikely(Py_SIZE(x) < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to signed PY_LONG_LONG");
-            return (signed PY_LONG_LONG)-1;
+        if (is_unsigned) {
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to signed PY_LONG_LONG");
+                return (signed PY_LONG_LONG)-1;
+            }
+            return PyLong_AsUnsignedLongLong(x);
+        } else {
+            return PyLong_AsLongLong(x);
         }
-        return (((signed PY_LONG_LONG)-1) < ((signed PY_LONG_LONG)0)) ?
-               PyLong_AsLongLong(x) :
-               PyLong_AsUnsignedLongLong(x);
     } else {
         signed PY_LONG_LONG val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
@@ -4044,11 +4331,12 @@
 #ifndef __PYX_HAVE_RT_ImportType
 #define __PYX_HAVE_RT_ImportType
 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
-    long size)
+    long size, int strict)
 {
     PyObject *py_module = 0;
     PyObject *result = 0;
     PyObject *py_name = 0;
+    char warning[200];
 
     py_module = __Pyx_ImportModule(module_name);
     if (!py_module)
@@ -4073,9 +4361,15 @@
             module_name, class_name);
         goto bad;
     }
-    if (((PyTypeObject *)result)->tp_basicsize != size) {
+    if (!strict && ((PyTypeObject *)result)->tp_basicsize > size) {
+        PyOS_snprintf(warning, sizeof(warning), 
+            "%s.%s size changed, may indicate binary incompatibility",
+            module_name, class_name);
+        PyErr_WarnEx(NULL, warning, 0);
+    }
+    else if (((PyTypeObject *)result)->tp_basicsize != size) {
         PyErr_Format(PyExc_ValueError, 
-            "%s.%s does not appear to be the correct type object",
+            "%s.%s has the wrong size, try recompiling",
             module_name, class_name);
         goto bad;
     }
@@ -4182,7 +4476,7 @@
 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
     while (t->p) {
         #if PY_MAJOR_VERSION < 3
-        if (t->is_unicode && (!t->is_identifier)) {
+        if (t->is_unicode) {
             *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
         } else if (t->intern) {
             *t->p = PyString_InternFromString(t->s);
@@ -4190,10 +4484,14 @@
             *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
         }
         #else  /* Python 3+ has unicode identifiers */
-        if (t->is_identifier || (t->is_unicode && t->intern)) {
-            *t->p = PyUnicode_InternFromString(t->s);
-        } else if (t->is_unicode) {
-            *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
+        if (t->is_unicode | t->is_str) {
+            if (t->intern) {
+                *t->p = PyUnicode_InternFromString(t->s);
+            } else if (t->encoding) {
+                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
+            } else {
+                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
+            }
         } else {
             *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
         }
@@ -4207,13 +4505,13 @@
 
 /* Type Conversion Functions */
 
-static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
    if (x == Py_True) return 1;
    else if ((x == Py_False) | (x == Py_None)) return 0;
    else return PyObject_IsTrue(x);
 }
 
-static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
   PyNumberMethods *m;
   const char *name = NULL;
   PyObject *res = NULL;
@@ -4259,7 +4557,7 @@
   return res;
 }
 
-static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
   Py_ssize_t ival;
   PyObject* x = PyNumber_Index(b);
   if (!x) return -1;
@@ -4268,7 +4566,7 @@
   return ival;
 }
 
-static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
 #if PY_VERSION_HEX < 0x02050000
    if (ival <= LONG_MAX)
        return PyInt_FromLong((long)ival);
@@ -4282,7 +4580,7 @@
 #endif
 }
 
-static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
+static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
    unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
    if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
        return (size_t)-1;

Modified: trunk/scipy/io/matlab/mio_utils.pyx
===================================================================
--- trunk/scipy/io/matlab/mio_utils.pyx	2010-05-25 05:55:08 UTC (rev 6412)
+++ trunk/scipy/io/matlab/mio_utils.pyx	2010-05-26 19:29:32 UTC (rev 6413)
@@ -14,22 +14,16 @@
     return res
            
 
-cpdef object process_element(cnp.ndarray arr,
-                                  int chars_as_strings = 1,
-                                  int squeeze_me = 0):
-    ''' Return processed object
+cpdef object squeeze_element(cnp.ndarray arr):
+    ''' Return squeezed element
 
     The returned object may not be an ndarray - for example if we do
     ``arr.item`` to return a ``mat_struct`` object from a struct array '''
-    if chars_as_strings and arr.dtype.kind == 'U':
-        arr = chars_to_strings(arr)
-    if squeeze_me:
-        if not arr.size:
-            arr = np.array([])
-        else:
-            arr = np.squeeze(arr)
-            if not arr.shape and arr.dtype.isbuiltin: # 0d coverted to scalar
-                return arr.item()
+    if not arr.size:
+        return np.array([])
+    arr = np.squeeze(arr)
+    if np.isscalar(arr): # 0d coverted to scalar
+        return arr.item()
     return arr
 
 

Modified: trunk/scipy/io/matlab/tests/test_mio_utils.py
===================================================================
--- trunk/scipy/io/matlab/tests/test_mio_utils.py	2010-05-25 05:55:08 UTC (rev 6412)
+++ trunk/scipy/io/matlab/tests/test_mio_utils.py	2010-05-26 19:29:32 UTC (rev 6413)
@@ -9,7 +9,7 @@
 
 from numpy.testing import assert_array_equal, assert_array_almost_equal
 
-from scipy.io.matlab.mio_utils import cproduct, process_element, \
+from scipy.io.matlab.mio_utils import cproduct, squeeze_element, \
     chars_to_strings
 
 
@@ -20,26 +20,19 @@
     yield assert_equal, cproduct([1,3]), 3
 
 
-def test_process_element():
+def test_squeeze_element():
     a = np.zeros((1,3))
-    pa = process_element(a, 0, 0)
-    yield assert_array_equal, a, pa
-    # squeeze; only second arg changes the output
-    yield assert_array_equal, a, process_element(a, 1, 0)
     yield (assert_array_equal,
            np.squeeze(a),
-           process_element(a, 0, 1))
-    # chars as strings
-    strings = ['learn ', 'python', 'fast  ', 'here  ']
-    str_arr = np.array(strings, dtype='U6') # shape (4,)
-    chars = [list(s) for s in strings]
-    char_arr = np.array(chars, dtype='U1') # shape (4,6)
-    pac = process_element(char_arr, 0, 0)
-    yield assert_array_equal, char_arr, pac
-    pac = process_element(char_arr, 1, 0)
-    yield assert_array_equal, str_arr, pac
+           squeeze_element(a))
+    # 0d output from squeeze gives scalar
+    sq_int = squeeze_element(np.zeros((1,1), dtype=np.float))
+    yield assert_true, isinstance(sq_int, float)
+    # Unless it's a structured array
+    sq_sa = squeeze_element(np.zeros((1,1),dtype=[('f1', 'f')]))
+    yield assert_true, isinstance(sq_sa, np.ndarray)
+                                      
     
-    
 def test_chars_strings():
     # chars as strings
     strings = ['learn ', 'python', 'fast  ', 'here  ']




More information about the Scipy-svn mailing list