[Scipy-tickets] [SciPy] #705: ValueError: too many values to unpack

SciPy scipy-tickets@scipy....
Mon Sep 8 18:30:53 CDT 2008

#705: ValueError: too many values to unpack
 Reporter:  nils             |        Owner:  somebody
     Type:  defect           |       Status:  new     
 Priority:  normal           |    Milestone:  0.7.0   
Component:  scipy.integrate  |      Version:          
 Severity:  normal           |   Resolution:          
 Keywords:                   |  
Comment (by pv):


 It's this piece of code in quadpack.py
 220         if ier in [1,2,3,4,5,7]:
 221             if full_output:
 222  ->             if weight in ['cos','sin'] and (b == Inf or a == Inf):
 223                     return retval[:-1] + (msg, explain)
 224                 else:
 225                     return retval[:-1] + (msg,)

 The point appears to be that how many elements are in the tuple returned
 by ''quad'' varies depending whether ''quad'' was successful or not,
 whether weights were used, etc.

 The API is a bit nasty, should probably be cleaned up a bit if it's still
 possible to change it.

 Documentation could of course be improved (the curly braces apparently
 mean that any of the things inside them may be returned).

Ticket URL: <http://scipy.org/scipy/scipy/ticket/705#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