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

scipy-svn at scipy.org scipy-svn at scipy.org
Tue Jan 25 16:28:43 EST 2011


Author: matthew.brett at gmail.com
Date: 2011-01-25 15:28:41 -0600 (Tue, 25 Jan 2011)
New Revision: 7087

Added:
   trunk/scipy/io/matlab/tests/data/one_by_zero_char.mat
Modified:
   trunk/scipy/io/matlab/mio_utils.c
   trunk/scipy/io/matlab/mio_utils.pyx
   trunk/scipy/io/matlab/tests/test_mio.py
Log:
BF+TEST - fix read of empty char arrays with non-zero leading dimensions - thanks to Simon More

Modified: trunk/scipy/io/matlab/mio_utils.c
===================================================================
--- trunk/scipy/io/matlab/mio_utils.c	2011-01-25 11:13:49 UTC (rev 7086)
+++ trunk/scipy/io/matlab/mio_utils.c	2011-01-25 21:28:41 UTC (rev 7087)
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.13 on Sat Sep 11 22:33:02 2010 */
+/* Generated by Cython 0.13 on Tue Jan 25 13:01:57 2011 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
@@ -775,9 +775,10 @@
 static PyObject *__pyx_n_s__suboffsets;
 static PyObject *__pyx_n_s__type_num;
 static PyObject *__pyx_n_s__view;
+static PyObject *__pyx_int_0;
 static PyObject *__pyx_int_15;
 
-/* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":9
+/* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":9
  * 
  * 
  * cpdef size_t cproduct(tup):             # <<<<<<<<<<<<<<
@@ -796,7 +797,7 @@
   size_t __pyx_t_4;
   __Pyx_RefNannySetupContext("cproduct");
 
-  /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":10
+  /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":10
  * 
  * cpdef size_t cproduct(tup):
  *     cdef size_t res = 1             # <<<<<<<<<<<<<<
@@ -805,7 +806,7 @@
  */
   __pyx_v_res = 1;
 
-  /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":12
+  /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":12
  *     cdef size_t res = 1
  *     cdef int i
  *     for i in range(len(tup)):             # <<<<<<<<<<<<<<
@@ -816,7 +817,7 @@
   for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
     __pyx_v_i = __pyx_t_2;
 
-    /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":13
+    /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":13
  *     cdef int i
  *     for i in range(len(tup)):
  *         res *= tup[i]             # <<<<<<<<<<<<<<
@@ -830,7 +831,7 @@
     __pyx_v_res *= __pyx_t_4;
   }
 
-  /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":14
+  /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":14
  *     for i in range(len(tup)):
  *         res *= tup[i]
  *     return res             # <<<<<<<<<<<<<<
@@ -851,7 +852,7 @@
   return __pyx_r;
 }
 
-/* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":9
+/* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":9
  * 
  * 
  * cpdef size_t cproduct(tup):             # <<<<<<<<<<<<<<
@@ -884,7 +885,7 @@
   return __pyx_r;
 }
 
-/* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":17
+/* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":17
  * 
  * 
  * cpdef object squeeze_element(cnp.ndarray arr):             # <<<<<<<<<<<<<<
@@ -904,7 +905,7 @@
   __Pyx_RefNannySetupContext("squeeze_element");
   __Pyx_INCREF((PyObject *)__pyx_v_arr);
 
-  /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":22
+  /* "/Users/mb312/dev_trees/scipy-work/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 not arr.size:             # <<<<<<<<<<<<<<
@@ -918,7 +919,7 @@
   __pyx_t_3 = (!__pyx_t_2);
   if (__pyx_t_3) {
 
-    /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":23
+    /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":23
  *     ``arr.item`` to return a ``mat_struct`` object from a struct array '''
  *     if not arr.size:
  *         return np.array([])             # <<<<<<<<<<<<<<
@@ -949,7 +950,7 @@
   }
   __pyx_L3:;
 
-  /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":24
+  /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":24
  *     if not arr.size:
  *         return np.array([])
  *     arr = np.squeeze(arr)             # <<<<<<<<<<<<<<
@@ -975,7 +976,7 @@
   __pyx_v_arr = ((PyArrayObject *)__pyx_t_4);
   __pyx_t_4 = 0;
 
-  /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":25
+  /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":25
  *         return np.array([])
  *     arr = np.squeeze(arr)
  *     if not arr.shape and arr.dtype.isbuiltin: # 0d coverted to scalar             # <<<<<<<<<<<<<<
@@ -997,7 +998,7 @@
   }
   if (__pyx_t_6) {
 
-    /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":26
+    /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":26
  *     arr = np.squeeze(arr)
  *     if not arr.shape and arr.dtype.isbuiltin: # 0d coverted to scalar
  *         return arr.item()             # <<<<<<<<<<<<<<
@@ -1017,7 +1018,7 @@
   }
   __pyx_L4:;
 
-  /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":27
+  /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":27
  *     if not arr.shape and arr.dtype.isbuiltin: # 0d coverted to scalar
  *         return arr.item()
  *     return arr             # <<<<<<<<<<<<<<
@@ -1044,7 +1045,7 @@
   return __pyx_r;
 }
 
-/* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":17
+/* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":17
  * 
  * 
  * cpdef object squeeze_element(cnp.ndarray arr):             # <<<<<<<<<<<<<<
@@ -1079,7 +1080,7 @@
   return __pyx_r;
 }
 
-/* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":30
+/* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":30
  * 
  * 
  * cpdef cnp.ndarray chars_to_strings(in_arr):             # <<<<<<<<<<<<<<
@@ -1094,6 +1095,7 @@
   npy_intp *__pyx_v_dims;
   npy_intp __pyx_v_last_dim;
   PyObject *__pyx_v_new_dt_str;
+  PyObject *__pyx_v_out_shape;
   PyArrayObject *__pyx_r = NULL;
   int __pyx_t_1;
   PyObject *__pyx_t_2 = NULL;
@@ -1101,8 +1103,9 @@
   PyObject *__pyx_t_4 = NULL;
   __Pyx_RefNannySetupContext("chars_to_strings");
   __pyx_v_new_dt_str = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_v_out_shape = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":44
+  /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":44
  *        ``arr``
  *     '''
  *     cdef cnp.ndarray arr = in_arr             # <<<<<<<<<<<<<<
@@ -1113,7 +1116,7 @@
   __Pyx_INCREF(__pyx_v_in_arr);
   __pyx_v_arr = ((PyArrayObject *)__pyx_v_in_arr);
 
-  /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":45
+  /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":45
  *     '''
  *     cdef cnp.ndarray arr = in_arr
  *     cdef int ndim = arr.ndim             # <<<<<<<<<<<<<<
@@ -1122,161 +1125,228 @@
  */
   __pyx_v_ndim = __pyx_v_arr->nd;
 
