/opt/alt/python27/lib64/python2.7/site-packages/numpy/polynomial
Edit: /opt/alt/python27/lib64/python2.7/site-packages/numpy/polynomial/polyutils.pyc (12866B)
ó
]9Zc
@` sê d Z d d l m Z m Z m Z d d l Z d d d d d d d
d d d
g
Z d e f d „ ƒ YZ d e
f d „ ƒ YZ d e f d „ ƒ YZ d
e
f d „ ƒ YZ d „ Z e d „ Z d d „ Z d „ Z d „ Z d „ Z d S( sR
Utililty classes and functions for the polynomial modules.
This module provides: error and warning objects; a polynomial base class;
and some routines used in both the `polynomial` and `chebyshev` modules.
Error objects
-------------
.. autosummary::
:toctree: generated/
PolyError base class for this sub-package's errors.
PolyDomainError raised when domains are mismatched.
Warning objects
---------------
.. autosummary::
:toctree: generated/
RankWarning raised in least-squares fit for rank-deficient matrix.
Base class
----------
.. autosummary::
:toctree: generated/
PolyBase Obsolete base class for the polynomial classes. Do not use.
Functions
---------
.. autosummary::
:toctree: generated/
as_series convert list of array_likes into 1-D arrays of common type.
trimseq remove trailing zeros.
trimcoef remove small trailing coefficients.
getdomain return the domain appropriate for a given set of abscissae.
mapdomain maps points between domains.
mapparms parameters of the linear map between domains.
i ( t divisiont absolute_importt print_functionNt RankWarningt PolyErrort PolyDomainErrort as_seriest trimseqt trimcoeft getdomaint mapdomaint mapparmst PolyBasec B` s e Z d Z RS( s; Issued by chebfit when the design matrix is rank deficient.( t __name__t
__module__t __doc__( ( ( sM /opt/alt/python27/lib64/python2.7/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 ( ( ( sM /opt/alt/python27/lib64/python2.7/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 ( ( ( sM /opt/alt/python27/lib64/python2.7/site-packages/numpy/polynomial/polyutils.pyR B s c B` s e Z d Z RS( sÖ
Base class for all polynomial types.
Deprecated in numpy 1.9.0, use the abstract
ABCPolyBase class instead. Note that the latter
reguires a number of virtual functions to be
implemented.
( R
R R ( ( ( sM /opt/alt/python27/lib64/python2.7/site-packages/numpy/polynomial/polyutils.pyR O s c C` sa t | ƒ d k r | Sx8 t t | ƒ d d d ƒ D] } | | d k r3 Pq3 q3 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( ( sM /opt/alt/python27/lib64/python2.7/site-packages/numpy/polynomial/polyutils.pyR ^ s #c C` sÑ g | D]! } t j | d d d d ƒ^ q } t g | D] } | j ^ q8 ƒ d k re t d ƒ ‚ n t g | D] } | j d k ^ qo ƒ rœ t d ƒ ‚ n | rÄ g | D] } t | ƒ ^ q© } n t g | D] } | j t j t ƒ k ^ qÎ ƒ rvg } xÏ | D]m } | j t j t ƒ k r\t j
t | ƒ d t j t ƒ ƒ} | | (| j | ƒ q| j | j
ƒ ƒ qWnW y t j | Œ } Wn t d ƒ ‚ n Xg | D]! } t j | d d d | ƒ^ q¦} | S( sñ
Return argument as a list of 1-d arrays.
The returned list contains array(s) of dtype double, complex double, or
object. A 1-d argument of shape ``(N,)`` is parsed into ``N`` arrays of
size one; a 2-d argument of shape ``(M,N)`` is parsed into ``M`` arrays
of size ``N`` (i.e., is "parsed by row"); and a higher dimensional array
raises a Value Error if it is not first reshaped into either a 1-d or 2-d
array.
Parameters
----------
alist : array_like
A 1- or 2-d array_like
trim : boolean, optional
When True, trailing zeros are removed from the inputs.
When False, the inputs are passed through intact.
Returns
-------
[a1, a2,...] : list of 1-D arrays
A copy of the input data as a list of 1-d arrays.
Raises
------
ValueError
Raised when `as_series` cannot convert its input to 1-d arrays, or at
least one of the resulting arrays is empty.
Examples
--------
>>> from numpy import polynomial as P
>>> a = np.arange(4)
>>> P.as_series(a)
[array([ 0.]), array([ 1.]), array([ 2.]), array([ 3.])]
>>> b = np.arange(6).reshape((2,3))
>>> P.as_series(b)
[array([ 0., 1., 2.]), array([ 3., 4., 5.])]
t ndmini t copyi s Coefficient array is emptys Coefficient array is not 1-dt dtypes&