[Scipy-tickets] [SciPy] #804: local variable 'mm' referenced before assignment in special.lqmn

SciPy scipy-tickets@scipy....
Mon Dec 1 03:38:50 CST 2008


#804: local variable 'mm' referenced before assignment in special.lqmn
---------------------------+------------------------------------------------
 Reporter:  pbrod          |       Owner:  somebody
     Type:  defect         |      Status:  new     
 Priority:  normal         |   Milestone:  0.8     
Component:  scipy.special  |     Version:  devel   
 Severity:  blocker        |    Keywords:          
---------------------------+------------------------------------------------
 There is an error in scipy.special.lqmn when n and m is not zero.

 {{{
 In [20]: scipy.special.lqmn(4,4,1.1)
 ---------------------------------------------------------------------------
 UnboundLocalError                         Traceback (most recent call
 last)

 Z:\<ipython console> in <module>()

 C:\Python25\lib\site-
 packages\scipy-0.6.0.0005-py2.5-win32.egg\scipy\special\bas
 ic.pyc in lqmn(m, n, z)
     543         q,qd = specfun.clqmn(mm,nn,z)
     544     else:
 --> 545         q,qd = specfun.lqmn(mm,nn,z)
     546     return q[:(m+1),:(n+1)],qd[:(m+1),:(n+1)]
     547

 UnboundLocalError: local variable 'mm' referenced before assignment
 }}}

 For either m=0 or n=0 it works as exemplified here:
 {{{
 In [25]: scipy.special.lqmn(0,2,0.1)
 Out[25]:
 (array([[ 0.10033535, -0.98996647, -0.19866264]]),
  array([[ 1.01010101,  0.20134545, -1.95979839]]))

 In [26]: scipy.special.lqmn(2,0,0.1)
 Out[26]:
 (array([[ 0.10033535],
        [-1.00503782],
        [ 0.2020202 ]]),
  array([[ 1.01010101],
        [-0.10151897],
        [ 2.06101418]]))
 }}}

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


More information about the Scipy-tickets mailing list