-  /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":46
+  /* "/Users/mb312/dev_trees/scipy-work/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             # <<<<<<<<<<<<<<
  *     cdef cnp.npy_intp last_dim = dims[ndim-1]
- *     cdef object new_dt_str
+ *     cdef object new_dt_str, out_shape
  */
   __pyx_v_dims = __pyx_v_arr->dimensions;
 
-  /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":47
+  /* "/Users/mb312/dev_trees/scipy-work/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]             # <<<<<<<<<<<<<<
- *     cdef object new_dt_str
+ *     cdef object new_dt_str, out_shape
  *     if last_dim == 0: # deal with empty array case
  */
   __pyx_v_last_dim = (__pyx_v_dims[(__pyx_v_ndim - 1)]);
 
-  /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":49
+  /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":49
  *     cdef cnp.npy_intp last_dim = dims[ndim-1]
- *     cdef object new_dt_str
+ *     cdef object new_dt_str, out_shape
  *     if last_dim == 0: # deal with empty array case             # <<<<<<<<<<<<<<
+ *         # Started with U1 - which is OK for us
  *         new_dt_str = arr.dtype.str
- *     else: # make new dtype string with N appended
  */
   __pyx_t_1 = (__pyx_v_last_dim == 0);
   if (__pyx_t_1) {
 
-    /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":50
- *     cdef object new_dt_str
+    /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":51
  *     if last_dim == 0: # deal with empty array case
+ *         # Started with U1 - which is OK for us
  *         new_dt_str = arr.dtype.str             # <<<<<<<<<<<<<<
- *     else: # make new dtype string with N appended
- *         new_dt_str = arr.dtype.str[:-1] + str(last_dim)
+ *         # So far we only know this is an empty array and that the last length is
+ *         # 0.  The other dimensions could be non-zero.  We set the next to last
  */
-    __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_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __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_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__str); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __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);
     __pyx_v_new_dt_str = __pyx_t_3;
     __pyx_t_3 = 0;
+
+    /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":55
+ *         # 0.  The other dimensions could be non-zero.  We set the next to last
+ *         # dimension to zero to signal emptiness
+ *         if ndim == 2:             # <<<<<<<<<<<<<<
+ *             out_shape = (0,)
+ *         else:
+ */
+    __pyx_t_1 = (__pyx_v_ndim == 2);
+    if (__pyx_t_1) {
+
+      /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":56
+ *         # dimension to zero to signal emptiness
+ *         if ndim == 2:
+ *             out_shape = (0,)             # <<<<<<<<<<<<<<
+ *         else:
+ *             out_shape = in_arr.shape[:-2] + (0,)
+ */
+      __pyx_t_3 = PyTuple_New(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_INCREF(__pyx_int_0);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0);
+      __Pyx_GIVEREF(__pyx_int_0);
+      __Pyx_DECREF(__pyx_v_out_shape);
+      __pyx_v_out_shape = __pyx_t_3;
+      __pyx_t_3 = 0;
+      goto __pyx_L4;
+    }
+    /*else*/ {
+
+      /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":58
+ *             out_shape = (0,)
+ *         else:
+ *             out_shape = in_arr.shape[:-2] + (0,)             # <<<<<<<<<<<<<<
+ *     else: # make new dtype string with N appended
+ *         new_dt_str = arr.dtype.str[:-1] + str(last_dim)
+ */
+      __pyx_t_3 = PyObject_GetAttr(__pyx_v_in_arr, __pyx_n_s__shape); 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_t_2 = PySequence_GetSlice(__pyx_t_3, 0, -2); 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(__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 = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_INCREF(__pyx_int_0);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0);
+      __Pyx_GIVEREF(__pyx_int_0);
+      __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_v_out_shape);
+      __pyx_v_out_shape = __pyx_t_4;
+      __pyx_t_4 = 0;
+    }
+    __pyx_L4:;
     goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":52
- *         new_dt_str = arr.dtype.str
+    /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":60
+ *             out_shape = in_arr.shape[:-2] + (0,)
  *     else: # make new dtype string with N appended
  *         new_dt_str = arr.dtype.str[:-1] + str(last_dim)             # <<<<<<<<<<<<<<
+ *         out_shape = in_arr.shape[:-1]
  *     # Copy to deal with F ordered arrays
- *     arr = np.ascontiguousarray(arr)
  */
-    __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_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__dtype); 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_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__str); 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_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_4); __pyx_t_4 = 0;
+    __pyx_t_4 = PySequence_GetSlice(__pyx_t_3, 0, -1); 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_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_t_3 = __Pyx_PyInt_to_py_Py_intptr_t(__pyx_v_last_dim); 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_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(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_3 = 0;
+    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_2, NULL); 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_t_2); __pyx_t_2 = 0;
-    __pyx_t_2 = __Pyx_PyInt_to_py_Py_intptr_t(__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_t_2 = PyNumber_Add(__pyx_t_4, __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_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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_v_new_dt_str);
+    __pyx_v_new_dt_str = __pyx_t_2;
     __pyx_t_2 = 0;
-    __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;}
+
+    /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":61
+ *     else: # make new dtype string with N appended
+ *         new_dt_str = arr.dtype.str[:-1] + str(last_dim)
+ *         out_shape = in_arr.shape[:-1]             # <<<<<<<<<<<<<<
+ *     # Copy to deal with F ordered arrays
+ *     arr = np.ascontiguousarray(arr)
+ */
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_in_arr, __pyx_n_s__shape); 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);
-    __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_t_3 = PySequence_GetSlice(__pyx_t_2, 0, -1); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(__pyx_v_new_dt_str);
-    __pyx_v_new_dt_str = __pyx_t_4;
-    __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_v_out_shape);
+    __pyx_v_out_shape = __pyx_t_3;
+    __pyx_t_3 = 0;
   }
   __pyx_L3:;
 
