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