/usr/lib64/python2.6/site-packages/numpy/polynomial
Edit: /usr/lib64/python2.6/site-packages/numpy/polynomial/polyutils.pyc (9241B)
Ñò
]ĞKc @ sÿ d Z d d k l Z d d d d d d d d
d d g
Z d d
k Z d d
k Z d d
k Z d e f d „ ƒ YZ d e
f d „ ƒ YZ d e f d „ ƒ YZ d e
f d „ ƒ YZ d „ Z d „ Z e d „ Z d d „ Z d „ Z d „ Z d „ Z d
S( sJ Utililty functions for polynomial modules.
This modules provides errors, warnings, and a polynomial base class along
with some common routines that are used in both the polynomial and
chebyshev modules.
Errors
------
- PolyError -- base class for errors
- PolyDomainError -- mismatched domains
Warnings
--------
- RankWarning -- issued by least squares fits to warn of deficient rank
Base Class
----------
- PolyBase -- Base class for the Polynomial and Chebyshev classes.
Functions
---------
- as_series -- turns list of array_like into 1d arrays of common type
- trimseq -- removes trailing zeros
- trimcoef -- removes trailing coefficients less than given magnitude
- getdomain -- finds appropriate domain for collection of points
- mapdomain -- maps points between domains
- mapparms -- parameters of the linear map between domains
iÿÿÿÿ( t divisiont RankWarningt PolyErrort PolyDomainErrort PolyBaset as_seriest trimseqt trimcoeft getdomaint mapdomaint mapparmsNc B s e Z d Z RS( s; Issued by chebfit when the design matrix is rank deficient.( t __name__t
__module__t __doc__( ( ( s@ /usr/lib64/python2.6/site-packages/numpy/polynomial/polyutils.pyR + s c B s e Z d Z RS( s% Base class for errors in this module.( R R R
( ( ( s@ /usr/lib64/python2.6/site-packages/numpy/polynomial/polyutils.pyR / s c B s e Z d Z RS( s¤ Issued by the generic Poly class when two domains don't match.
This is raised when an binary operation is passed Poly objects with
different domains.
( R R R
( ( ( s@ /usr/lib64/python2.6/site-packages/numpy/polynomial/polyutils.pyR 3 s c B s e Z RS( ( R R ( ( ( s@ /usr/lib64/python2.6/site-packages/numpy/polynomial/polyutils.pyR @ s c C s! x | D] } | o t Sq Wt S( N( t Truet False( t iterablet element( ( s@ /usr/lib64/python2.6/site-packages/numpy/polynomial/polyutils.pyt anyF s
c C se t | ƒ d j o | Sx: t t | ƒ d d d ƒ D] } | | d j o Pq5 q5 W| | d Sd S( sı Remove small Poly series coefficients.
Parameters
----------
seq : sequence
Sequence of Poly series coefficients. This routine fails for
empty sequences.
Returns
-------
series : sequence
Subsequence with trailing zeros removed. If the resulting sequence
would be empty, return the first element. The returned sequence may
or may not be a view.
Notes
-----
Do not lose the type info if the sequence contains unknown objects.
i i iÿÿÿÿN( t lent range( t seqt i( ( s@ /usr/lib64/python2.6/site-packages/numpy/polynomial/polyutils.pyR O s c
C s g } | D]" } | t i | d d d d ƒq ~ } t g } | D] } | | i qD ~ ƒ d j o t d ƒ ‚ n t g } | D] } | | i q… ~ ƒ d j o t d ƒ ‚ n | o+ g } | D] } | t | ƒ qÊ ~ } n t g } | D] } | | i t i t
ƒ j qø ~ ƒ o„ g } xÚ | D]o } | i t i t
ƒ j o= t i t | ƒ d t i t
ƒ ƒ}
| |
(| i
|
ƒ q1| i
| i ƒ ƒ q1Wn` y t i | Œ } Wn t d ƒ ‚ n Xg } | D]" } | t i | d d d | ƒqÜ~ } | S( s Return arguments as a list of 1d arrays.
The return type will always be an array of double, complex double. or
object.
Parameters
----------
[a1, a2,...] : list of array_like.
The arrays must have no more than one dimension when converted.
trim : boolean
When True, trailing zeros are removed from the inputs.
When False, the inputs are passed through intact.
Returns
-------
[a1, a2,...] : list of 1d-arrays
A copy of the input data as a 1d-arrays.
Raises
------
ValueError :
Raised when an input can not be coverted to 1-d array or the
resulting array is empty.
t ndmini t copyi s Coefficient array is emptys Coefficient array is not 1-dt dtypes&