-  /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":54
- *         new_dt_str = arr.dtype.str[:-1] + str(last_dim)
+  /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":63
+ *         out_shape = in_arr.shape[:-1]
  *     # Copy to deal with F ordered arrays
  *     arr = np.ascontiguousarray(arr)             # <<<<<<<<<<<<<<
  *     arr = arr.view(new_dt_str)
- *     return arr.reshape(in_arr.shape[:-1])
+ *     return arr.reshape(out_shape)
  */
-  __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_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __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_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 = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(((PyObject *)__pyx_v_arr));
-  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_arr));
+  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_arr));
   __Pyx_GIVEREF(((PyObject *)__pyx_v_arr));
-  __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_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
   __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(__pyx_t_3); __pyx_t_3 = 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 = 63; __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_4);
+  __pyx_t_4 = 0;
 
-  /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":55
+  /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":64
  *     # Copy to deal with F ordered arrays
  *     arr = np.ascontiguousarray(arr)
  *     arr = arr.view(new_dt_str)             # <<<<<<<<<<<<<<
- *     return arr.reshape(in_arr.shape[:-1])
+ *     return arr.reshape(out_shape)
  */
-  __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_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__view); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __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 = 64; __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_INCREF(__pyx_v_new_dt_str);
-  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_new_dt_str);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_new_dt_str);
   __Pyx_GIVEREF(__pyx_v_new_dt_str);
-  __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_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __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_DECREF(__pyx_t_4); __pyx_t_4 = 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 = 55; __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 = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(((PyObject *)__pyx_v_arr));
   __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
   __pyx_t_2 = 0;
 
-  /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":56
+  /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":65
  *     arr = np.ascontiguousarray(arr)
  *     arr = arr.view(new_dt_str)
- *     return arr.reshape(in_arr.shape[:-1])             # <<<<<<<<<<<<<<
+ *     return arr.reshape(out_shape)             # <<<<<<<<<<<<<<
  */
   __Pyx_XDECREF(((PyObject *)__pyx_r));
-  __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_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__reshape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __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_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __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_INCREF(__pyx_v_out_shape);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_out_shape);
+  __Pyx_GIVEREF(__pyx_v_out_shape);
+  __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __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_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;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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 = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = ((PyArrayObject *)__pyx_t_4);
+  __pyx_t_4 = 0;
   goto __pyx_L0;
 
   __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
@@ -1290,12 +1360,13 @@
   __pyx_L0:;
   __Pyx_XDECREF((PyObject *)__pyx_v_arr);
   __Pyx_DECREF(__pyx_v_new_dt_str);
+  __Pyx_DECREF(__pyx_v_out_shape);
   __Pyx_XGIVEREF((PyObject *)__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":30
+/* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":30
  * 
  * 
  * cpdef cnp.ndarray chars_to_strings(in_arr):             # <<<<<<<<<<<<<<
@@ -1304,7 +1375,7 @@
  */
 
 static PyObject *__pyx_pf_5scipy_2io_6matlab_9mio_utils_chars_to_strings(PyObject *__pyx_self, PyObject *__pyx_v_in_arr); /*proto*/
-static char __pyx_doc_5scipy_2io_6matlab_9mio_utils_chars_to_strings[] = " Convert final axis of char array to strings\n\n    Parameters\n    ----------\n    in_arr : array\n       dtype of 'U1'\n       \n    Returns\n    -------\n    str_arr : array\n       dtype of 'UN' where N is the length of the last dimension of\n       ``arr``\n    ";
+static char __pyx_doc_5scipy_2io_6matlab_9mio_utils_chars_to_strings[] = " Convert final axis of char array to strings\n\n    Parameters\n    ----------\n    in_arr : array\n       dtype of 'U1'\n\n    Returns\n    -------\n    str_arr : array\n       dtype of 'UN' where N is the length of the last dimension of\n       ``arr``\n    ";
 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;
@@ -1329,7 +1400,7 @@
   return __pyx_r;
 }
 
-/* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":188
+/* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":188
  *         # experimental exception made for __getbuffer__ and __releasebuffer__
  *         # -- the details of this may change.
  *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
@@ -1364,7 +1435,7 @@
   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
   __Pyx_GIVEREF(__pyx_v_info->obj);
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":194
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":194
  *             # of flags
  *             cdef int copy_shape, i, ndim
  *             cdef int endian_detector = 1             # <<<<<<<<<<<<<<
@@ -1373,7 +1444,7 @@
  */
   __pyx_v_endian_detector = 1;
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":195
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":195
  *             cdef int copy_shape, i, ndim
  *             cdef int endian_detector = 1
  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
@@ -1382,7 +1453,7 @@
  */
   __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":197
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":197
  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
  * 
  *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
@@ -1391,7 +1462,7 @@
  */
   __pyx_v_ndim = PyArray_NDIM(((PyArrayObject *)__pyx_v_self));
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":199
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":199
  *             ndim = PyArray_NDIM(self)
  * 
  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
@@ -1401,7 +1472,7 @@
   __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
   if (__pyx_t_1) {
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":200
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":200
  * 
  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
  *                 copy_shape = 1             # <<<<<<<<<<<<<<
@@ -1413,7 +1484,7 @@
   }
   /*else*/ {
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":202
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":202
  *                 copy_shape = 1
  *             else:
  *                 copy_shape = 0             # <<<<<<<<<<<<<<
@@ -1424,7 +1495,7 @@
   }
   __pyx_L5:;
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":204
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":204
  *                 copy_shape = 0
  * 
  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
@@ -1434,7 +1505,7 @@
   __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS);
   if (__pyx_t_1) {
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":205
+    /* "/Users/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)):             # <<<<<<<<<<<<<<
@@ -1448,7 +1519,7 @@
   }
   if (__pyx_t_3) {
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":206
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":206
  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
  *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
  *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
@@ -1470,7 +1541,7 @@
   }
   __pyx_L6:;
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":208
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":208
  *                 raise ValueError(u"ndarray is not C contiguous")
  * 
  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
@@ -1480,7 +1551,7 @@
   __pyx_t_3 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS);
   if (__pyx_t_3) {
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":209
+    /* "/Users/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)):             # <<<<<<<<<<<<<<
@@ -1494,7 +1565,7 @@
   }
   if (__pyx_t_2) {
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":210
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":210
  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
  *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
  *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
@@ -1516,7 +1587,7 @@
   }
   __pyx_L7:;
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":212
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":212
  *                 raise ValueError(u"ndarray is not Fortran contiguous")
  * 
  *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
@@ -1525,7 +1596,7 @@
  */
   __pyx_v_info->buf = PyArray_DATA(((PyArrayObject *)__pyx_v_self));
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":213
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":213
  * 
  *             info.buf = PyArray_DATA(self)
  *             info.ndim = ndim             # <<<<<<<<<<<<<<
@@ -1534,7 +1605,7 @@
  */
   __pyx_v_info->ndim = __pyx_v_ndim;
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":214
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":214
  *             info.buf = PyArray_DATA(self)
  *             info.ndim = ndim
  *             if copy_shape:             # <<<<<<<<<<<<<<
@@ -1543,7 +1614,7 @@
  */
   if (__pyx_v_copy_shape) {
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":217
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":217
  *                 # 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)             # <<<<<<<<<<<<<<
@@ -1552,7 +1623,7 @@
  */
     __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * __pyx_v_ndim) * 2)));
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":218
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":218
  *                 # as one block, strides first.
  *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)
  *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
