[Scipy-tickets] [SciPy] #1670: Unprotected ctypes usage in integrate module

SciPy Trac scipy-tickets@scipy....
Wed Jun 6 15:46:27 CDT 2012


#1670: Unprotected ctypes usage in integrate module
-----------------------------+----------------------------------------------
 Reporter:  rgommers         |       Owner:  oliphant
     Type:  defect           |      Status:  new     
 Priority:  high             |   Milestone:  0.11.0  
Component:  scipy.integrate  |     Version:  devel   
 Keywords:  ctypes           |  
-----------------------------+----------------------------------------------

Comment(by rgommers):

 Actually caused more failures
 {{{
 ======================================================================
 ERROR: test_beta (test_distributions.TestExpect)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/stats/tests/test_distributions.py", line 649, in
 test_beta
     loc=5, scale=2)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/stats/distributions.py", line 2040, in expect
     return integrate.quad(fun, lb, ub, **kwds)[0] / invfac
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 247, in quad
     retval = _quad(func,a,b,args,full_output,epsabs,epsrel,limit,points)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 312, in _quad
     return _quadpack._qagse(func,a,b,args,full_output,epsabs,epsrel,limit)
 ImportError: No module named ctypes

 ======================================================================
 ERROR: test_norm (test_distributions.TestExpect)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/stats/tests/test_distributions.py", line 628, in
 test_norm
     v = stats.norm.expect(lambda x: (x-5)*(x-5), loc=5, scale=2)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/stats/distributions.py", line 2040, in expect
     return integrate.quad(fun, lb, ub, **kwds)[0] / invfac
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 247, in quad
     retval = _quad(func,a,b,args,full_output,epsabs,epsrel,limit,points)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 314, in _quad
     return
 _quadpack._qagie(func,bound,infbounds,args,full_output,epsabs,epsrel,limit)
 ImportError: No module named ctypes

 ======================================================================
 ERROR: test_distributions.test_all_distributions('betaprime',
 (1.9233810159462807, 1.8424602231401823), 0.01)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/nose-1.1.2-py2.4.egg/nose/case.py", line 197, in runTest
     self.test(*self.arg)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/stats/tests/test_distributions.py", line 47, in
 check_distribution
     D,pval = stats.kstest(dist,'', args=args, N=1000)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/stats/stats.py", line 3271, in kstest
     cdfvals = cdf(vals, *args)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/stats/distributions.py", line 1382, in cdf
     place(output,cond,self._cdf(*goodargs))
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/stats/distributions.py", line 1235, in _cdf
     return self.veccdf(x,*args)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/numpy/lib/function_base.py", line 1813, in __call__
     theout = self.thefunc(*newargs)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/stats/distributions.py", line 1232, in
 _cdf_single_call
     return integrate.quad(self._pdf, self.a, x, args=args)[0]
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 247, in quad
     retval = _quad(func,a,b,args,full_output,epsabs,epsrel,limit,points)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 312, in _quad
     return _quadpack._qagse(func,a,b,args,full_output,epsabs,epsrel,limit)
 ImportError: No module named ctypes

 ======================================================================
 ERROR: Regression test for ticket #1638.
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/nose-1.1.2-py2.4.egg/nose/case.py", line 197, in runTest
     self.test(*self.arg)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/stats/tests/test_distributions.py", line 902, in
 test_ksone_fit_freeze
     stats.ksone.fit(d)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/stats/distributions.py", line 1892, in fit
     start = self._fitstart(data)  # get distribution specific starting
 locations
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/stats/distributions.py", line 1798, in _fitstart
     return args + self.fit_loc_scale(data, *args)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/stats/distributions.py", line 1920, in fit_loc_scale
     mu, mu2 = self.stats(*args,**{'moments':'mv'})
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/stats/distributions.py", line 1666, in stats
     mu = self._munp(1.0,*goodargs)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/stats/distributions.py", line 1260, in _munp
     return self.generic_moment(n,*args)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/numpy/lib/function_base.py", line 1813, in __call__
     theout = self.thefunc(*newargs)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/stats/distributions.py", line 1205, in _mom1_sc
     return integrate.quad(self._mom_integ1, 0, 1,args=(m,)+args)[0]
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 247, in quad
     retval = _quad(func,a,b,args,full_output,epsabs,epsrel,limit,points)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 312, in _quad
     return _quadpack._qagse(func,a,b,args,full_output,epsabs,epsrel,limit)
 ImportError: No module named ctypes
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1670#comment:1>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list