[pymvpa] "TypeError: save() takes exactly 3 arguments (2 given)" under pympva 0.6

Meng Liang meng.liang at hotmail.co.uk
Mon Mar 28 10:17:02 UTC 2011


Thanks, Yaroslav, .to_filename works well!
Best,Meng

> Date: Sun, 27 Mar 2011 13:22:36 -0400
> From: debian at onerussian.com
> To: pkg-exppsy-pymvpa at lists.alioth.debian.org
> 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
> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20110328/242feaf3/attachment.htm>


More information about the Pkg-ExpPsy-PyMVPA mailing list