@@ -1561,7 +1632,7 @@
  */
     __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":219
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":219
  *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)
  *                 info.shape = info.strides + ndim
  *                 for i in range(ndim):             # <<<<<<<<<<<<<<
@@ -1572,7 +1643,7 @@
     for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
       __pyx_v_i = __pyx_t_7;
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":220
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":220
  *                 info.shape = info.strides + ndim
  *                 for i in range(ndim):
  *                     info.strides[i] = PyArray_STRIDES(self)[i]             # <<<<<<<<<<<<<<
@@ -1581,7 +1652,7 @@
  */
       (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(((PyArrayObject *)__pyx_v_self))[__pyx_v_i]);
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":221
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":221
  *                 for i in range(ndim):
  *                     info.strides[i] = PyArray_STRIDES(self)[i]
  *                     info.shape[i] = PyArray_DIMS(self)[i]             # <<<<<<<<<<<<<<
@@ -1594,7 +1665,7 @@
   }
   /*else*/ {
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":223
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":223
  *                     info.shape[i] = PyArray_DIMS(self)[i]
  *             else:
  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
@@ -1603,7 +1674,7 @@
  */
     __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(((PyArrayObject *)__pyx_v_self)));
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":224
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":224
  *             else:
  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)             # <<<<<<<<<<<<<<
@@ -1614,7 +1685,7 @@
   }
   __pyx_L8:;
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":225
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":225
  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
  *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
@@ -1623,7 +1694,7 @@
  */
   __pyx_v_info->suboffsets = NULL;
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":226
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":226
  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
  *             info.suboffsets = NULL
  *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
@@ -1632,7 +1703,7 @@
  */
   __pyx_v_info->itemsize = PyArray_ITEMSIZE(((PyArrayObject *)__pyx_v_self));
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":227
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":227
  *             info.suboffsets = NULL
  *             info.itemsize = PyArray_ITEMSIZE(self)
  *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
@@ -1641,7 +1712,7 @@
  */
   __pyx_v_info->readonly = (!PyArray_ISWRITEABLE(((PyArrayObject *)__pyx_v_self)));
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":230
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":230
  * 
  *             cdef int t
  *             cdef char* f = NULL             # <<<<<<<<<<<<<<
@@ -1650,7 +1721,7 @@
  */
   __pyx_v_f = NULL;
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":231
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":231
  *             cdef int t
  *             cdef char* f = NULL
  *             cdef dtype descr = self.descr             # <<<<<<<<<<<<<<
@@ -1660,7 +1731,7 @@
   __Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_self)->descr));
   __pyx_v_descr = ((PyArrayObject *)__pyx_v_self)->descr;
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":235
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":235
  *             cdef int offset
  * 
  *             cdef bint hasfields = PyDataType_HASFIELDS(descr)             # <<<<<<<<<<<<<<
@@ -1669,7 +1740,7 @@
  */
   __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":237
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":237
  *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
  * 
  *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
@@ -1685,7 +1756,7 @@
   }
   if (__pyx_t_1) {
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":239
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":239
  *             if not hasfields and not copy_shape:
  *                 # do not call releasebuffer
  *                 info.obj = None             # <<<<<<<<<<<<<<
@@ -1701,7 +1772,7 @@
   }
   /*else*/ {
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":242
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":242
  *             else:
  *                 # need to call releasebuffer
  *                 info.obj = self             # <<<<<<<<<<<<<<
@@ -1716,7 +1787,7 @@
   }
   __pyx_L11:;
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":244
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":244
  *                 info.obj = self
  * 
  *             if not hasfields:             # <<<<<<<<<<<<<<
@@ -1726,7 +1797,7 @@
   __pyx_t_1 = (!__pyx_v_hasfields);
   if (__pyx_t_1) {
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":245
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":245
  * 
  *             if not hasfields:
  *                 t = descr.type_num             # <<<<<<<<<<<<<<
@@ -1735,7 +1806,7 @@
  */
     __pyx_v_t = __pyx_v_descr->type_num;
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":246
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":246
  *             if not hasfields:
  *                 t = descr.type_num
  *                 if ((descr.byteorder == '>' and little_endian) or             # <<<<<<<<<<<<<<
@@ -1750,7 +1821,7 @@
     }
     if (!__pyx_t_2) {
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":247
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":247
  *                 t = descr.type_num
  *                 if ((descr.byteorder == '>' and little_endian) or
  *                     (descr.byteorder == '<' and not little_endian)):             # <<<<<<<<<<<<<<
@@ -1770,7 +1841,7 @@
     }
     if (__pyx_t_1) {
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":248
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":248
  *                 if ((descr.byteorder == '>' and little_endian) or
  *                     (descr.byteorder == '<' and not little_endian)):
  *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
@@ -1792,7 +1863,7 @@
     }
     __pyx_L13:;
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":249
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":249
  *                     (descr.byteorder == '<' and not little_endian)):
  *                     raise ValueError(u"Non-native byte order not supported")
  *                 if   t == NPY_BYTE:        f = "b"             # <<<<<<<<<<<<<<
@@ -1805,7 +1876,7 @@
       goto __pyx_L14;
     }
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":250
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":250
  *                     raise ValueError(u"Non-native byte order not supported")
  *                 if   t == NPY_BYTE:        f = "b"
  *                 elif t == NPY_UBYTE:       f = "B"             # <<<<<<<<<<<<<<
