[Scipy-tickets] [SciPy] #844: Orthogonal polynomials inheritance appears to be broken

SciPy scipy-tickets@scipy....
Wed Jan 14 03:44:23 CST 2009


#844: Orthogonal polynomials inheritance appears to be broken
---------------------------+------------------------------------------------
 Reporter:  togr           |       Owner:  somebody
     Type:  defect         |      Status:  new     
 Priority:  normal         |   Milestone:  0.8.0   
Component:  scipy.special  |     Version:  devel   
 Severity:  normal         |    Keywords:          
---------------------------+------------------------------------------------
 when orthogonal polynomials are multiplied by a scalar, they lose their
 derived orthogonal polynomial class, devolving to the base polynomial
 class.
 {{{
 >>> import scipy.special as sps
 >>> sps.jacobi(3, .5, .5).__class__
 <class 'scipy.special.orthogonal.orthopoly1d'>
 >>> (2*sps.jacobi(3, .5, .5)).__class__
 <class 'numpy.lib.polynomial.poly1d'>
 }}}
 This means that some of the orthogonal polynomials implemented as
 variations over other orthogonal polynomials (e.g. `scipy.special.chebyu`)
 are returned as ordinary polynomials, not orthogonal polynomials, and some
 of the special methods are missing
 {{{
 >>> cht4 = sps.chebyt(4)
 >>> cht4.weights
 array([[-0.92387953,  0.78539816,  0.30055886],
        [-0.38268343,  0.78539816,  0.72561329],
        [ 0.38268343,  0.78539816,  0.72561329],
        [ 0.92387953,  0.78539816,  0.30055886]])
 >>> chu4 = sps.chebyu(4)
 >>> chu4.weights
 [ raises AttributeError: '<class 'numpy.lib.polynomial.poly1d'>' has no
 attribute 'weights' ]
 }}}

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


More information about the Scipy-tickets mailing list