<p>Hi,guys</p>
<p>I used the following code to do GNB searchlight analysis, </p>
<div># GNB searchlight analysis</div>
<div>dataset = alldata[timeselect,spatialslelect ]<br>sl= sphere_gnbsearchlight(GNB(),NFoldPartitioner(),radius=3,postproc=mean_sample())<br> res  = sl(dataset)<br>sphere_errors = res.samples[0]</div>
<div><br>BUT,  the errors were reported(see bellow). The version I used is pymvpa  0.6. <br></div>
<div>In addition, with the similar code, the general searchlight analysis can run sucessfully.</div>
<div> # Genearal searchlight analysis<br> 75                 cv = CrossValidation(linearCSVMC(),NFoldPartitioner(),errorfx=lambda p, t: np.mean(p == t),enabl    e_ca=['stats'])<br> 76                 sl = sphere_searchlight(cv,radius=3,postproc=mean_sample())<br>
 77                 res  = sl(dataset)<br> 78                 sphere_errors = res.samples[0]</div>
<div> </div>
<div> </div>
<div>So, what happened in GNB searchlight analysis? </div>
<div> </div>
<div>Zonglei Zhen</div>
<div> </div>
<div> </div>
<div>-----------------IndexError from GNB searchlight analysis------------------------</div>
<div><br>In [2]: from gnbsearchlight import *<br>Warning: divide by zero encountered in log<br>ERROR: An unexpected error occurred while tokenizing input<br>The following traceback may be corrupted or invalid<br>The error message is: ('EOF in multi-line statement', (43, 0))</div>

<p>---------------------------------------------------------------------------<br>IndexError                                Traceback (most recent call last)</p>
<p>//mystudy/code/python/<ipython console> in <module>()<br>//mystudy/code/python/gnbsearchlight.py in <module>()<br>     70                 #GNB searchlight <br>sl = sphere_gnbsearchlight(GNB(),NFoldPartitioner(),radius=3,postproc=mean_sample())<br>
---> 72                 res  = sl(dataset)<br>     73                 sphere_errors = res.samples[0]<br>     74 </p>
<p>/usr/local/neurosoft/lib/python2.6/site-packages/mvpa/base/learner.pyc in __call__(self, ds)<br>    220                                    "used and auto training is disabled."<br>    221                                    % str(self))<br>
--> 222         return super(Learner, self).__call__(ds)<br>    223 <br>    224 </p>
<p>/usr/local/neurosoft/lib/python2.6/site-packages/mvpa/base/node.pyc in __call__(self, ds)<br>     74 <br>     75         self._precall(ds)<br>---> 76         result = self._call(ds)<br>     77         result = self._postcall(ds, result)<br>
     78 </p>
<p>/usr/local/neurosoft/lib/python2.6/site-packages/mvpa/measures/searchlight.pyc in _call(self, dataset)<br>    108 <br>    109         # pass to subclass</p>
<p>--> 110         results, roi_sizes = self._sl_call(dataset, roi_ids, nproc)<br>    111 <br>    112         if not roi_sizes is None:</p>
<p>/usr/local/neurosoft/lib/python2.6/site-packages/mvpa/measures/gnbsearchlight.pyc in _sl_call(self, dataset, roi_ids, nproc)<br>    459             norm_weight = -0.5 * np.log(2*np.pi*variances)<br>    460             # last added dimension would be for ROIs</p>

<p>--> 461             logpriors = np.log(priors[:, np.newaxis, np.newaxis])<br>    462 <br>    463             if __debug__:</p>
<p>IndexError: 0-d arrays can only use a single () or a list of newaxes (and a single ...) as an index<br></p>