[SciPy-Dev] ERROR: Failure: SyntaxError (invalid syntax (test_distributions.py, line 391)

Travis Oliphant oliphant@enthought....
Tue Jun 8 23:29:25 CDT 2010


On Jun 8, 2010, at 3:55 AM, Nils Wagner wrote:

> Hi all,
> 
> I am using
> 
>>>> numpy.__version__
> '2.0.0.dev8460'
>>>> import scipy
>>>> scipy.__version__
> '0.9.0.dev6493'
> 
> and I found some (new) errors
> 
> ======================================================================
> ERROR: 
> test_continuous_basic.test_cont_basic(<scipy.stats.distributions.wald_gen 
> object at 0x4cb5c90>, (), 'wald')
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File 
> "/data/home/nwagner/local/lib/python2.5/site-packages/nose-0.11.1-py2.5.egg/nose/case.py", 
> line 183, in runTest
>     self.test(*self.arg)
>   File 
> "/data/home/nwagner/local/lib/python2.5/site-packages/scipy/stats/tests/test_continuous_basic.py", 
> line 291, in check_cdf_ppf
>     npt.assert_almost_equal(distfn.cdf(distfn.ppf([0.001,0.5,0.999], 
> *arg), *arg),
>   File 
> "/data/home/nwagner/local/lib/python2.5/site-packages/scipy/stats/distributions.py", 
> line 1324, in ppf
>     place(output,cond,self._ppf(*goodargs)*scale + loc)
>   File 
> "/data/home/nwagner/local/lib/python2.5/site-packages/scipy/stats/distributions.py", 
> line 1028, in _ppf
>     return self.vecfunc(q,*args)
>   File 
> "/data/home/nwagner/local/lib/python2.5/site-packages/numpy/lib/function_base.py", 
> line 1794, in __call__
>     theout = self.thefunc(*newargs)
>   File 
> "/data/home/nwagner/local/lib/python2.5/site-packages/scipy/stats/distributions.py", 
> line 974, in _ppf_single_call
>     return optimize.brentq(self._ppf_to_solve, self.xa, 
> self.xb, args=(q,)+args, xtol=self.xtol)
>   File 
> "/data/home/nwagner/local/lib/python2.5/site-packages/scipy/optimize/zeros.py", 
> line 262, in brentq
>     r = 
> _zeros._brentq(f,a,b,xtol,maxiter,args,full_output,disp)
> ValueError: f(a) and f(b) must have different signs
> 
> ======================================================================
> ERROR: Failure: SyntaxError (invalid syntax 
> (test_distributions.py, line 391))
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File 
> "/data/home/nwagner/local/lib/python2.5/site-packages/nose-0.11.1-py2.5.egg/nose/loader.py", 
> line 379, in loadTestsFromName
>     addr.filename, addr.module)
>   File 
> "/data/home/nwagner/local/lib/python2.5/site-packages/nose-0.11.1-py2.5.egg/nose/importer.py", 
> line 39, in importFromPath
>     return self.importFromDir(dir_path, fqname)
>   File 
> "/data/home/nwagner/local/lib/python2.5/site-packages/nose-0.11.1-py2.5.egg/nose/importer.py", 
> line 86, in importFromDir
>     mod = load_module(part_fqname, fh, filename, desc)
>   File 
> "/data/home/nwagner/local/lib/python2.5/site-packages/scipy/stats/tests/test_distributions.py", 
> line 391
>     res = distfunc.rvs(*args, size=200)
>                                  ^
> SyntaxError: invalid syntax


The above two should be fixed in trunk.   This last one is  an old syntax issue with not being able to pass keyword arguments after *args without building the dictionary.   


I don't know what is causing the error below. 

-Travis



More information about the SciPy-Dev mailing list