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

SciPy Trac scipy-tickets@scipy....
Wed Jun 6 15:41:02 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           |  
-----------------------------+----------------------------------------------
 Due to https://github.com/scipy/scipy/pull/190.  The added tests there
 were properly made conditional based on ctypes being available, but
 apparently in some of the quadpack functions ctypes is still being
 imported even if not available.

 This is a blocker for 0.11.0.

 {{{
 ======================================================================
 ERROR: test_algebraic_log_weight (test_quadpack.TestQuad)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/tests/test_quadpack.py", line 116, in
 test_algebraic_log_weight
     assert_quad(quad(myfunc,-1,1,args=a,weight='alg',wvar=(-0.5,-0.5)),
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 249, in quad
     retval =
 _quad_weight(func,a,b,args,full_output,epsabs,epsrel,limlst,limit,maxp1,weight,wvar,wopts)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 367, in _quad_weight
     return
 _quadpack._qawse(func,a,b,wvar,integr,args,full_output,epsabs,epsrel,limit)
 ImportError: No module named ctypes

 ======================================================================
 ERROR: test_cauchypv_weight (test_quadpack.TestQuad)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/tests/test_quadpack.py", line 127, in
 test_cauchypv_weight
     assert_quad(quad(myfunc,0,5,args=0.4,weight='cauchy',wvar=2.0),
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 249, in quad
     retval =
 _quad_weight(func,a,b,args,full_output,epsabs,epsrel,limlst,limit,maxp1,weight,wvar,wopts)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 369, in _quad_weight
     return
 _quadpack._qawce(func,a,b,wvar,args,full_output,epsabs,epsrel,limit)
 ImportError: No module named ctypes

 ======================================================================
 ERROR: test_cosine_weighted_infinite (test_quadpack.TestQuad)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/tests/test_quadpack.py", line 107, in
 test_cosine_weighted_infinite
     assert_quad(quad(myfunc,-Inf,0,args=a,weight='cos',wvar=ome),
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 249, in quad
     retval =
 _quad_weight(func,a,b,args,full_output,epsabs,epsrel,limlst,limit,maxp1,weight,wvar,wopts)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 358, in _quad_weight
     return
 _quadpack._qawfe(thefunc,-b,wvar,integr,args,full_output,epsabs,limlst,limit,maxp1)
 ImportError: No module named ctypes

 ======================================================================
 ERROR: test_double_integral (test_quadpack.TestQuad)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/tests/test_quadpack.py", line 136, in
 test_double_integral
     assert_quad(dblquad(simpfunc,a,b,lambda x: x, lambda x: 2*x),
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 425, in dblquad
     return
 quad(_infunc,a,b,(func,gfun,hfun,args),epsabs=epsabs,epsrel=epsrel)
   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_indefinite (test_quadpack.TestQuad)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/tests/test_quadpack.py", line 66, in
 test_indefinite
     assert_quad(quad(myfunc,0,Inf), 0.577215664901532860606512)
   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_sine_weighted_finite (test_quadpack.TestQuad)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/tests/test_quadpack.py", line 87, in
 test_sine_weighted_finite
     assert_quad(quad(myfunc,0,1,args=20,weight='sin',wvar=ome),
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 249, in quad
     retval =
 _quad_weight(func,a,b,args,full_output,epsabs,epsrel,limlst,limit,maxp1,weight,wvar,wopts)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 336, in _quad_weight
     return
 _quadpack._qawoe(func,a,b,wvar,integr,args,full_output,epsabs,epsrel,limit,maxp1,1)
 ImportError: No module named ctypes

 ======================================================================
 ERROR: test_sine_weighted_infinite (test_quadpack.TestQuad)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/tests/test_quadpack.py", line 97, in
 test_sine_weighted_infinite
     assert_quad(quad(myfunc,0,Inf,args=a,weight='sin',wvar=ome),
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 249, in quad
     retval =
 _quad_weight(func,a,b,args,full_output,epsabs,epsrel,limlst,limit,maxp1,weight,wvar,wopts)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 343, in _quad_weight
     return
 _quadpack._qawfe(func,a,wvar,integr,args,full_output,epsabs,limlst,limit,maxp1)
 ImportError: No module named ctypes

 ======================================================================
 ERROR: test_singular (test_quadpack.TestQuad)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/tests/test_quadpack.py", line 78, in
 test_singular
     assert_quad(quad(myfunc,0,10,points=[2.5,5.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 322, in _quad
     return
 _quadpack._qagpe(func,a,b,the_points,args,full_output,epsabs,epsrel,limit)
 ImportError: No module named ctypes

 ======================================================================
 ERROR: test_triple_integral (test_quadpack.TestQuad)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/tests/test_quadpack.py", line 147, in
 test_triple_integral
     lambda x,y: x-y, lambda x,y: x+y),
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 487, in tplquad
     return
 dblquad(_infunc2,a,b,gfun,hfun,(func,qfun,rfun,args),epsabs=epsabs,epsrel=epsrel)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/quadpack.py", line 425, in dblquad
     return
 quad(_infunc,a,b,(func,gfun,hfun,args),epsabs=epsabs,epsrel=epsrel)
   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_typical (test_quadpack.TestQuad)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/integrate/tests/test_quadpack.py", line 60, in
 test_typical
     assert_quad(quad(myfunc,0,pi,(2,1.8)), 0.30614353532540296487)
   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>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list