[pymvpa] Multiple datasets in one hdf5 file

孔令军 201421210014 at mail.bnu.edu.cn
Fri Jul 10 00:39:26 UTC 2015


Hi,
Thank you so much for the replies!! I now have 15 subject's datasets in one file, but seem to still be missing something.
(I had used the h5save('/tmp/out.h5', [ds1, ds2]) to make the one file consist of the 15 subjects. And can be loaded correctly) 
Working through the hyperalignment tutorial, after loading using h5load, zscoring the individual datasets or inserting subject IDs to the individual datasets doesn't work with my combined dataset file (missing some attributes). It definitely works when using the example hyperalignment dataset file though.The code and error display are showed at the end.
Pardon me for the repeated questions on this. Would anyone please let me  know if there is something I am neglecting to do before saving all the datasets into the one file? Thank you very much!
>>> _ = [zscore(ds) for ds in ds_all]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.7/mvpa2/mappers/zscore.py", line 286, in zscore
    zm.train(Dataset(ds))
  File "/usr/lib/pymodules/python2.7/mvpa2/base/dataset.py", line 210, in __init__
    samples = np.array(samples)
ValueError: setting an array element with a sequence.
>>> for i,sd in enumerate(ds_all):
...     sd.sa['subject'] = np.repeat(i, len(sd))
...
 Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
AttributeError: 'list' object has no attribute 'sa'






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20150710/a36f03df/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list