@@ -1818,7 +1889,7 @@
       goto __pyx_L14;
     }
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":251
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":251
  *                 if   t == NPY_BYTE:        f = "b"
  *                 elif t == NPY_UBYTE:       f = "B"
  *                 elif t == NPY_SHORT:       f = "h"             # <<<<<<<<<<<<<<
@@ -1831,7 +1902,7 @@
       goto __pyx_L14;
     }
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":252
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":252
  *                 elif t == NPY_UBYTE:       f = "B"
  *                 elif t == NPY_SHORT:       f = "h"
  *                 elif t == NPY_USHORT:      f = "H"             # <<<<<<<<<<<<<<
@@ -1844,7 +1915,7 @@
       goto __pyx_L14;
     }
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":253
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":253
  *                 elif t == NPY_SHORT:       f = "h"
  *                 elif t == NPY_USHORT:      f = "H"
  *                 elif t == NPY_INT:         f = "i"             # <<<<<<<<<<<<<<
@@ -1857,7 +1928,7 @@
       goto __pyx_L14;
     }
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":254
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":254
  *                 elif t == NPY_USHORT:      f = "H"
  *                 elif t == NPY_INT:         f = "i"
  *                 elif t == NPY_UINT:        f = "I"             # <<<<<<<<<<<<<<
@@ -1870,7 +1941,7 @@
       goto __pyx_L14;
     }
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":255
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":255
  *                 elif t == NPY_INT:         f = "i"
  *                 elif t == NPY_UINT:        f = "I"
  *                 elif t == NPY_LONG:        f = "l"             # <<<<<<<<<<<<<<
@@ -1883,7 +1954,7 @@
       goto __pyx_L14;
     }
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":256
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":256
  *                 elif t == NPY_UINT:        f = "I"
  *                 elif t == NPY_LONG:        f = "l"
  *                 elif t == NPY_ULONG:       f = "L"             # <<<<<<<<<<<<<<
@@ -1896,7 +1967,7 @@
       goto __pyx_L14;
     }
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":257
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":257
  *                 elif t == NPY_LONG:        f = "l"
  *                 elif t == NPY_ULONG:       f = "L"
  *                 elif t == NPY_LONGLONG:    f = "q"             # <<<<<<<<<<<<<<
@@ -1909,7 +1980,7 @@
       goto __pyx_L14;
     }
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":258
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":258
  *                 elif t == NPY_ULONG:       f = "L"
  *                 elif t == NPY_LONGLONG:    f = "q"
  *                 elif t == NPY_ULONGLONG:   f = "Q"             # <<<<<<<<<<<<<<
@@ -1922,7 +1993,7 @@
       goto __pyx_L14;
     }
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":259
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":259
  *                 elif t == NPY_LONGLONG:    f = "q"
  *                 elif t == NPY_ULONGLONG:   f = "Q"
  *                 elif t == NPY_FLOAT:       f = "f"             # <<<<<<<<<<<<<<
@@ -1935,7 +2006,7 @@
       goto __pyx_L14;
     }
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":260
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":260
  *                 elif t == NPY_ULONGLONG:   f = "Q"
  *                 elif t == NPY_FLOAT:       f = "f"
  *                 elif t == NPY_DOUBLE:      f = "d"             # <<<<<<<<<<<<<<
@@ -1948,7 +2019,7 @@
       goto __pyx_L14;
     }
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":261
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":261
  *                 elif t == NPY_FLOAT:       f = "f"
  *                 elif t == NPY_DOUBLE:      f = "d"
  *                 elif t == NPY_LONGDOUBLE:  f = "g"             # <<<<<<<<<<<<<<
@@ -1961,7 +2032,7 @@
       goto __pyx_L14;
     }
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":262
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":262
  *                 elif t == NPY_DOUBLE:      f = "d"
  *                 elif t == NPY_LONGDOUBLE:  f = "g"
  *                 elif t == NPY_CFLOAT:      f = "Zf"             # <<<<<<<<<<<<<<
@@ -1974,7 +2045,7 @@
       goto __pyx_L14;
     }
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":263
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":263
  *                 elif t == NPY_LONGDOUBLE:  f = "g"
  *                 elif t == NPY_CFLOAT:      f = "Zf"
  *                 elif t == NPY_CDOUBLE:     f = "Zd"             # <<<<<<<<<<<<<<
@@ -1987,7 +2058,7 @@
       goto __pyx_L14;
     }
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":264
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":264
  *                 elif t == NPY_CFLOAT:      f = "Zf"
  *                 elif t == NPY_CDOUBLE:     f = "Zd"
  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"             # <<<<<<<<<<<<<<
@@ -2000,7 +2071,7 @@
       goto __pyx_L14;
     }
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":265
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":265
  *                 elif t == NPY_CDOUBLE:     f = "Zd"
  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
  *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
@@ -2014,7 +2085,7 @@
     }
     /*else*/ {
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":267
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":267
  *                 elif t == NPY_OBJECT:      f = "O"
  *                 else:
  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
@@ -2040,7 +2111,7 @@
     }
     __pyx_L14:;
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":268
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":268
  *                 else:
  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
  *                 info.format = f             # <<<<<<<<<<<<<<
@@ -2049,7 +2120,7 @@
  */
     __pyx_v_info->format = __pyx_v_f;
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":269
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":269
  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
  *                 info.format = f
  *                 return             # <<<<<<<<<<<<<<
@@ -2062,7 +2133,7 @@
   }
   /*else*/ {
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":271
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":271
  *                 return
  *             else:
  *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)             # <<<<<<<<<<<<<<
@@ -2071,7 +2142,7 @@
  */
     __pyx_v_info->format = ((char *)malloc(255));
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":272
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":272
  *             else:
  *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
  *                 info.format[0] = '^' # Native data types, manual alignment             # <<<<<<<<<<<<<<
@@ -2080,7 +2151,7 @@
  */
     (__pyx_v_info->format[0]) = '^';
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":273
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":273
  *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
  *                 info.format[0] = '^' # Native data types, manual alignment
  *                 offset = 0             # <<<<<<<<<<<<<<
@@ -2089,7 +2160,7 @@
  */
     __pyx_v_offset = 0;
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":276
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":276
  *                 f = _util_dtypestring(descr, info.format + 1,
  *                                       info.format + _buffer_format_string_len,
  *                                       &offset)             # <<<<<<<<<<<<<<
