Thanks, Yaroslav, .to_filename works well! Best,Meng
> Date: Sun, 27 Mar 2011 13:22:36 -0400 > From: [email protected] > To: [email protected] > Subject: Re: [pymvpa] "TypeError: save() takes exactly 3 arguments (2 given)" > under pympva 0.6 > > > On Sun, 27 Mar 2011, Meng Liang wrote: > > I am trying to save the sensitivity map into a nifti file (nii.gz) > > using map2nifti().save(filename), however, the following error appears: > > > ======== > > >>>map2nifti(ds, N.mean(sensmap_cv, axis=0)).save('test.nii.gz') > > TypeError: save() takes exactly 3 arguments (2 given) > > ======== > > > I am working with pymvpa 0.6 in Neurodebian virtual machine (64bit > > windows 7). By the way, the similar function used to work when I was > > using pymvpa 0.4.7. > sorry -- many things have changed from 0.4 to 0.6, in particular instead > of PyNIFTI we rely on nibabel now. > > and there is .save available but it is a "class method" thus > requires both class (takes your generated nifti) and then requires > actual instance (you would need to provide it again)... > > proper workaround would be to replace use of .save with .to_filename, > which is defined at instance level and would work as the pynifti's save. > so just do .to_filename('test.nii.gz'). > > sorry about that > > -- > =------------------------------------------------------------------= > Keep in touch www.onerussian.com > Yaroslav Halchenko www.ohloh.net/accounts/yarikoptic > > _______________________________________________ > Pkg-ExpPsy-PyMVPA mailing list > [email protected] > http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa
_______________________________________________ Pkg-ExpPsy-PyMVPA mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa

