Im trying to write data to an hdf5 file using h5py. The input data is
in a dict and should be strings. I want to insert this data into a
dataset of datatype H5T_NATIVE_CHAR. Here is how Im currently doing
this:
fds[ref] = numpy.array(fdataset, dtype='a1')
but I get the error:
Traceback (most recent call last):
File "
insert_archive-0.2.1.py", line 127, in <module>
fds[ref] = numpy.array(fdataset, dtype='a1')
File "/home/jamie.lahowetz/python/lib/python3.2/site-packages/
h5py-2.0.1-py3.2-linux-x86_64.egg/h5py/_hl/dataset.py", line 404, in
__setitem__
self.id.write(mspace, fspace, val, mtype)
File "h5d.pyx", line 218, in h5py.h5d.DatasetID.write (h5py/h5d.c:
2689)
File "_proxy.pyx", line 121, in h5py._proxy.dset_rw (h5py/_proxy.c:
1463)
File "_proxy.pyx", line 94, in h5py._proxy.H5PY_H5Dwrite (h5py/
_proxy.c:1278)
IOError: can't write data (Dataset: Write failed)
The dataset is described as:
DATATYPE H5T_STD_I8LE
DATASPACE SIMPLE { ( 1, 22 ) / ( H5S_UNLIMITED, 22 ) }
How can I do this? What am I doing wrong? thank you.