@@ -2099,7 +2170,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 = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_v_f = __pyx_t_9;
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":277
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":277
  *                                       info.format + _buffer_format_string_len,
  *                                       &offset)
  *                 f[0] = 0 # Terminate format string             # <<<<<<<<<<<<<<
@@ -2131,7 +2202,7 @@
   return __pyx_r;
 }
 
-/* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":279
+/* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":279
  *                 f[0] = 0 # Terminate format string
  * 
  *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
@@ -2144,7 +2215,7 @@
   int __pyx_t_1;
   __Pyx_RefNannySetupContext("__releasebuffer__");
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":280
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":280
  * 
  *         def __releasebuffer__(ndarray self, Py_buffer* info):
  *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
@@ -2154,7 +2225,7 @@
   __pyx_t_1 = PyArray_HASFIELDS(((PyArrayObject *)__pyx_v_self));
   if (__pyx_t_1) {
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":281
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":281
  *         def __releasebuffer__(ndarray self, Py_buffer* info):
  *             if PyArray_HASFIELDS(self):
  *                 stdlib.free(info.format)             # <<<<<<<<<<<<<<
@@ -2166,7 +2237,7 @@
   }
   __pyx_L5:;
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":282
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":282
  *             if PyArray_HASFIELDS(self):
  *                 stdlib.free(info.format)
  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
@@ -2176,7 +2247,7 @@
   __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
   if (__pyx_t_1) {
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":283
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":283
  *                 stdlib.free(info.format)
  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
  *                 stdlib.free(info.strides)             # <<<<<<<<<<<<<<
@@ -2191,7 +2262,7 @@
   __Pyx_RefNannyFinishContext();
 }
 
-/* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":756
+/* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":756
  * ctypedef npy_cdouble     complex_t
  * 
  * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
@@ -2204,7 +2275,7 @@
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("PyArray_MultiIterNew1");
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":757
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":757
  * 
  * cdef inline object PyArray_MultiIterNew1(a):
  *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
@@ -2230,7 +2301,7 @@
   return __pyx_r;
 }
 
-/* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":759
+/* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":759
  *     return PyArray_MultiIterNew(1, <void*>a)
  * 
  * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
@@ -2243,7 +2314,7 @@
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("PyArray_MultiIterNew2");
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":760
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":760
  * 
  * cdef inline object PyArray_MultiIterNew2(a, b):
  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
@@ -2269,7 +2340,7 @@
   return __pyx_r;
 }
 
-/* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":762
+/* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":762
  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
  * 
  * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
@@ -2282,7 +2353,7 @@
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("PyArray_MultiIterNew3");
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":763
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":763
  * 
  * cdef inline object PyArray_MultiIterNew3(a, b, c):
  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
@@ -2308,7 +2379,7 @@
   return __pyx_r;
 }
 
-/* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":765
+/* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":765
  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
  * 
  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
@@ -2321,7 +2392,7 @@
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("PyArray_MultiIterNew4");
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":766
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":766
  * 
  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
@@ -2347,7 +2418,7 @@
   return __pyx_r;
 }
 
-/* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":768
+/* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":768
  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
  * 
  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
@@ -2360,7 +2431,7 @@
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("PyArray_MultiIterNew5");
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":769
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":769
  * 
  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
@@ -2386,7 +2457,7 @@
   return __pyx_r;
 }
 
-/* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":771
+/* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":771
  *     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:             # <<<<<<<<<<<<<<
@@ -2420,7 +2491,7 @@
   __pyx_v_new_offset = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_t = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":778
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":778
  *     cdef int delta_offset
  *     cdef tuple i
  *     cdef int endian_detector = 1             # <<<<<<<<<<<<<<
@@ -2429,7 +2500,7 @@
  */
   __pyx_v_endian_detector = 1;
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":779
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":779
  *     cdef tuple i
  *     cdef int endian_detector = 1
  *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
@@ -2438,7 +2509,7 @@
  */
   __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":782
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":782
  *     cdef tuple fields
  * 
  *     for childname in descr.names:             # <<<<<<<<<<<<<<
@@ -2457,7 +2528,7 @@
     __pyx_v_childname = __pyx_t_3;
     __pyx_t_3 = 0;
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":783
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":783
  * 
  *     for childname in descr.names:
  *         fields = descr.fields[childname]             # <<<<<<<<<<<<<<
@@ -2471,7 +2542,7 @@
     __pyx_v_fields = ((PyObject *)__pyx_t_3);
     __pyx_t_3 = 0;
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":784
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":784
  *     for childname in descr.names:
  *         fields = descr.fields[childname]
  *         child, new_offset = fields             # <<<<<<<<<<<<<<
