title: How to save a Python dtype('object') in an HDF5 file?
body: <p>I am trying to load data from .mat files into python, so that I can save it in an HDF5 file.</p>
  
  <p>The problem is <code>scipy.io.loadmat</code> returns a dictionary containing arrays of dtype=[('counts', '|O4')])</p>
  
  <p>Whenever I try to create a dataset with one of the arrays returned, I get the following error:</p>
  
  <pre><code>&gt;&gt; mat = scipy.io.loadmat('state-10.mat')
  &gt;&gt; h = h5py.File('test.hdf5','w')
  &gt;&gt; h.create_dataset('set', data=mat['ProteinComplex'])
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/lib/python2.7/dist-packages/h5py/_hl/group.py", line 69, in create_dataset
      dsid = dataset.make_new_dset(self, shape, dtype, data, **kwds)
    File "/usr/lib/python2.7/dist-packages/h5py/_hl/dataset.py", line 88, in make_new_dset
      tid = h5t.py_create(dtype, logical=1)
    File "h5t.pyx", line 1332, in h5py.h5t.py_create (h5py/h5t.c:11600)
    File "h5t.pyx", line 1373, in h5py.h5t.py_create (h5py/h5t.c:11209)
    File "h5t.pyx", line 1311, in h5py.h5t._c_compound (h5py/h5t.c:10695)
    File "h5t.pyx", line 1332, in h5py.h5t.py_create (h5py/h5t.c:11600)
    File "h5t.pyx", line 1402, in h5py.h5t.py_create (h5py/h5t.c:11465)
  TypeError: Object dtype dtype('object') has no native HDF5 equivalent
  </code></pre>
  
  <p>Is there any workaround from this? </p>