Hi,
I would like to write data of 'list' type on HDF5 files, but an error appears as follows. From the documents I found, they says that only writing 'numpy.ndarray' data is feasible. Could you tell me how to save data of 'list' type on HDF5 files?
Thank you.
Jinfang
--------------------------------------------------------------------------------------------------
bob.bio.base@2017-08-17 15:58:23,162 -- ERROR: During the execution, an exception was raised: error setting object `array' of HDF5 file `/media/sf_winshare/features1.hdf5': no support for storing objects of type `list' on HDF5 files
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jfw/anaconda2/envs/bob_py27/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 902, in debugfile
debugger.run("runfile(%r, args=%r, wdir=%r)" % (filename, args, wdir))
File "/home/jfw/anaconda2/envs/bob_py27/lib/python2.7/bdb.py", line 400, in run
exec cmd in globals, locals
File "<string>", line 1, in <module>
File "/home/jfw/anaconda2/envs/bob_py27/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 880, in runfile
execfile(filename, namespace)
File "/home/jfw/anaconda2/envs/bob_py27/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile
builtins.execfile(filename, *where)
File "/home/jfw/anaconda2/envs/bob_py27/bin/verify.py", line 6, in <module>
sys.exit(bob.bio.base.script.verify.main())
File "/home/jfw/anaconda2/envs/bob_py27/lib/python2.7/site-packages/bob/bio/base/script/verify.py", line 454, in main
verify(cml_args, command_line_parameters)
File "/home/jfw/anaconda2/envs/bob_py27/lib/python2.7/site-packages/bob/bio/base/script/verify.py", line 434, in verify
if not execute(cml_args):
File "/home/jfw/anaconda2/envs/bob_py27/lib/python2.7/site-packages/bob/bio/base/script/verify.py", line 290, in execute
force = cml_args.force)
File "/home/jfw/anaconda2/envs/bob_py27/lib/python2.7/site-packages/bob/bio/base/tools/algorithm.py", line 53, in train_projector
extractor.write_feature(train_features, outfeature_file)
File "/home/jfw/anaconda2/envs/bob_py27/lib/python2.7/site-packages/bob/bio/base/extractor/Extractor.py", line 111, in write_feature
utils.save(feature, feature_file)
File "/home/jfw/anaconda2/envs/bob_py27/lib/python2.7/site-packages/bob/bio/base/utils/io.py", line 97, in save
f.set("array", data, compression=compression)
TypeError: error setting object `array' of HDF5 file `/media/sf_winshare/features1.hdf5': no support for storing objects of type `list' on HDF5 files