@@ -2494,7 +2565,7 @@
       {__pyx_filename = __pyx_f[1]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":786
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":786
  *         child, new_offset = fields
  * 
  *         if (end - f) - (new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
@@ -2519,7 +2590,7 @@
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     if (__pyx_t_6) {
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":787
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":787
  * 
  *         if (end - f) - (new_offset - offset[0]) < 15:
  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
@@ -2541,7 +2612,7 @@
     }
     __pyx_L5:;
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":789
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":789
  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
  * 
  *         if ((child.byteorder == '>' and little_endian) or             # <<<<<<<<<<<<<<
@@ -2556,7 +2627,7 @@
     }
     if (!__pyx_t_7) {
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":790
+      /* "/Users/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)):             # <<<<<<<<<<<<<<
@@ -2576,7 +2647,7 @@
     }
     if (__pyx_t_6) {
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":791
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":791
  *         if ((child.byteorder == '>' and little_endian) or
  *             (child.byteorder == '<' and not little_endian)):
  *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
@@ -2598,7 +2669,7 @@
     }
     __pyx_L6:;
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":801
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":801
  * 
  *         # Output padding bytes
  *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
@@ -2615,7 +2686,7 @@
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
       if (!__pyx_t_6) break;
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":802
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":802
  *         # Output padding bytes
  *         while offset[0] < new_offset:
  *             f[0] = 120 # "x"; pad byte             # <<<<<<<<<<<<<<
@@ -2624,7 +2695,7 @@
  */
       (__pyx_v_f[0]) = 120;
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":803
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":803
  *         while offset[0] < new_offset:
  *             f[0] = 120 # "x"; pad byte
  *             f += 1             # <<<<<<<<<<<<<<
@@ -2633,7 +2704,7 @@
  */
       __pyx_v_f += 1;
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":804
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":804
  *             f[0] = 120 # "x"; pad byte
  *             f += 1
  *             offset[0] += 1             # <<<<<<<<<<<<<<
@@ -2643,7 +2714,7 @@
       (__pyx_v_offset[0]) += 1;
     }
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":806
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":806
  *             offset[0] += 1
  * 
  *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
@@ -2652,7 +2723,7 @@
  */
     (__pyx_v_offset[0]) += __pyx_v_child->elsize;
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":808
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":808
  *         offset[0] += child.itemsize
  * 
  *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
@@ -2662,7 +2733,7 @@
     __pyx_t_6 = (!PyDataType_HASFIELDS(__pyx_v_child));
     if (__pyx_t_6) {
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":809
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":809
  * 
  *         if not PyDataType_HASFIELDS(child):
  *             t = child.type_num             # <<<<<<<<<<<<<<
@@ -2675,7 +2746,7 @@
       __pyx_v_t = __pyx_t_3;
       __pyx_t_3 = 0;
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":810
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":810
  *         if not PyDataType_HASFIELDS(child):
  *             t = child.type_num
  *             if end - f < 5:             # <<<<<<<<<<<<<<
@@ -2685,7 +2756,7 @@
       __pyx_t_6 = ((__pyx_v_end - __pyx_v_f) < 5);
       if (__pyx_t_6) {
 
-        /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":811
+        /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":811
  *             t = child.type_num
  *             if end - f < 5:
  *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
@@ -2707,7 +2778,7 @@
       }
       __pyx_L10:;
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":814
+      /* "/Users/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"             # <<<<<<<<<<<<<<
@@ -2726,7 +2797,7 @@
         goto __pyx_L11;
       }
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":815
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":815
  *             # 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"             # <<<<<<<<<<<<<<
@@ -2745,7 +2816,7 @@
         goto __pyx_L11;
       }
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":816
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":816
  *             if   t == NPY_BYTE:        f[0] =  98 #"b"
  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
  *             elif t == NPY_SHORT:       f[0] = 104 #"h"             # <<<<<<<<<<<<<<
@@ -2764,7 +2835,7 @@
         goto __pyx_L11;
       }
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":817
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":817
  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
  *             elif t == NPY_USHORT:      f[0] =  72 #"H"             # <<<<<<<<<<<<<<
@@ -2783,7 +2854,7 @@
         goto __pyx_L11;
       }
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":818
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":818
  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
  *             elif t == NPY_INT:         f[0] = 105 #"i"             # <<<<<<<<<<<<<<
@@ -2802,7 +2873,7 @@
         goto __pyx_L11;
       }
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":819
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":819
  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
  *             elif t == NPY_INT:         f[0] = 105 #"i"
  *             elif t == NPY_UINT:        f[0] =  73 #"I"             # <<<<<<<<<<<<<<
@@ -2821,7 +2892,7 @@
         goto __pyx_L11;
       }
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":820
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":820
  *             elif t == NPY_INT:         f[0] = 105 #"i"
  *             elif t == NPY_UINT:        f[0] =  73 #"I"
  *             elif t == NPY_LONG:        f[0] = 108 #"l"             # <<<<<<<<<<<<<<
@@ -2840,7 +2911,7 @@
         goto __pyx_L11;
       }
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":821
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":821
  *             elif t == NPY_UINT:        f[0] =  73 #"I"
  *             elif t == NPY_LONG:        f[0] = 108 #"l"
  *             elif t == NPY_ULONG:       f[0] = 76  #"L"             # <<<<<<<<<<<<<<
@@ -2859,7 +2930,7 @@
         goto __pyx_L11;
       }
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":822
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":822
  *             elif t == NPY_LONG:        f[0] = 108 #"l"
  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"             # <<<<<<<<<<<<<<
@@ -2878,7 +2949,7 @@
         goto __pyx_L11;
       }
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":823
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":823
  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"             # <<<<<<<<<<<<<<
@@ -2897,7 +2968,7 @@
         goto __pyx_L11;
       }
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":824
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":824
  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"             # <<<<<<<<<<<<<<
@@ -2916,7 +2987,7 @@
         goto __pyx_L11;
       }
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":825
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":825
  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"             # <<<<<<<<<<<<<<
@@ -2935,7 +3006,7 @@
         goto __pyx_L11;
       }
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":826
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":826
  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"             # <<<<<<<<<<<<<<
@@ -2954,7 +3025,7 @@
         goto __pyx_L11;
       }
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":827
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":827
  *             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             # <<<<<<<<<<<<<<
@@ -2975,7 +3046,7 @@
         goto __pyx_L11;
       }
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":828
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":828
  *             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             # <<<<<<<<<<<<<<
@@ -2996,7 +3067,7 @@
         goto __pyx_L11;
       }
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":829
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":829
  *             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             # <<<<<<<<<<<<<<
@@ -3017,7 +3088,7 @@
         goto __pyx_L11;
       }
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":830
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":830
  *             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"             # <<<<<<<<<<<<<<
@@ -3037,7 +3108,7 @@
       }
       /*else*/ {
 
-        /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":832
+        /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":832
  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
  *             else:
  *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
@@ -3060,7 +3131,7 @@
       }
       __pyx_L11:;
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":833
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":833
  *             else:
  *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
  *             f += 1             # <<<<<<<<<<<<<<
@@ -3072,7 +3143,7 @@
     }
     /*else*/ {
 
-      /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":837
+      /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":837
  *             # Cython ignores struct boundary information ("T{...}"),
  *             # so don't output it
  *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
@@ -3086,7 +3157,7 @@
   }
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":838
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":838
  *             # so don't output it
  *             f = _util_dtypestring(child, f, end, offset)
  *     return f             # <<<<<<<<<<<<<<
@@ -3115,7 +3186,7 @@
   return __pyx_r;
 }
 
-/* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":953
+/* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":953
  * 
  * 
  * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
@@ -3128,7 +3199,7 @@
   int __pyx_t_1;
   __Pyx_RefNannySetupContext("set_array_base");
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":955
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":955
  * cdef inline void set_array_base(ndarray arr, object base):
  *      cdef PyObject* baseptr
  *      if base is None:             # <<<<<<<<<<<<<<
@@ -3138,7 +3209,7 @@
   __pyx_t_1 = (__pyx_v_base == Py_None);
   if (__pyx_t_1) {
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":956
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":956
  *      cdef PyObject* baseptr
  *      if base is None:
  *          baseptr = NULL             # <<<<<<<<<<<<<<
@@ -3150,7 +3221,7 @@
   }
   /*else*/ {
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":958
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":958
  *          baseptr = NULL
  *      else:
  *          Py_INCREF(base) # important to do this before decref below!             # <<<<<<<<<<<<<<
@@ -3159,7 +3230,7 @@
  */
     Py_INCREF(__pyx_v_base);
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":959
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":959
  *      else:
  *          Py_INCREF(base) # important to do this before decref below!
  *          baseptr = <PyObject*>base             # <<<<<<<<<<<<<<
@@ -3170,7 +3241,7 @@
   }
   __pyx_L3:;
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":960
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":960
  *          Py_INCREF(base) # important to do this before decref below!
  *          baseptr = <PyObject*>base
  *      Py_XDECREF(arr.base)             # <<<<<<<<<<<<<<
@@ -3179,7 +3250,7 @@
  */
   Py_XDECREF(__pyx_v_arr->base);
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":961
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":961
  *          baseptr = <PyObject*>base
  *      Py_XDECREF(arr.base)
  *      arr.base = baseptr             # <<<<<<<<<<<<<<
@@ -3191,7 +3262,7 @@
   __Pyx_RefNannyFinishContext();
 }
 
