[pymvpa] Question about NiftiDataset
Valentin Haenel
valentin.haenel at gmx.de
Mon Apr 6 13:12:38 UTC 2009
Hi,
when i look at the documentation for NiftiDataset, i see that samples has a
default of None. This seems to suggest i could use:
NiftiDataset()
to instantiate an empty dataset, which however raises a ValueError
My use case is such that i want to instantiate an empty dataset and then use
"+=" to successively populate the dataset in a loop.
My current idiom is really quite ugly and looks like:
ds = None
-- looping stuff ---
if ds is None:
ds = NiftiDataset(samples=abs_filename(betafile),
labels=label , chunks=chunk , mask=m)
else:
ds += NiftiDataset(samples=abs_filename(betafile),
labels=label , chunks=chunk , mask=m)
Thanks for your advice.
V-
More information about the Pkg-ExpPsy-PyMVPA
mailing list