[Scipy-tickets] [SciPy] #1648: special.legendre bug.

SciPy Trac scipy-tickets@scipy....
Wed Apr 25 15:56:15 CDT 2012

#1648: special.legendre bug.
 Reporter:  mforbes        |       Owner:  pv         
     Type:  defect         |      Status:  new        
 Priority:  highest        |   Milestone:  Unscheduled
Component:  scipy.special  |     Version:  devel      
 Keywords:                 |  
 Changeset 62fa2c26993613915ffc7a8ae4a2c6cda2fb9232 replaced many
 `assert(n>0)` statements with `if n < 1:` conditions in `orthogonal.py`.
 This breaks functions like `scipy.special.legendre` for values of `n`
 between `0` and `1`.

 These constraints should be checked with `if n <=0:`

 For example, the correct behaviour should be:
 >>> scipy.special.legendre(0.5)(2.0)

 instead of raising `ValueError: n must be positive.`.

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

More information about the Scipy-tickets mailing list