-/* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":963
+/* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":963
  *      arr.base = baseptr
  * 
  * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
@@ -3204,7 +3275,7 @@
   int __pyx_t_1;
   __Pyx_RefNannySetupContext("get_array_base");
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":964
+  /* "/Users/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:             # <<<<<<<<<<<<<<
@@ -3214,7 +3285,7 @@
   __pyx_t_1 = (__pyx_v_arr->base == NULL);
   if (__pyx_t_1) {
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":965
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":965
  * cdef inline object get_array_base(ndarray arr):
  *     if arr.base is NULL:
  *         return None             # <<<<<<<<<<<<<<
@@ -3229,7 +3300,7 @@
   }
   /*else*/ {
 
-    /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":967
+    /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":967
  *         return None
  *     else:
  *         return <object>arr.base             # <<<<<<<<<<<<<<
@@ -3325,6 +3396,7 @@
 
 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_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_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;};
   return 0;
   __pyx_L1_error:;
@@ -3397,7 +3469,7 @@
   /*--- Function import code ---*/
   /*--- Execution code ---*/
 
-  /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":5
+  /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":5
  * '''
  * 
  * import numpy as np             # <<<<<<<<<<<<<<
@@ -3409,7 +3481,7 @@
   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;
 
-  /* "/home/pauli/wrk/scipy/scipy/scipy/io/matlab/mio_utils.pyx":1
+  /* "/Users/mb312/dev_trees/scipy-work/scipy/io/matlab/mio_utils.pyx":1
  * # -*- python -*- like file             # <<<<<<<<<<<<<<
  * ''' Utilities for generic processing of return arrays from read
  * '''
@@ -3433,7 +3505,7 @@
   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;
 
-  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-i686.egg/Cython/Includes/numpy.pxd":963
+  /* "/Users/mb312/usr/local/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":963
  *      arr.base = baseptr
  * 
  * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<

Modified: trunk/scipy/io/matlab/mio_utils.pyx
===================================================================
--- trunk/scipy/io/matlab/mio_utils.pyx	2011-01-25 11:13:49 UTC (rev 7086)
+++ trunk/scipy/io/matlab/mio_utils.pyx	2011-01-25 21:28:41 UTC (rev 7087)
@@ -12,8 +12,8 @@
     for i in range(len(tup)):
         res *= tup[i]
     return res
-           
 
+
 cpdef object squeeze_element(cnp.ndarray arr):
     ''' Return squeezed element
 
@@ -34,7 +34,7 @@
     ----------
     in_arr : array
        dtype of 'U1'
-       
+
     Returns
     -------
     str_arr : array
@@ -45,12 +45,21 @@
     cdef int ndim = arr.ndim
     cdef cnp.npy_intp *dims = arr.shape
     cdef cnp.npy_intp last_dim = dims[ndim-1]
-    cdef object new_dt_str
+    cdef object new_dt_str, out_shape
     if last_dim == 0: # deal with empty array case
+        # Started with U1 - which is OK for us
         new_dt_str = arr.dtype.str
+        # So far we only know this is an empty array and that the last length is
+        # 0.  The other dimensions could be non-zero.  We set the next to last
+        # dimension to zero to signal emptiness
+        if ndim == 2:
+            out_shape = (0,)
+        else:
+            out_shape = in_arr.shape[:-2] + (0,)
     else: # make new dtype string with N appended
         new_dt_str = arr.dtype.str[:-1] + str(last_dim)
+        out_shape = in_arr.shape[:-1]
     # Copy to deal with F ordered arrays
     arr = np.ascontiguousarray(arr)
     arr = arr.view(new_dt_str)
-    return arr.reshape(in_arr.shape[:-1])
+    return arr.reshape(out_shape)

Added: trunk/scipy/io/matlab/tests/data/one_by_zero_char.mat
===================================================================
--- trunk/scipy/io/matlab/tests/data/one_by_zero_char.mat	                        (rev 0)
+++ trunk/scipy/io/matlab/tests/data/one_by_zero_char.mat	2011-01-25 21:28:41 UTC (rev 7087)
@@ -0,0 +1 @@
+MATLAB 5.0 MAT-file, written by Octave 3.2.3, 2011-01-25 19:30:48 UTC                                                        IM   0                               var        
\ No newline at end of file

Modified: trunk/scipy/io/matlab/tests/test_mio.py
===================================================================
--- trunk/scipy/io/matlab/tests/test_mio.py	2011-01-25 11:13:49 UTC (rev 7086)
+++ trunk/scipy/io/matlab/tests/test_mio.py	2011-01-25 21:28:41 UTC (rev 7087)
@@ -875,5 +875,13 @@
         assert_array_equal(res[name], exp_res)
 
 
+def test_one_by_zero():
+    ''' Test 1x0 chars get read correctly '''
+    func_eg = pjoin(test_data_path, 'one_by_zero_char.mat')
+    rdr = MatFile5Reader_future(open(func_eg, 'rb'))
+    d = rdr.get_variables()
+    assert_equal(d['var'].shape, (0,))
+
+
 if __name__ == "__main__":
     run_module_suite()




More information about the Scipy-svn mailing list