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