%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/
Upload File :
Create Path :
Current File : //proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyo

�
�9Zc)@`sAddlmZmZmZddlZddlZddlZddlZddlZ	ddl
jjZ
ddlmZmZmZddl
mZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$ddl%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1ddl2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9ddl:m;Z;m<Z<ddl=m>Z>d	d
l?m@Z@ddlAmBZBmCZCddlAmDZDmEZEmFZGdd
l%mHZIddlJmKZKddlLmMZMejNddkr<eOZPndddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9g)ZQd:�ZRd;�ZSd<�ZTd=�ZUd>�ZVd?�ZWd@�ZXdA�ZYieYdB6eWdC6eXdD6eUdE6eVdF6eSdG6eTdH6ZZdIe[e\e[e[dJ�Z]dIe[e\e[dK�Z^e[e[e\dL�Z_e[e[dM�Z`dN�ZaddO�ZbdPdQ�ZcdR�Zdd	dSdT�Zee[e[e[dU�ZFddV�Zfe&dSdW�ZgdX�ZhdYdZ�Zie@d[��Zjd\�Zkd]�Zle[emd^�Zndeofd_��YZpe[eme\e[e[e[d`�Zqe[d	e	jre	jrda�Zsdb�Ztdc�Zudd�Zvde�Zwdfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�gZxd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�gZyd��Zzd��Z{d��Z|d��Z}d��Z~d��Zd��Z�d��Z�e[e[e\e\d��Z�e[e[e\d��Z�e[e[e\d�e\d��Z�e[e[e\d�e\d��Z�e[d�dSd��Z�d��Z�d��Z�e[d��Z�e[d��Z�e[d��Z�dS(�i(tdivisiontabsolute_importtprint_functionN(tlinspacet
atleast_1dt
atleast_2d(tonestzerostarangetconcatenatetarraytasarrayt
asanyarraytemptyt
empty_liketndarraytaroundtfloortceilttaketdottwheretintptintegertisscalar(tpitmultiplytaddtarctan2t
frompyfunctcost
less_equaltsqrttsintmodtexptlog10(traveltnonzerotsortt	partitiontmeantanytsum(t	typecodestnumber(tdiagi(t	deprecate(t_insertt
add_docstring(tdigitizetbincounttinterp(t_add_newdoc_ufunc(tlong(t
basestringitselectt	piecewiset
trim_zerostcopytiterablet
percentiletdifftgradienttangletunwraptsort_complextdisptextracttplacet	vectorizetasarray_chkfinitetaveraget	histogramthistogramddR3R2tcovtcorrcoeftmsorttmediantsincthammingthanningtbartletttblackmantkaiserttrapzti0t
add_newdocR1tmeshgridtdeletetinserttappendR4tadd_newdoc_ufunccC`syt|�WndSXdS(sd
    Check whether or not an object can be iterated over.

    Parameters
    ----------
    y : object
      Input object.

    Returns
    -------
    b : {0, 1}
      Return 1 if the object has an iterator method or is a sequence,
      and 0 otherwise.


    Examples
    --------
    >>> np.iterable([1, 2, 3])
    1
    >>> np.iterable(2)
    0

    ii(titer(ty((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyR<0s
cC`s|j�tj|j�S(s~
    Square root histogram bin estimator.

    Bin width is inversely proportional to the data size. Used by many
    programs for its simplicity.

    Parameters
    ----------
    x : array_like
        Input data that is to be histogrammed, trimmed to range. May not
        be empty.

    Returns
    -------
    h : An estimate of the optimal bin width for the given data.
    (tptptnpR tsize(tx((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyt_hist_bin_sqrtOscC`s|j�tj|j�dS(s
    Sturges histogram bin estimator.

    A very simplistic estimator based on the assumption of normality of
    the data. This estimator has poor performance for non-normal data,
    which becomes especially obvious for large data sets. The estimate
    depends only on size of the data.

    Parameters
    ----------
    x : array_like
        Input data that is to be histogrammed, trimmed to range. May not
        be empty.

    Returns
    -------
    h : An estimate of the optimal bin width for the given data.
    g�?(R_R`tlog2Ra(Rb((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyt_hist_bin_sturgescscC`s|j�d|jdS(sI
    Rice histogram bin estimator.

    Another simple estimator with no normality assumption. It has better
    performance for large data than Sturges, but tends to overestimate
    the number of bins. The number of bins is proportional to the cube
    root of data size (asymptotically optimal). The estimate depends
    only on size of the data.

    Parameters
    ----------
    x : array_like
        Input data that is to be histogrammed, trimmed to range. May not
        be empty.

    Returns
    -------
    h : An estimate of the optimal bin width for the given data.
    g@g�?igUUUUUU�?(R_Ra(Rb((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyt_hist_bin_riceyscC`s'dtjd|jdtj|�S(s�
    Scott histogram bin estimator.

    The binwidth is proportional to the standard deviation of the data
    and inversely proportional to the cube root of data size
    (asymptotically optimal).

    Parameters
    ----------
    x : array_like
        Input data that is to be histogrammed, trimmed to range. May not
        be empty.

    Returns
    -------
    h : An estimate of the optimal bin width for the given data.
    g8@g�?g�?g@gUUUUUU�?(R`RRatstd(Rb((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyt_hist_bin_scott�scC`s�|jdkr�tjd|jd|jd|jd�}tj|�}|dkr�|tj|�}tj|||�tj|d|�tj|�}|j�dtj|j�tjdtj	|�|�SndS(s�
    Doane's histogram bin estimator.

    Improved version of Sturges' formula which works better for
    non-normal data. See
    http://stats.stackexchange.com/questions/55134/doanes-formula-for-histogram-binning

    Parameters
    ----------
    x : array_like
        Input data that is to be histogrammed, trimmed to range. May not
        be empty.

    Returns
    -------
    h : An estimate of the optimal bin width for the given data.
    ig@g�?ig(
RaR`R RgR)ttrue_dividetpowerR_Rdtabsolute(Rbtsg1tsigmattemptg1((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyt_hist_bin_doane�s0#cC`s4tjtj|ddg��}d||jdS(sB
    The Freedman-Diaconis histogram bin estimator.

    The Freedman-Diaconis rule uses interquartile range (IQR) to
    estimate binwidth. It is considered a variation of the Scott rule
    with more robustness as the IQR is less affected by outliers than
    the standard deviation. However, the IQR depends on fewer points
    than the standard deviation, so it is less accurate, especially for
    long tailed distributions.

    If the IQR is 0, this function returns 1 for the number of bins.
    Binwidth is inversely proportional to the cube root of data size
    (asymptotically optimal).

    Parameters
    ----------
    x : array_like
        Input data that is to be histogrammed, trimmed to range. May not
        be empty.

    Returns
    -------
    h : An estimate of the optimal bin width for the given data.
    iKig@g�g@gUUUUUUտ(R`tsubtractR=Ra(Rbtiqr((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyt_hist_bin_fd�s!cC`stt|�t|��S(s�
    Histogram bin estimator that uses the minimum width of the
    Freedman-Diaconis and Sturges estimators.

    The FD estimator is usually the most robust method, but its width
    estimate tends to be too large for small `x`. The Sturges estimator
    is quite good for small (<1000) datasets and is the default in the R
    language. This method gives good off the shelf behaviour.

    Parameters
    ----------
    x : array_like
        Input data that is to be histogrammed, trimmed to range. May not
        be empty.

    Returns
    -------
    h : An estimate of the optimal bin width for the given data.

    See Also
    --------
    _hist_bin_fd, _hist_bin_sturges
    (tminRsRe(Rb((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyt_hist_bin_auto�stautotdoanetfdtricetscottR tsturgesi
c	C`sit|�}|dk	r]t|�}tj|j|jk�rNtd��n|j�}n|j�}|dkr�|jdkr�d\}}q�|j�d|j	�d}}n#g|D]}|d^q�\}}||kr�td��ntj
tj||g��s"td��n||krE|d8}|d7}nt|t
�r:|tkrxtdj|���n|dk	r�td	��n|}	|dk	r�||k}
|
||kM}
tjj|
�s�||
}	q�n|	jdkr�d
}q:t||	�}|r1ttj|||��}q:d
}n|dkr[tjtj�}n	|j}d}
t|�s�tj|�r�|d
kr�td��n|dk	r�tj|jtj�p�tj|jtj�r�t|||d
d
t�}q�nt|�s#tj||�}|||}t|||d
d
t�}x�tdt |�|
�D]�}||||
!}|dkr�d}n||||
!}||k}
|
||kM}
tjj|
�s�||
}|dk	r�||
}q�n|j!t"�}||}||9}|j!tj�}|||kcd
8<|||k}||cd
8<|||d
k||d
k@}||cd
7<|j#dkr�|j$tj%|d|j$d|�7_$|j&tj%|d|j&d|�7_&q`|tj%|d|d|�j!|�7}q`W|}n�t|�}tj'|�dkj�rYtd��ntj|j|�}|dkr�xJtdt |�|
�D]T}t(||||
!�}|tj)|j*|d d�|j*|dd�f7}q�Wn�t+dd|�}x�tdt |�|
�D]�}||||
!}||||
!}tj,|�}||}||}tj-|g|j.�f�}tj)|j*|d d�|j*|dd�f}|||7}qWtj'|�}|dk	r%|rt+tj'|�t"�}|||j/�|fS||fSn@|r[t+tj'|�t"�}|||j/�|fS||fSdS(sT"
    Compute the histogram of a set of data.

    Parameters
    ----------
    a : array_like
        Input data. The histogram is computed over the flattened array.
    bins : int or sequence of scalars or str, optional
        If `bins` is an int, it defines the number of equal-width
        bins in the given range (10, by default). If `bins` is a
        sequence, it defines the bin edges, including the rightmost
        edge, allowing for non-uniform bin widths.

        .. versionadded:: 1.11.0

        If `bins` is a string from the list below, `histogram` will use
        the method chosen to calculate the optimal bin width and
        consequently the number of bins (see `Notes` for more detail on
        the estimators) from the data that falls within the requested
        range. While the bin width will be optimal for the actual data
        in the range, the number of bins will be computed to fill the
        entire range, including the empty portions. For visualisation,
        using the 'auto' option is suggested. Weighted data is not
        supported for automated bin size selection.

        'auto'
            Maximum of the 'sturges' and 'fd' estimators. Provides good
            all round performance

        'fd' (Freedman Diaconis Estimator)
            Robust (resilient to outliers) estimator that takes into
            account data variability and data size .

        'doane'
            An improved version of Sturges' estimator that works better
            with non-normal datasets.

        'scott'
            Less robust estimator that that takes into account data
            variability and data size.

        'rice'
            Estimator does not take variability into account, only data
            size. Commonly overestimates number of bins required.

        'sturges'
            R's default method, only accounts for data size. Only
            optimal for gaussian data and underestimates number of bins
            for large non-gaussian datasets.

        'sqrt'
            Square root (of data size) estimator, used by Excel and
            other programs for its speed and simplicity.

    range : (float, float), optional
        The lower and upper range of the bins.  If not provided, range
        is simply ``(a.min(), a.max())``.  Values outside the range are
        ignored. The first element of the range must be less than or
        equal to the second. `range` affects the automatic bin
        computation as well. While bin width is computed to be optimal
        based on the actual data within `range`, the bin count will fill
        the entire range including portions containing no data.
    normed : bool, optional
        This keyword is deprecated in Numpy 1.6 due to confusing/buggy
        behavior. It will be removed in Numpy 2.0. Use the ``density``
        keyword instead. If ``False``, the result will contain the
        number of samples in each bin. If ``True``, the result is the
        value of the probability *density* function at the bin,
        normalized such that the *integral* over the range is 1. Note
        that this latter behavior is known to be buggy with unequal bin
        widths; use ``density`` instead.
    weights : array_like, optional
        An array of weights, of the same shape as `a`.  Each value in
        `a` only contributes its associated weight towards the bin count
        (instead of 1). If `density` is True, the weights are
        normalized, so that the integral of the density over the range
        remains 1.
    density : bool, optional
        If ``False``, the result will contain the number of samples in
        each bin. If ``True``, the result is the value of the
        probability *density* function at the bin, normalized such that
        the *integral* over the range is 1. Note that the sum of the
        histogram values will not be equal to 1 unless bins of unity
        width are chosen; it is not a probability *mass* function.

        Overrides the ``normed`` keyword if given.

    Returns
    -------
    hist : array
        The values of the histogram. See `density` and `weights` for a
        description of the possible semantics.
    bin_edges : array of dtype float
        Return the bin edges ``(length(hist)+1)``.


    See Also
    --------
    histogramdd, bincount, searchsorted, digitize

    Notes
    -----
    All but the last (righthand-most) bin is half-open.  In other words,
    if `bins` is::

      [1, 2, 3, 4]

    then the first bin is ``[1, 2)`` (including 1, but excluding 2) and
    the second ``[2, 3)``.  The last bin, however, is ``[3, 4]``, which
    *includes* 4.

    .. versionadded:: 1.11.0

    The methods to estimate the optimal number of bins are well founded
    in literature, and are inspired by the choices R provides for
    histogram visualisation. Note that having the number of bins
    proportional to :math:`n^{1/3}` is asymptotically optimal, which is
    why it appears in most estimators. These are simply plug-in methods
    that give good starting points for number of bins. In the equations
    below, :math:`h` is the binwidth and :math:`n_h` is the number of
    bins. All estimators that compute bin counts are recast to bin width
    using the `ptp` of the data. The final bin count is obtained from
    ``np.round(np.ceil(range / h))`.

    'Auto' (maximum of the 'Sturges' and 'FD' estimators)
        A compromise to get a good value. For small datasets the Sturges
        value will usually be chosen, while larger datasets will usually
        default to FD.  Avoids the overly conservative behaviour of FD
        and Sturges for small and large datasets respectively.
        Switchover point is usually :math:`a.size \approx 1000`.

    'FD' (Freedman Diaconis Estimator)
        .. math:: h = 2 \frac{IQR}{n^{1/3}}

        The binwidth is proportional to the interquartile range (IQR)
        and inversely proportional to cube root of a.size. Can be too
        conservative for small datasets, but is quite good for large
        datasets. The IQR is very robust to outliers.

    'Scott'
        .. math:: h = \sigma \sqrt[3]{\frac{24 * \sqrt{\pi}}{n}}

        The binwidth is proportional to the standard deviation of the
        data and inversely proportional to cube root of ``x.size``. Can
        be too conservative for small datasets, but is quite good for
        large datasets. The standard deviation is not very robust to
        outliers. Values are very similar to the Freedman-Diaconis
        estimator in the absence of outliers.

    'Rice'
        .. math:: n_h = 2n^{1/3}

        The number of bins is only proportional to cube root of
        ``a.size``. It tends to overestimate the number of bins and it
        does not take into account data variability.

    'Sturges'
        .. math:: n_h = \log _{2}n+1

        The number of bins is the base 2 log of ``a.size``.  This
        estimator assumes normality of data and is too conservative for
        larger, non-normal datasets. This is the default method in R's
        ``hist`` method.

    'Doane'
        .. math:: n_h = 1 + \log_{2}(n) +
                        \log_{2}(1 + \frac{|g_1|}{\sigma_{g_1})}

            g_1 = mean[(\frac{x - \mu}{\sigma})^3]

            \sigma_{g_1} = \sqrt{\frac{6(n - 2)}{(n + 1)(n + 3)}}

        An improved version of Sturges' formula that produces better
        estimates for non-normal datasets. This estimator attempts to
        account for the skew of the data.

    'Sqrt'
        .. math:: n_h = \sqrt n
        The simplest and fastest estimator. Only takes into account the
        data size.

    Examples
    --------
    >>> np.histogram([1, 2, 1], bins=[0, 1, 2, 3])
    (array([0, 2, 1]), array([0, 1, 2, 3]))
    >>> np.histogram(np.arange(4), bins=np.arange(5), density=True)
    (array([ 0.25,  0.25,  0.25,  0.25]), array([0, 1, 2, 3, 4]))
    >>> np.histogram([[1, 2, 1], [1, 0, 1]], bins=[0,1,2,3])
    (array([1, 4, 1]), array([0, 1, 2, 3]))

    >>> a = np.arange(5)
    >>> hist, bin_edges = np.histogram(a, density=True)
    >>> hist
    array([ 0.5,  0. ,  0.5,  0. ,  0. ,  0.5,  0. ,  0.5,  0. ,  0.5])
    >>> hist.sum()
    2.4999999999999996
    >>> np.sum(hist*np.diff(bin_edges))
    1.0

    .. versionadded:: 1.11.0

    Automated Bin Selection Methods example, using 2 peak random data
    with 2000 points:

    >>> import matplotlib.pyplot as plt
    >>> rng = np.random.RandomState(10)  # deterministic random data
    >>> a = np.hstack((rng.normal(size=1000),
    ...                rng.normal(loc=5, scale=2, size=1000)))
    >>> plt.hist(a, bins='auto')  # plt.hist passes it's arguments to np.histogram
    >>> plt.title("Histogram with 'auto' bins")
    >>> plt.show()

    s(weights should have the same shape as a.igg�?s/max must be larger than min in range parameter.srange parameter must be finite.g�?s"{0} not a valid estimator for binssMAutomated estimation of the number of bins is not supported for weighted dataiis$`bins` should be a positive integer.tendpointtctweightst	minlengths!bins must increase monotonically.i����tlefttrighttdtypeN(gg�?(0RtNoneR`R*tshapet
ValueErrorR%RaRttmaxtalltisfinitet
isinstanceR7t_hist_bin_selectorstformatt	TypeErrortlogical_andtreducetintRR�RR<Rtcan_casttdoubletcomplexRtTrueRRtlentastypetfloattkindtrealR3timagR>R'tr_tsearchsortedR
targsortR	tcumsumR+(tatbinstrangetnormedR~tdensitytmntmxtmitbtkeeptwidthtntypetBLOCKtntnormt	bin_edgestittmp_attmp_wt
tmp_a_datatindicest	decrementt	incrementtsatzerot
sorting_indextswtcwt	bin_indextdb((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRIs��$#

	 		$"	


"'*,	"


cC`s�y|j\}}Wn5ttfk
rJt|�j}|j\}}nXt|t�}|d
g}|d
g}	|d
k	r�t|�}ny+t	|�}
|
|kr�td��nWnt
k
r�||g}nX|d
krM|dkrt|�}t|�}q�t
t|jd�t��}t
t|jd�t��}nntjtj|��sttd��nt|�}t|�}x,t|�D]}
||
\||
<||
<q�WxUtt	|��D]A}
||
||
kr�||
d||
<||
d||
<q�q�Wtj|jtj�r7|j}nt}x�t|�D]�}
t||
�r�||
dkr�td|
��n||
d||
<t||
||
||
dd|�||
<n/t||
|�||
<t	||
�d||
<t||
�|	|
<tjtj|	|
�dk�rJtd	��qJqJWt|�}|dkrktj|d�|fSi}x;t|�D]-}
t|d
d
�|
f||
�||
<q~Wx�t|�D]�}
|	|
j�}tj|�s�tt|��d}|d
d
�|
f||
dk}t |d
d
�|
f|�t ||
d|�k}||
t!||@�dcd8<q�q�Wt|t�j"d�}|j#�}t|t�}xCtd|d�D].}
||||
|||
dj$�7}q�W|||d7}t	|�dkr/t|dt�|fSt%||�}tt	|��}|||<|j"t&|��}xVt|j'�D]E}
|j#�|
}|j(|
|�}||||
||
<||<qW|t)dd�g}||}|rV|j*�}xLt|�D]>}
t|t�}||
d||
<||	|
j"|�}qW||}n|j|dkj�r~t+d
��n||fS(sQ
    Compute the multidimensional histogram of some data.

    Parameters
    ----------
    sample : array_like
        The data to be histogrammed. It must be an (N,D) array or data
        that can be converted to such. The rows of the resulting array
        are the coordinates of points in a D dimensional polytope.
    bins : sequence or int, optional
        The bin specification:

        * A sequence of arrays describing the bin edges along each dimension.
        * The number of bins for each dimension (nx, ny, ... =bins)
        * The number of bins for all dimensions (nx=ny=...=bins).

    range : sequence, optional
        A sequence of lower and upper bin edges to be used if the edges are
        not given explicitly in `bins`. Defaults to the minimum and maximum
        values along each dimension.
    normed : bool, optional
        If False, returns the number of samples in each bin. If True,
        returns the bin density ``bin_count / sample_count / bin_volume``.
    weights : (N,) array_like, optional
        An array of values `w_i` weighing each sample `(x_i, y_i, z_i, ...)`.
        Weights are normalized to 1 if normed is True. If normed is False,
        the values of the returned histogram are equal to the sum of the
        weights belonging to the samples falling into each bin.

    Returns
    -------
    H : ndarray
        The multidimensional histogram of sample x. See normed and weights
        for the different possible semantics.
    edges : list
        A list of D arrays describing the bin edges for each dimension.

    See Also
    --------
    histogram: 1-D histogram
    histogram2d: 2-D histogram

    Examples
    --------
    >>> r = np.random.randn(100,3)
    >>> H, edges = np.histogramdd(r, bins = (5, 8, 4))
    >>> H.shape, edges[0].size, edges[1].size, edges[2].size
    ((5, 8, 4), 6, 9, 5)

    sFThe dimension of bins must be equal to the dimension of the  sample x.isrange parameter must be finite.g�?is;Element at index %s in `bins` should be a positive integer.iR�sOFound bin edge of size <= 0. Did you specify `bins` withnon-monotonic sequence?Nii����sInternal Shape Error(,R�tAttributeErrorR�RtTR
R�R�RR�R�RRRR
RtR�R�R`R�R�Rt
issubdtypeR�tinexactRRR>R*R2tisinfR$RRtreshapeR�tprodR3R'RatswapaxestsliceR+tRuntimeError(tsampleR�R�R�R~tNtDtnbintedgestdedgestMtsmintsmaxR�tedge_dttNcounttmindifftdecimaltnot_smaller_than_edgeton_edgethisttnitxyt	flatcountR�tjtcoretsR�((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRJ�s�4


!
/"+$),
!

cC`s�t|tj�s$tj|�}n|d
kr^|j|�}|jj|j|j�}n$|d}tj|�}|j	|j	kr|d
kr�t
d��n|jdkr�t
d��n|j	d|j	|kr�td��ntj
|ddd|j�jd	|�}n|jd
|dtj|j|j��}|dkj�rctd��ntj||�j|�|}|r�tj|d�|}||fS|Sd
S(s�	
    Compute the weighted average along the specified axis.

    Parameters
    ----------
    a : array_like
        Array containing data to be averaged. If `a` is not an array, a
        conversion is attempted.
    axis : int, optional
        Axis along which to average `a`. If `None`, averaging is done over
        the flattened array.
    weights : array_like, optional
        An array of weights associated with the values in `a`. Each value in
        `a` contributes to the average according to its associated weight.
        The weights array can either be 1-D (in which case its length must be
        the size of `a` along the given axis) or of the same shape as `a`.
        If `weights=None`, then all data in `a` are assumed to have a
        weight equal to one.
    returned : bool, optional
        Default is `False`. If `True`, the tuple (`average`, `sum_of_weights`)
        is returned, otherwise only the average is returned.
        If `weights=None`, `sum_of_weights` is equivalent to the number of
        elements over which the average is taken.


    Returns
    -------
    average, [sum_of_weights] : array_type or double
        Return the average along the specified axis. When returned is `True`,
        return a tuple with the average as the first element and the sum
        of the weights as the second element. The return type is `Float`
        if `a` is of integer type, otherwise it is of the same type as `a`.
        `sum_of_weights` is of the same type as `average`.

    Raises
    ------
    ZeroDivisionError
        When all weights along axis are zero. See `numpy.ma.average` for a
        version robust to this type of error.
    TypeError
        When the length of 1D `weights` is not the same as the shape of `a`
        along axis.

    See Also
    --------
    mean

    ma.average : average for masked arrays -- useful if your data contains
                 "missing" values

    Examples
    --------
    >>> data = range(1,5)
    >>> data
    [1, 2, 3, 4]
    >>> np.average(data)
    2.5
    >>> np.average(range(1,11), weights=range(10,0,-1))
    4.0

    >>> data = np.arange(6).reshape((3,2))
    >>> data
    array([[0, 1],
           [2, 3],
           [4, 5]])
    >>> np.average(data, axis=1, weights=[1./4, 3./4])
    array([ 0.75,  2.75,  4.75])
    >>> np.average(data, weights=[1./4, 3./4])
    Traceback (most recent call last):
    ...
    TypeError: Axis must be specified when shapes of a and weights differ.

    gs;Axis must be specified when shapes of a and weights differ.is81D weights expected when shapes of a and weights differ.is5Length of weights not compatible with specified axis.R;tndmini����taxisR�s(Weights sum to zero, can't be normalizedN(R�R`tmatrixRR�R)R�ttypeRaR�R�tndimR�R
R�R+tresult_typeR*tZeroDivisionErrorR(R�R�R~treturnedtavgtscltwgt((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRHYs6J
-*
cC`sWt|d|d|�}|jjtdkrStj|�j�rStd��n|S(sTConvert the input to an array, checking for NaNs or Infs.

    Parameters
    ----------
    a : array_like
        Input data, in any form that can be converted to an array.  This
        includes lists, lists of tuples, tuples, tuples of tuples, tuples
        of lists and ndarrays.  Success requires no NaNs or Infs.
    dtype : data-type, optional
        By default, the data-type is inferred from the input data.
    order : {'C', 'F'}, optional
         Whether to use row-major (C-style) or
         column-major (Fortran-style) memory representation.
         Defaults to 'C'.

    Returns
    -------
    out : ndarray
        Array interpretation of `a`.  No copy is performed if the input
        is already an ndarray.  If `a` is a subclass of ndarray, a base
        class ndarray is returned.

    Raises
    ------
    ValueError
        Raises ValueError if `a` contains NaN (Not a Number) or Inf (Infinity).

    See Also
    --------
    asarray : Create and array.
    asanyarray : Similar function which passes through subclasses.
    ascontiguousarray : Convert input to a contiguous array.
    asfarray : Convert input to a floating point ndarray.
    asfortranarray : Convert input to an ndarray with column-major
                     memory order.
    fromiter : Create an array from an iterator.
    fromfunction : Construct an array by executing a function on grid
                   positions.

    Examples
    --------
    Convert a list into an array.  If all elements are finite
    ``asarray_chkfinite`` is identical to ``asarray``.

    >>> a = [1, 2]
    >>> np.asarray_chkfinite(a, dtype=float)
    array([1., 2.])

    Raises ValueError if array_like contains Nans or Infs.

    >>> a = [1, 2, np.inf]
    >>> try:
    ...     np.asarray_chkfinite(a)
    ... except ValueError:
    ...     print('ValueError')
    ...
    ValueError

    R�tordertAllFloats#array must not contain infs or NaNs(RR�tcharR,R`R�R�R�(R�R�R�((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRG�s
<,cO`s*t|�}t|�}t|�sKt|dt�pGt|dt�rW|g}nt|dt�}t|�}t}|j	dkr�|d}t}|jddkr�|j
}q�n||dkr~tjj|dd�}|j	dkrtj||g�}neg|D]}	t|	dt�^q}|d}x%td|�D]}
|||
O}qKW|j|�|d7}nt|j|j�}x{t|�D]m}
||
}t|tj�s�||||
<q�|||
}
|
jdkr�||
||�|||
<q�q�W|r&|j�}n|S(sR
    Evaluate a piecewise-defined function.

    Given a set of conditions and corresponding functions, evaluate each
    function on the input data wherever its condition is true.

    Parameters
    ----------
    x : ndarray
        The input domain.
    condlist : list of bool arrays
        Each boolean array corresponds to a function in `funclist`.  Wherever
        `condlist[i]` is True, `funclist[i](x)` is used as the output value.

        Each boolean array in `condlist` selects a piece of `x`,
        and should therefore be of the same shape as `x`.

        The length of `condlist` must correspond to that of `funclist`.
        If one extra function is given, i.e. if
        ``len(funclist) - len(condlist) == 1``, then that extra function
        is the default value, used wherever all conditions are false.
    funclist : list of callables, f(x,*args,**kw), or scalars
        Each function is evaluated over `x` wherever its corresponding
        condition is True.  It should take an array as input and give an array
        or a scalar value as output.  If, instead of a callable,
        a scalar is provided then a constant function (``lambda x: scalar``) is
        assumed.
    args : tuple, optional
        Any further arguments given to `piecewise` are passed to the functions
        upon execution, i.e., if called ``piecewise(..., ..., 1, 'a')``, then
        each function is called as ``f(x, 1, 'a')``.
    kw : dict, optional
        Keyword arguments used in calling `piecewise` are passed to the
        functions upon execution, i.e., if called
        ``piecewise(..., ..., lambda=1)``, then each function is called as
        ``f(x, lambda=1)``.

    Returns
    -------
    out : ndarray
        The output is the same shape and type as x and is found by
        calling the functions in `funclist` on the appropriate portions of `x`,
        as defined by the boolean arrays in `condlist`.  Portions not covered
        by any condition have a default value of 0.


    See Also
    --------
    choose, select, where

    Notes
    -----
    This is similar to choose or select, except that functions are
    evaluated on elements of `x` that satisfy the corresponding condition from
    `condlist`.

    The result is::

            |--
            |funclist[0](x[condlist[0]])
      out = |funclist[1](x[condlist[1]])
            |...
            |funclist[n2](x[condlist[n2]])
            |--

    Examples
    --------
    Define the sigma function, which is -1 for ``x < 0`` and +1 for ``x >= 0``.

    >>> x = np.linspace(-2.5, 2.5, 6)
    >>> np.piecewise(x, [x < 0, x >= 0], [-1, 1])
    array([-1., -1., -1.,  1.,  1.,  1.])

    Define the absolute value, which is ``-x`` for ``x <0`` and ``x`` for
    ``x >= 0``.

    >>> np.piecewise(x, [x < 0, x >= 0], [lambda x: -x, lambda x: x])
    array([ 2.5,  1.5,  0.5,  0.5,  1.5,  2.5])

    iR�i����iR�N(RR�RR�tlistRR
tbooltFalseR�R�R�R�R�R`t
logical_orR�tvstackRR�R[RR�tcollectionstCallableRatsqueeze(Rbtcondlisttfunclisttargstkwtn2R�tzerodttotlistR}tkR^titemtvals((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyR9
sDQ
%


!cC`s$t|�t|�kr'td��nt|�dkrZtjdt�tj|�d
Sg|D]}tj|�^qa}|jtj|��tj|�}tj	|�}tj	|�}t
}x�tt|��D]l}||}|jj
tjk	r�tj|jtj�r5||jt�||<t}qDtd��q�q�W|rgd}tj|t�n|djdkr�|dj}	n!tj	|d|d�dj}	tj|	|d|�}
|ddd�}|ddd�}x3t||�D]"\}}tj|
|d	|�q�W|
S(s�
    Return an array drawn from elements in choicelist, depending on conditions.

    Parameters
    ----------
    condlist : list of bool ndarrays
        The list of conditions which determine from which array in `choicelist`
        the output elements are taken. When multiple conditions are satisfied,
        the first one encountered in `condlist` is used.
    choicelist : list of ndarrays
        The list of arrays from which the output elements are taken. It has
        to be of the same length as `condlist`.
    default : scalar, optional
        The element inserted in `output` when all conditions evaluate to False.

    Returns
    -------
    output : ndarray
        The output at position m is the m-th element of the array in
        `choicelist` where the m-th element of the corresponding array in
        `condlist` is True.

    See Also
    --------
    where : Return elements from one of two arrays depending on condition.
    take, choose, compress, diag, diagonal

    Examples
    --------
    >>> x = np.arange(10)
    >>> condlist = [x<3, x>5]
    >>> choicelist = [x, x**2]
    >>> np.select(condlist, choicelist)
    array([ 0,  1,  2,  0,  0,  0, 36, 49, 64, 81])

    s7list of cases must be same length as list of conditionsisIselect with an empty condition list is not possibleand will be deprecateds6invalid entry in choicelist: should be boolean ndarrays�select condlists containing integer ndarrays is deprecated and will be removed in the future. Use `.astype(bool)` to convert to bools.i����i����NR((R�R�twarningstwarntDeprecationWarningR`RR[R�tbroadcast_arraysR�R�R�R�tbool_R�RR�R�R�R�R�tfulltziptcopyto(R�t
choicelisttdefaulttchoiceR�tdeprecated_intsR�tcondtmsgtresult_shapetresult((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyR8�sB&	"
	!tKcC`st|d|dt�S(s
    Return an array copy of the given object.

    Parameters
    ----------
    a : array_like
        Input data.
    order : {'C', 'F', 'A', 'K'}, optional
        Controls the memory layout of the copy. 'C' means C-order,
        'F' means F-order, 'A' means 'F' if `a` is Fortran contiguous,
        'C' otherwise. 'K' means match the layout of `a` as closely
        as possible. (Note that this function and :meth:ndarray.copy are very
        similar, but have different default values for their order=
        arguments.)

    Returns
    -------
    arr : ndarray
        Array interpretation of `a`.

    Notes
    -----
    This is equivalent to

    >>> np.array(a, copy=True)                              #doctest: +SKIP

    Examples
    --------
    Create an array x, with a reference y and a copy z:

    >>> x = np.array([1, 2, 3])
    >>> y = x
    >>> z = np.copy(x)

    Note that, when we modify x, y changes, but not z:

    >>> x[0] = 10
    >>> x[0] == y[0]
    True
    >>> x[0] == z[0]
    False

    R�R;(R
R�(R�R�((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyR;�s,c`sltj|�}t|j��|jdd �}|d krQtt���}nt|t	�rl|f}nt|t�s�t
d��nt�fd�|D��}t|��ks�t|�dkr�t
d��ntt|��t|�krt
d��nt|�}|dkr.dg�}nM|dkrN|dg�}n-|t|�krot|�}ntd	��|jd
d�}|r�t
djdj|j�����n|d
kr�t
d��ng}td �g�}td �g�}	td �g�}
td �g�}|jj}|d!krHd}n|dkro|jjjdd�}n|dkr�|j}n|jjd"kr�|jd�}
n|}
x�t|�D]�\}}|
j|d
kr�t
d��n|
j|d
ks|dkr�tj|
d|�}tdd�||<td
d �|	|<td d�|
|<|
|	|
|
d||<d||<d|	|<d|
|<|
|	|
|
||<d||<d|	|<d|
|<|
|	|
|
||<n
tj|
d|�}tdd�||<td
d �|	|<td d�|
|<|
|	|
|
d||<d||<d|	|<d|
|<d
||<d|
|	d|
|
|
|d||<d||<d|	|<d|
|<d||<d|
|	d|
|
|
|d||<|||}|j|�td �||<td �|	|<td �|
|<td �||<q�Wt|�dkrd|dS|Sd S(#s�	
    Return the gradient of an N-dimensional array.

    The gradient is computed using second order accurate central differences
    in the interior and either first differences or second order accurate
    one-sides (forward or backwards) differences at the boundaries. The
    returned gradient hence has the same shape as the input array.

    Parameters
    ----------
    f : array_like
        An N-dimensional array containing samples of a scalar function.
    varargs : scalar or list of scalar, optional
        N scalars specifying the sample distances for each dimension,
        i.e. `dx`, `dy`, `dz`, ... Default distance: 1.
        single scalar specifies sample distance for all dimensions.
        if `axis` is given, the number of varargs must equal the number of axes.
    edge_order : {1, 2}, optional
        Gradient is calculated using N\ :sup:`th` order accurate differences
        at the boundaries. Default: 1.

        .. versionadded:: 1.9.1

    axis : None or int or tuple of ints, optional
        Gradient is calculated only along the given axis or axes
        The default (axis = None) is to calculate the gradient for all the axes of the input array.
        axis may be negative, in which case it counts from the last to the first axis.

        .. versionadded:: 1.11.0

    Returns
    -------
    gradient : list of ndarray
        Each element of `list` has the same shape as `f` giving the derivative
        of `f` with respect to each dimension.

    Examples
    --------
    >>> x = np.array([1, 2, 4, 7, 11, 16], dtype=np.float)
    >>> np.gradient(x)
    array([ 1. ,  1.5,  2.5,  3.5,  4.5,  5. ])
    >>> np.gradient(x, 2)
    array([ 0.5 ,  0.75,  1.25,  1.75,  2.25,  2.5 ])

    For two dimensional arrays, the return will be two arrays ordered by
    axis. In this example the first array stands for the gradient in
    rows and the second one in columns direction:

    >>> np.gradient(np.array([[1, 2, 6], [3, 4, 5]], dtype=np.float))
    [array([[ 2.,  2., -1.],
            [ 2.,  2., -1.]]), array([[ 1. ,  2.5,  4. ],
            [ 1. ,  1. ,  1. ]])]

    >>> x = np.array([0, 1, 2, 3, 4])
    >>> dx = np.gradient(x)
    >>> y = x**2
    >>> np.gradient(y, dx, edge_order=2)
    array([-0.,  2.,  4.,  6.,  8.])

    The axis keyword can be used to specify a subset of axes of which the gradient is calculated
    >>> np.gradient(np.array([[1, 2, 6], [3, 4, 5]], dtype=np.float), axis=0)
    array([[ 2.,  2., -1.],
           [ 2.,  2., -1.]])
    R�s3A tuple of integers or a single integer is requiredc3`s+|]!}|dkr|�n|VqdS(iN((t.0Rb(R�(sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pys	<genexpr>osis'axis' entry is out of boundssduplicate value in 'axis'g�?isinvalid number of argumentst
edge_orders%"{}" are not valid keyword arguments.s", "is)'edge_order' greater than 2 not supportedtftdtFR�tmR�tdatetimet	timedeltatint64s_Shape of array too small to calculate a numerical gradient, at least two elements are required.R�i����i����g@g@g@i����N(RRRR�RR�(R�R(R`RR�R�tpopR�ttupleR�R�R�R�R�RtR�tsetR�tSyntaxErrorR�tjointkeysR�R�R�tnametreplacetviewt	enumerateRR[(RtvarargstkwargstaxesR�tdxRtoutvalstslice1tslice2tslice3tslice4totypeR^R�R�tout((R�sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyR?!s�A$			









+



*
i����cC`s�|dkr|S|dkr5tdt|���nt|�}t|j�}td�g|}td�g|}tdd�||<tdd�||<t|�}t|�}|dkr�t|||||dd|�S||||SdS(s
    Calculate the n-th discrete difference along given axis.

    The first difference is given by ``out[n] = a[n+1] - a[n]`` along
    the given axis, higher differences are calculated by using `diff`
    recursively.

    Parameters
    ----------
    a : array_like
        Input array
    n : int, optional
        The number of times values are differenced.
    axis : int, optional
        The axis along which the difference is taken, default is the last axis.

    Returns
    -------
    diff : ndarray
        The n-th differences. The shape of the output is the same as `a`
        except along `axis` where the dimension is smaller by `n`.
.

    See Also
    --------
    gradient, ediff1d, cumsum

    Examples
    --------
    >>> x = np.array([1, 2, 4, 7, 0])
    >>> np.diff(x)
    array([ 1,  2,  3, -7])
    >>> np.diff(x, n=2)
    array([  1,   1, -10])

    >>> x = np.array([[1, 3, 6, 10], [0, 5, 6, 8]])
    >>> np.diff(x)
    array([[2, 3, 4],
           [5, 1, 2]])
    >>> np.diff(x, axis=0)
    array([[-1,  2,  0, -2]])

    is#order must be non-negative but got ii����R�N(	R�treprRR�R�R�R�RR>(R�R�R�tndR%R&((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyR>�s ,#cC`s^|dkr�t|tttf�rCt|g||||�j�St|tj�r�|j	dkr�t|g||||�j�St|||||�Sn�|dkr�t
d��nt|�}d}d}t}t|tttf�r�t
}|g}ntj|dtj�}tj|dtj�}tj|dtj�}|j	dkse|j	dkrtt
d��n|jd|jdkr�t
d��n||}||}tj|�}||}||}tj|d|||dd!|f�}tj|d||dd!f�}|r>t|||||�St|||||�j�SdS(	s�	
    One-dimensional linear interpolation.

    Returns the one-dimensional piecewise linear interpolant to a function
    with given values at discrete data-points.

    Parameters
    ----------
    x : array_like
        The x-coordinates of the interpolated values.

    xp : 1-D sequence of floats
        The x-coordinates of the data points, must be increasing if argument
        `period` is not specified. Otherwise, `xp` is internally sorted after
        normalizing the periodic boundaries with ``xp = xp % period``.

    fp : 1-D sequence of floats
        The y-coordinates of the data points, same length as `xp`.

    left : float, optional
        Value to return for `x < xp[0]`, default is `fp[0]`.

    right : float, optional
        Value to return for `x > xp[-1]`, default is `fp[-1]`.

    period : None or float, optional
        A period for the x-coordinates. This parameter allows the proper
        interpolation of angular x-coordinates. Parameters `left` and `right`
        are ignored if `period` is specified.

        .. versionadded:: 1.10.0

    Returns
    -------
    y : float or ndarray
        The interpolated values, same shape as `x`.

    Raises
    ------
    ValueError
        If `xp` and `fp` have different length
        If `xp` or `fp` are not 1-D sequences
        If `period == 0`

    Notes
    -----
    Does not check that the x-coordinate sequence `xp` is increasing.
    If `xp` is not increasing, the results are nonsense.
    A simple check for increasing is::

        np.all(np.diff(xp) > 0)

    Examples
    --------
    >>> xp = [1, 2, 3]
    >>> fp = [3, 2, 0]
    >>> np.interp(2.5, xp, fp)
    1.0
    >>> np.interp([0, 1, 1.5, 2.72, 3.14], xp, fp)
    array([ 3. ,  3. ,  2.5 ,  0.56,  0. ])
    >>> UNDEF = -99.0
    >>> np.interp(3.14, xp, fp, right=UNDEF)
    -99.0

    Plot an interpolant to the sine function:

    >>> x = np.linspace(0, 2*np.pi, 10)
    >>> y = np.sin(x)
    >>> xvals = np.linspace(0, 2*np.pi, 50)
    >>> yinterp = np.interp(xvals, x, y)
    >>> import matplotlib.pyplot as plt
    >>> plt.plot(x, y, 'o')
    [<matplotlib.lines.Line2D object at 0x...>]
    >>> plt.plot(xvals, yinterp, '-x')
    [<matplotlib.lines.Line2D object at 0x...>]
    >>> plt.show()

    Interpolation with periodic x-coordinates:

    >>> x = [-180, -170, -185, 185, -10, -5, 0, 365]
    >>> xp = [190, -190, 350, -350]
    >>> fp = [5, 10, 3, 4]
    >>> np.interp(x, xp, fp, period=360)
    array([7.5, 5., 8.75, 6.25, 3., 3.25, 3.5, 3.75])

    isperiod must be a non-zero valueR�is!Data points must be 1-D sequencess$fp and xp are not of the same lengthi����N(R�R�R�R�R-tcompiled_interpR�R`RR�R�tabsR�R�Rtfloat64R�R�R	(RbtxptfpR�R�tperiodtreturn_arraytasort_xp((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyR4-s@W!



+#cC`so|rdt}nd}t|�}t|jjtj�rR|j}|j}nd}|}t	||�|S(s�
    Return the angle of the complex argument.

    Parameters
    ----------
    z : array_like
        A complex number or sequence of complex numbers.
    deg : bool, optional
        Return angle in degrees if True, radians if False (default).

    Returns
    -------
    angle : ndarray or scalar
        The counterclockwise angle from the positive real axis on
        the complex plane, with dtype as numpy.float64.

    See Also
    --------
    arctan2
    absolute



    Examples
    --------
    >>> np.angle([1.0, 1.0j, 1+1j])               # in radians
    array([ 0.        ,  1.57079633,  0.78539816])
    >>> np.angle(1+1j, deg=True)                  # in degrees
    45.0

    i�g�?i(
RRt
issubclassR�R�t_nxtcomplexfloatingR�R�R(tztdegtfacttzimagtzreal((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyR@�s 
	c	C`s�t|�}t|j�}t|d|�}td	d	�g|}tdd	�||<t|tdt�t}tj	|td|tk|dk@�||}tj	|ddt
|�|k�t|dtdd�}|||j
|�||<|S(
s8
    Unwrap by changing deltas between values to 2*pi complement.

    Unwrap radian phase `p` by changing absolute jumps greater than
    `discont` to their 2*pi complement along the given axis.

    Parameters
    ----------
    p : array_like
        Input array.
    discont : float, optional
        Maximum discontinuity between values, default is ``pi``.
    axis : int, optional
        Axis along which unwrap will operate, default is the last axis.

    Returns
    -------
    out : ndarray
        Output array.

    See Also
    --------
    rad2deg, deg2rad

    Notes
    -----
    If the discontinuity in `p` is smaller than ``pi``, but larger than
    `discont`, no unwrapping is done because taking the 2*pi complement
    would only make the discontinuity larger.

    Examples
    --------
    >>> phase = np.linspace(0, np.pi, num=5)
    >>> phase[3:] += np.pi
    >>> phase
    array([ 0.        ,  0.78539816,  1.57079633,  5.49778714,  6.28318531])
    >>> np.unwrap(phase)
    array([ 0.        ,  0.78539816,  1.57079633, -0.78539816,  0.        ])

    R�iiRiR;R�RN(RR�R�R>R�R�R"RR6RR.R
R�R�(	tptdiscontR�R,tddR%tddmodt
ph_correcttup((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRA�s)'
"cC`s�t|dt�}|j�t|jjtj�s�|jjdkrS|j	d�S|jjdkrr|j	d�S|j	d�Sn|SdS(s�
    Sort a complex array using the real part first, then the imaginary part.

    Parameters
    ----------
    a : array_like
        Input array

    Returns
    -------
    out : complex ndarray
        Always returns a sorted complex array.

    Examples
    --------
    >>> np.sort_complex([5, 3, 6, 2, 1])
    array([ 1.+0.j,  2.+0.j,  3.+0.j,  5.+0.j,  6.+0.j])

    >>> np.sort_complex([1 + 2j, 2 - 1j, 3 - 2j, 3 - 3j, 3 + 5j])
    array([ 1.+2.j,  2.-1.j,  3.-3.j,  3.-2.j,  3.+5.j])

    R;tbhBHRtgtGR�N(
R
R�R'R5R�R�R6R7R�R�(R�R�((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRBs


tfbcC`s�d}|j�}d|krLx+|D] }|dkr;Pq%|d}q%Wnt|�}d|kr�x8|ddd�D] }|dkr�Pqx|d}qxWn|||!S(s3
    Trim the leading and/or trailing zeros from a 1-D array or sequence.

    Parameters
    ----------
    filt : 1-D array or sequence
        Input array.
    trim : str, optional
        A string with 'f' representing trim from front and 'b' to trim from
        back. Default is 'fb', trim zeros from both front and back of the
        array.

    Returns
    -------
    trimmed : 1-D array or sequence
        The result of trimming the input. The input data type is preserved.

    Examples
    --------
    >>> a = np.array((0, 0, 0, 1, 2, 3, 0, 2, 1, 0))
    >>> np.trim_zeros(a)
    array([1, 2, 3, 0, 2, 1])

    >>> np.trim_zeros(a, 'b')
    array([0, 0, 0, 1, 2, 3, 0, 2, 1])

    The input data type is preserved, list/tuple in means list/tuple out.

    >>> np.trim_zeros([0, 1, 2, 0])
    [1, 2]

    iRgitBNi����(tupperR�(tfiltttrimtfirstR�tlast((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyR:3s!
cC`s�yX|j�}|jdkr"|S|j�ttg|d|d kf�}||SWn*tk
r�tt|��}t|�SXdS(sW
    This function is deprecated.  Use numpy.lib.arraysetops.unique()
    instead.
    iii����N(	tflattenRaR'R	R�R�tsortedRR(Rbttmptidxtitems((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pytuniquefs
#
cC`s&tjt|�tt|��d�S(s�
    Return the elements of an array that satisfy some condition.

    This is equivalent to ``np.compress(ravel(condition), ravel(arr))``.  If
    `condition` is boolean ``np.extract`` is equivalent to ``arr[condition]``.

    Note that `place` does the exact opposite of `extract`.

    Parameters
    ----------
    condition : array_like
        An array whose nonzero or True entries indicate the elements of `arr`
        to extract.
    arr : array_like
        Input array of the same size as `condition`.

    Returns
    -------
    extract : ndarray
        Rank 1 array of values from `arr` where `condition` is True.

    See Also
    --------
    take, put, copyto, compress, place

    Examples
    --------
    >>> arr = np.arange(12).reshape((3, 4))
    >>> arr
    array([[ 0,  1,  2,  3],
           [ 4,  5,  6,  7],
           [ 8,  9, 10, 11]])
    >>> condition = np.mod(arr, 3)==0
    >>> condition
    array([[ True, False, False,  True],
           [False, False,  True, False],
           [False,  True, False, False]], dtype=bool)
    >>> np.extract(condition, arr)
    array([0, 3, 6, 9])


    If `condition` is boolean:

    >>> arr[condition]
    array([0, 3, 6, 9])

    i(R6RR%R&(t	conditiontarr((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRDxs0cC`sFt|tj�s6tdjdt|�j���nt|||�S(s�
    Change elements of an array based on conditional and input values.

    Similar to ``np.copyto(arr, vals, where=mask)``, the difference is that
    `place` uses the first N elements of `vals`, where N is the number of
    True values in `mask`, while `copyto` uses the elements where `mask`
    is True.

    Note that `extract` does the exact opposite of `place`.

    Parameters
    ----------
    arr : ndarray
        Array to put data into.
    mask : array_like
        Boolean mask array. Must have the same size as `a`.
    vals : 1-D sequence
        Values to put into `a`. Only the first N elements are used, where
        N is the number of True values in `mask`. If `vals` is smaller
        than N it will be repeated.

    See Also
    --------
    copyto, put, take, extract

    Examples
    --------
    >>> arr = np.arange(6).reshape(2, 3)
    >>> np.place(arr, arr>2, [44, 55])
    >>> arr
    array([[ 0,  1,  2],
           [44, 55, 44]])

    s,argument 1 must be numpy.ndarray, not {name}R(R�R`RR�R�R�t__name__R0(RTtmaskR�((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRE�s#cC`sQ|dkrtj}n|r2|jd|�n|jd|�|j�dS(s7
    Display a message on a device.

    Parameters
    ----------
    mesg : str
        Message to display.
    device : object
        Device to write message. If None, defaults to ``sys.stdout`` which is
        very similar to ``print``. `device` needs to have ``write()`` and
        ``flush()`` methods.
    linefeed : bool, optional
        Option whether to print a line feed or not. Defaults to True.

    Raises
    ------
    AttributeError
        If `device` does not have a ``write()`` or ``flush()`` method.

    Examples
    --------
    Besides ``sys.stdout``, a file-like object can also be used as it has
    both required methods:

    >>> from StringIO import StringIO
    >>> buf = StringIO()
    >>> np.disp('"Display" in a file', device=buf)
    >>> buf.getvalue()
    '"Display" in a file\n'

    s%s
s%sN(R�tsyststdouttwritetflush(tmesgtdevicetlinefeed((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRC�s 
cB`s>eZdZddded�Zd�Zd�Zd�ZRS(s 
    vectorize(pyfunc, otypes='', doc=None, excluded=None, cache=False)

    Generalized function class.

    Define a vectorized function which takes a nested sequence
    of objects or numpy arrays as inputs and returns a
    numpy array as output. The vectorized function evaluates `pyfunc` over
    successive tuples of the input arrays like the python map function,
    except it uses the broadcasting rules of numpy.

    The data type of the output of `vectorized` is determined by calling
    the function with the first element of the input.  This can be avoided
    by specifying the `otypes` argument.

    Parameters
    ----------
    pyfunc : callable
        A python function or method.
    otypes : str or list of dtypes, optional
        The output data type. It must be specified as either a string of
        typecode characters or a list of data type specifiers. There should
        be one data type specifier for each output.
    doc : str, optional
        The docstring for the function. If `None`, the docstring will be the
        ``pyfunc.__doc__``.
    excluded : set, optional
        Set of strings or integers representing the positional or keyword
        arguments for which the function will not be vectorized.  These will be
        passed directly to `pyfunc` unmodified.

        .. versionadded:: 1.7.0

    cache : bool, optional
       If `True`, then cache the first function call that determines the number
       of outputs if `otypes` is not provided.

        .. versionadded:: 1.7.0

    Returns
    -------
    vectorized : callable
        Vectorized function.

    Examples
    --------
    >>> def myfunc(a, b):
    ...     "Return a-b if a>b, otherwise return a+b"
    ...     if a > b:
    ...         return a - b
    ...     else:
    ...         return a + b

    >>> vfunc = np.vectorize(myfunc)
    >>> vfunc([1, 2, 3, 4], 2)
    array([3, 4, 1, 2])

    The docstring is taken from the input function to `vectorize` unless it
    is specified

    >>> vfunc.__doc__
    'Return a-b if a>b, otherwise return a+b'
    >>> vfunc = np.vectorize(myfunc, doc='Vectorized `myfunc`')
    >>> vfunc.__doc__
    'Vectorized `myfunc`'

    The output type is determined by evaluating the first element of the input,
    unless it is specified

    >>> out = vfunc([1, 2, 3, 4], 2)
    >>> type(out[0])
    <type 'numpy.int32'>
    >>> vfunc = np.vectorize(myfunc, otypes=[np.float])
    >>> out = vfunc([1, 2, 3, 4], 2)
    >>> type(out[0])
    <type 'numpy.float64'>

    The `excluded` argument can be used to prevent vectorizing over certain
    arguments.  This can be useful for array-like arguments of a fixed length
    such as the coefficients for a polynomial as in `polyval`:

    >>> def mypolyval(p, x):
    ...     _p = list(p)
    ...     res = _p.pop(0)
    ...     while _p:
    ...         res = res*x + _p.pop(0)
    ...     return res
    >>> vpolyval = np.vectorize(mypolyval, excluded=['p'])
    >>> vpolyval(p=[1, 2, 3], x=[0, 1])
    array([3, 6])

    Positional arguments may also be excluded by specifying their position:

    >>> vpolyval.excluded.add(0)
    >>> vpolyval([1, 2, 3], x=[0, 1])
    array([3, 6])

    Notes
    -----
    The `vectorize` function is provided primarily for convenience, not for
    performance. The implementation is essentially a for loop.

    If `otypes` is not specified, then a call to the function with the
    first argument will be used to determine the number of outputs.  The
    results of this call will be cached if `cache` is `True` to prevent
    calling the function twice.  However, to implement the cache, the
    original function must be wrapped which will slow down subsequent
    calls, so only do this if your function is expensive.

    The new keyword argument interface and `excluded` argument support
    further degrades performance.

    tcC`s||_||_d|_|dkr6|j|_n	||_t|t�r�||_x�|jD],}|tdkrat	d|f��qaqaWnLt
|�r�djg|D]}tj
|�j^q��|_nt	d��|dkr�t�}nt|�|_dS(NtAllsInvalid otype specified: %sR^sInvalid otype specification(tpyfunctcacheR�t_ufunct__doc__R�tstrtotypesR,R�R<RR6R�R�Rtexcluded(tselfR`RetdocRfRaR�Rb((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyt__init__rs&					4	c	`s�j}�r)|r)�j}|}n�t|�}g�D]}||kr<|^q<�gt|�D]}||krg|^qg�t|�������fd�}g�D]}||^q�}|jg�D]}�|^q���jd|d|�S(s�
        Return arrays with the results of `pyfunc` broadcast (vectorized) over
        `args` and `kwargs` not in `excluded`.
        c`s[x(t��D]\}}||�|<q
W�jt�|t�����j���S(N(RtupdateRR�R`(tvargst_nt_i(tindsR!tnamesRgtthe_args(sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pytfunc�s RqR�(RfR`R�R�R�textendt_vectorize_call(	RgR�R!RfRqRktnargsRlRm((RnR!RoRgRpsJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyt__call__�s			%+$c`se|std��n|jr|j}t|�}�|jkr]|jdk	r]|j}q[t�t|�|�}|_n�g|D]}t|�jd^q�}�|�}|j	r�|g���fd�}	n�}	t
|t�r�t|�}nd}|f}djgt
|�D]}
t||
�jj^q�}t|	t|�|�}||fS(sReturn (ufunc, otypes).sargs can not be emptyic`s�r�j�S�|�SdS(N(R(Rk(t_cacheRq(sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyt_func�s
iR^N(R�ReR�R`RbR�RRtflatRaR�RRR�R�R�(RgRqR�Retnouttufunct_atinputstoutputsRwt_k((RvRqsJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyt_get_ufunc_and_otypes�s,		"&				/cC`s�|s|�}n�|jd|d|�\}}g|D]$}t|dtdtdt�^q7}||�}|jdkr�t|dtdtd|d�}nFtgt||�D]*\}	}
t|	dtdtd|
�^q��}|S(s1Vectorized call to `func` over positional `args`.RqR�R;tsubokR�ii(RR
R�R�tobjectRyRR(RgRqR�t_resRzReR{R|R}t_xt_t((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRs�s.	@N(	RUt
__module__RcR�R�RiRuRRs(((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRF�sq			8cC`s5|dk	r-|t|�kr-td��ntj|�}|dkr`tj|tj�}n'tj|�}tj||tj�}t|ddd|�}|dkr�|jddkr�|j	}n|jddkr�tjg�j
dd�S|dk	rct|dtddd|�}|dkrK|jddkrK|j	}ntj||f�}n|dkr�|dkr�d}q�d}nd}	|dk	rUtj|dtj
�}tj|tj|�k�s�td��n|jdkrtd	��n|jd|jdkr+td
��nt|dk�rLtd��n|}	n|dk	rtj|dtj
�}|jdkr�td��n|jd|jdkr�td
��nt|dk�r�td��n|	dkr�|}	q|	|9}	nt|ddd|	dt�\}
}|d}|	dkrQ|jd|}nJ|dkrf|}n5|dkr||}n||t|	|�|}|dkr�tjdt�d}n||
dd�df8}|	dkr�|j	}
n
||	j	}
t||
j��}|dtj|�9}|j�S(s�
    Estimate a covariance matrix, given data and weights.

    Covariance indicates the level to which two variables vary together.
    If we examine N-dimensional samples, :math:`X = [x_1, x_2, ... x_N]^T`,
    then the covariance matrix element :math:`C_{ij}` is the covariance of
    :math:`x_i` and :math:`x_j`. The element :math:`C_{ii}` is the variance
    of :math:`x_i`.

    See the notes for an outline of the algorithm.

    Parameters
    ----------
    m : array_like
        A 1-D or 2-D array containing multiple variables and observations.
        Each row of `m` represents a variable, and each column a single
        observation of all those variables. Also see `rowvar` below.
    y : array_like, optional
        An additional set of variables and observations. `y` has the same form
        as that of `m`.
    rowvar : bool, optional
        If `rowvar` is True (default), then each row represents a
        variable, with observations in the columns. Otherwise, the relationship
        is transposed: each column represents a variable, while the rows
        contain observations.
    bias : bool, optional
        Default normalization (False) is by ``(N - 1)``, where ``N`` is the
        number of observations given (unbiased estimate). If `bias` is True, then
        normalization is by ``N``. These values can be overridden by using the
        keyword ``ddof`` in numpy versions >= 1.5.
    ddof : int, optional
        If not ``None`` the default value implied by `bias` is overridden.
        Note that ``ddof=1`` will return the unbiased estimate, even if both
        `fweights` and `aweights` are specified, and ``ddof=0`` will return
        the simple average. See the notes for the details. The default value
        is ``None``.

        .. versionadded:: 1.5
    fweights : array_like, int, optional
        1-D array of integer freguency weights; the number of times each
        observation vector should be repeated.

        .. versionadded:: 1.10
    aweights : array_like, optional
        1-D array of observation vector weights. These relative weights are
        typically large for observations considered "important" and smaller for
        observations considered less "important". If ``ddof=0`` the array of
        weights can be used to assign probabilities to observation vectors.

        .. versionadded:: 1.10

    Returns
    -------
    out : ndarray
        The covariance matrix of the variables.

    See Also
    --------
    corrcoef : Normalized covariance matrix

    Notes
    -----
    Assume that the observations are in the columns of the observation
    array `m` and let ``f = fweights`` and ``a = aweights`` for brevity. The
    steps to compute the weighted covariance are as follows::

        >>> w = f * a
        >>> v1 = np.sum(w)
        >>> v2 = np.sum(w * a)
        >>> m -= np.sum(m * w, axis=1, keepdims=True) / v1
        >>> cov = np.dot(m * w, m.T) * v1 / (v1**2 - ddof * v2)

    Note that when ``a == 1``, the normalization factor
    ``v1 / (v1**2 - ddof * v2)`` goes over to ``1 / (np.sum(f) - ddof)``
    as it should.

    Examples
    --------
    Consider two variables, :math:`x_0` and :math:`x_1`, which
    correlate perfectly, but in opposite directions:

    >>> x = np.array([[0, 2], [1, 1], [2, 0]]).T
    >>> x
    array([[0, 1, 2],
           [2, 1, 0]])

    Note how :math:`x_0` increases while :math:`x_1` decreases. The covariance
    matrix shows this clearly:

    >>> np.cov(x)
    array([[ 1., -1.],
           [-1.,  1.]])

    Note that element :math:`C_{0,1}`, which shows the correlation between
    :math:`x_0` and :math:`x_1`, is negative.

    Further, note how `x` and `y` are combined:

    >>> x = [-2.1, -1,  4.3]
    >>> y = [3,  1.1,  0.12]
    >>> X = np.vstack((x,y))
    >>> print(np.cov(X))
    [[ 11.71        -4.286     ]
     [ -4.286        2.14413333]]
    >>> print(np.cov(x, y))
    [[ 11.71        -4.286     ]
     [ -4.286        2.14413333]]
    >>> print(np.cov(x))
    11.71

    sddof must be integerR�iR�iiR;sfweights must be integers'cannot handle multidimensional fweightss,incompatible numbers of samples and fweightssfweights cannot be negatives'cannot handle multidimensional aweightss,incompatible numbers of samples and aweightssaweights cannot be negativeR�R~R�s!Degrees of freedom <= 0 for slicegNg�?(R�R�R�R`RR�R/R
R�R�R�R�R�R�R�RR�R�R�R*RHR�R+R�R�tRuntimeWarningRtconjR�(RR^trowvartbiastddoftfweightstaweightsR�tXtwR�tw_sumR:tX_TR}((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRK�s�r				
$
	
	
cC`s|tjk	s|tjk	r1tjdt�nt|||�}yt|�}Wntk
rk||SXt|j	�}||dd�df}||ddd�f}tj|j	ddd|j	�tj|�r�tj|j
ddd|j
�n|S(s�
    Return Pearson product-moment correlation coefficients.

    Please refer to the documentation for `cov` for more detail.  The
    relationship between the correlation coefficient matrix, `R`, and the
    covariance matrix, `C`, is

    .. math:: R_{ij} = \frac{ C_{ij} } { \sqrt{ C_{ii} * C_{jj} } }

    The values of `R` are between -1 and 1, inclusive.

    Parameters
    ----------
    x : array_like
        A 1-D or 2-D array containing multiple variables and observations.
        Each row of `x` represents a variable, and each column a single
        observation of all those variables. Also see `rowvar` below.
    y : array_like, optional
        An additional set of variables and observations. `y` has the same
        shape as `x`.
    rowvar : int, optional
        If `rowvar` is non-zero (default), then each row represents a
        variable, with observations in the columns. Otherwise, the relationship
        is transposed: each column represents a variable, while the rows
        contain observations.
    bias : _NoValue, optional
        Has no effect, do not use.

        .. deprecated:: 1.10.0
    ddof : _NoValue, optional
        Has no effect, do not use.

        .. deprecated:: 1.10.0

    Returns
    -------
    R : ndarray
        The correlation coefficient matrix of the variables.

    See Also
    --------
    cov : Covariance matrix

    Notes
    -----
    Due to floating point rounding the resulting array may not be Hermitian,
    the diagonal elements may not be 1, and the elements may not satisfy the
    inequality abs(a) <= 1. The real and imaginary parts are clipped to the
    interval [-1,  1] in an attempt to improve on that situation but is not
    much help in the complex case.

    This function accepts but discards arguments `bias` and `ddof`.  This is
    for backwards compatibility with previous versions of this function.  These
    arguments had no effect on the return values of the function and can be
    safely ignored in this and previous versions of numpy.
    s/bias and ddof have no effect and are deprecatedNi����iR*(R`t_NoValueR�R�R�RKR.R�R R�R�tcliptiscomplexobjR�(RbR^R�R�R�R}Rtstddev((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRL�	s9	

	"cC`s~|dkrtg�S|dkr/tdt�Std|�}ddtdt||d�dtdt||d�S(s�
    Return the Blackman window.

    The Blackman window is a taper formed by using the first three
    terms of a summation of cosines. It was designed to have close to the
    minimal leakage possible.  It is close to optimal, only slightly worse
    than a Kaiser window.

    Parameters
    ----------
    M : int
        Number of points in the output window. If zero or less, an empty
        array is returned.

    Returns
    -------
    out : ndarray
        The window, with the maximum value normalized to one (the value one
        appears only if the number of samples is odd).

    See Also
    --------
    bartlett, hamming, hanning, kaiser

    Notes
    -----
    The Blackman window is defined as

    .. math::  w(n) = 0.42 - 0.5 \cos(2\pi n/M) + 0.08 \cos(4\pi n/M)

    Most references to the Blackman window come from the signal processing
    literature, where it is used as one of many windowing functions for
    smoothing values.  It is also known as an apodization (which means
    "removing the foot", i.e. smoothing discontinuities at the beginning
    and end of the sampled signal) or tapering function. It is known as a
    "near optimal" tapering function, almost as good (by some measures)
    as the kaiser window.

    References
    ----------
    Blackman, R.B. and Tukey, J.W., (1958) The measurement of power spectra,
    Dover Publications, New York.

    Oppenheim, A.V., and R.W. Schafer. Discrete-Time Signal Processing.
    Upper Saddle River, NJ: Prentice-Hall, 1999, pp. 468-471.

    Examples
    --------
    >>> np.blackman(12)
    array([ -1.38777878e-17,   3.26064346e-02,   1.59903635e-01,
             4.14397981e-01,   7.36045180e-01,   9.67046769e-01,
             9.67046769e-01,   7.36045180e-01,   4.14397981e-01,
             1.59903635e-01,   3.26064346e-02,  -1.38777878e-17])


    Plot the window and the frequency response:

    >>> from numpy.fft import fft, fftshift
    >>> window = np.blackman(51)
    >>> plt.plot(window)
    [<matplotlib.lines.Line2D object at 0x...>]
    >>> plt.title("Blackman window")
    <matplotlib.text.Text object at 0x...>
    >>> plt.ylabel("Amplitude")
    <matplotlib.text.Text object at 0x...>
    >>> plt.xlabel("Sample")
    <matplotlib.text.Text object at 0x...>
    >>> plt.show()

    >>> plt.figure()
    <matplotlib.figure.Figure object at 0x...>
    >>> A = fft(window, 2048) / 25.5
    >>> mag = np.abs(fftshift(A))
    >>> freq = np.linspace(-0.5, 0.5, len(A))
    >>> response = 20 * np.log10(mag)
    >>> response = np.clip(response, -100, 100)
    >>> plt.plot(freq, response)
    [<matplotlib.lines.Line2D object at 0x...>]
    >>> plt.title("Frequency response of Blackman window")
    <matplotlib.text.Text object at 0x...>
    >>> plt.ylabel("Magnitude [dB]")
    <matplotlib.text.Text object at 0x...>
    >>> plt.xlabel("Normalized frequency [cycles per sample]")
    <matplotlib.text.Text object at 0x...>
    >>> plt.axis('tight')
    (-0.5, 0.5, -100.0, ...)
    >>> plt.show()

    iig�z�G��?g�?g@g{�G�z�?g@(R
RR�RRR(R�R�((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRS
sZ

cC`s{|dkrtg�S|dkr/tdt�Std|�}tt||dd�d||ddd||d�S(s�

    Return the Bartlett window.

    The Bartlett window is very similar to a triangular window, except
    that the end points are at zero.  It is often used in signal
    processing for tapering a signal, without generating too much
    ripple in the frequency domain.

    Parameters
    ----------
    M : int
        Number of points in the output window. If zero or less, an
        empty array is returned.

    Returns
    -------
    out : array
        The triangular window, with the maximum value normalized to one
        (the value one appears only if the number of samples is odd), with
        the first and last samples equal to zero.

    See Also
    --------
    blackman, hamming, hanning, kaiser

    Notes
    -----
    The Bartlett window is defined as

    .. math:: w(n) = \frac{2}{M-1} \left(
              \frac{M-1}{2} - \left|n - \frac{M-1}{2}\right|
              \right)

    Most references to the Bartlett window come from the signal
    processing literature, where it is used as one of many windowing
    functions for smoothing values.  Note that convolution with this
    window produces linear interpolation.  It is also known as an
    apodization (which means"removing the foot", i.e. smoothing
    discontinuities at the beginning and end of the sampled signal) or
    tapering function. The fourier transform of the Bartlett is the product
    of two sinc functions.
    Note the excellent discussion in Kanasewich.

    References
    ----------
    .. [1] M.S. Bartlett, "Periodogram Analysis and Continuous Spectra",
           Biometrika 37, 1-16, 1950.
    .. [2] E.R. Kanasewich, "Time Sequence Analysis in Geophysics",
           The University of Alberta Press, 1975, pp. 109-110.
    .. [3] A.V. Oppenheim and R.W. Schafer, "Discrete-Time Signal
           Processing", Prentice-Hall, 1999, pp. 468-471.
    .. [4] Wikipedia, "Window function",
           http://en.wikipedia.org/wiki/Window_function
    .. [5] W.H. Press,  B.P. Flannery, S.A. Teukolsky, and W.T. Vetterling,
           "Numerical Recipes", Cambridge University Press, 1986, page 429.


    Examples
    --------
    >>> np.bartlett(12)
    array([ 0.        ,  0.18181818,  0.36363636,  0.54545455,  0.72727273,
            0.90909091,  0.90909091,  0.72727273,  0.54545455,  0.36363636,
            0.18181818,  0.        ])

    Plot the window and its frequency response (requires SciPy and matplotlib):

    >>> from numpy.fft import fft, fftshift
    >>> window = np.bartlett(51)
    >>> plt.plot(window)
    [<matplotlib.lines.Line2D object at 0x...>]
    >>> plt.title("Bartlett window")
    <matplotlib.text.Text object at 0x...>
    >>> plt.ylabel("Amplitude")
    <matplotlib.text.Text object at 0x...>
    >>> plt.xlabel("Sample")
    <matplotlib.text.Text object at 0x...>
    >>> plt.show()

    >>> plt.figure()
    <matplotlib.figure.Figure object at 0x...>
    >>> A = fft(window, 2048) / 25.5
    >>> mag = np.abs(fftshift(A))
    >>> freq = np.linspace(-0.5, 0.5, len(A))
    >>> response = 20 * np.log10(mag)
    >>> response = np.clip(response, -100, 100)
    >>> plt.plot(freq, response)
    [<matplotlib.lines.Line2D object at 0x...>]
    >>> plt.title("Frequency response of Bartlett window")
    <matplotlib.text.Text object at 0x...>
    >>> plt.ylabel("Magnitude [dB]")
    <matplotlib.text.Text object at 0x...>
    >>> plt.xlabel("Normalized frequency [cycles per sample]")
    <matplotlib.text.Text object at 0x...>
    >>> plt.axis('tight')
    (-0.5, 0.5, -100.0, ...)
    >>> plt.show()

    iig@(R
RR�RRR(R�R�((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRRx
sc

cC`s`|dkrtg�S|dkr/tdt�Std|�}ddtdt||d�S(sa
    Return the Hanning window.

    The Hanning window is a taper formed by using a weighted cosine.

    Parameters
    ----------
    M : int
        Number of points in the output window. If zero or less, an
        empty array is returned.

    Returns
    -------
    out : ndarray, shape(M,)
        The window, with the maximum value normalized to one (the value
        one appears only if `M` is odd).

    See Also
    --------
    bartlett, blackman, hamming, kaiser

    Notes
    -----
    The Hanning window is defined as

    .. math::  w(n) = 0.5 - 0.5cos\left(\frac{2\pi{n}}{M-1}\right)
               \qquad 0 \leq n \leq M-1

    The Hanning was named for Julius von Hann, an Austrian meteorologist.
    It is also known as the Cosine Bell. Some authors prefer that it be
    called a Hann window, to help avoid confusion with the very similar
    Hamming window.

    Most references to the Hanning window come from the signal processing
    literature, where it is used as one of many windowing functions for
    smoothing values.  It is also known as an apodization (which means
    "removing the foot", i.e. smoothing discontinuities at the beginning
    and end of the sampled signal) or tapering function.

    References
    ----------
    .. [1] Blackman, R.B. and Tukey, J.W., (1958) The measurement of power
           spectra, Dover Publications, New York.
    .. [2] E.R. Kanasewich, "Time Sequence Analysis in Geophysics",
           The University of Alberta Press, 1975, pp. 106-108.
    .. [3] Wikipedia, "Window function",
           http://en.wikipedia.org/wiki/Window_function
    .. [4] W.H. Press,  B.P. Flannery, S.A. Teukolsky, and W.T. Vetterling,
           "Numerical Recipes", Cambridge University Press, 1986, page 425.

    Examples
    --------
    >>> np.hanning(12)
    array([ 0.        ,  0.07937323,  0.29229249,  0.57115742,  0.82743037,
            0.97974649,  0.97974649,  0.82743037,  0.57115742,  0.29229249,
            0.07937323,  0.        ])

    Plot the window and its frequency response:

    >>> from numpy.fft import fft, fftshift
    >>> window = np.hanning(51)
    >>> plt.plot(window)
    [<matplotlib.lines.Line2D object at 0x...>]
    >>> plt.title("Hann window")
    <matplotlib.text.Text object at 0x...>
    >>> plt.ylabel("Amplitude")
    <matplotlib.text.Text object at 0x...>
    >>> plt.xlabel("Sample")
    <matplotlib.text.Text object at 0x...>
    >>> plt.show()

    >>> plt.figure()
    <matplotlib.figure.Figure object at 0x...>
    >>> A = fft(window, 2048) / 25.5
    >>> mag = np.abs(fftshift(A))
    >>> freq = np.linspace(-0.5, 0.5, len(A))
    >>> response = 20 * np.log10(mag)
    >>> response = np.clip(response, -100, 100)
    >>> plt.plot(freq, response)
    [<matplotlib.lines.Line2D object at 0x...>]
    >>> plt.title("Frequency response of the Hann window")
    <matplotlib.text.Text object at 0x...>
    >>> plt.ylabel("Magnitude [dB]")
    <matplotlib.text.Text object at 0x...>
    >>> plt.xlabel("Normalized frequency [cycles per sample]")
    <matplotlib.text.Text object at 0x...>
    >>> plt.axis('tight')
    (-0.5, 0.5, -100.0, ...)
    >>> plt.show()

    iig�?g@(R
RR�RRR(R�R�((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRQ�
s\

cC`s`|dkrtg�S|dkr/tdt�Std|�}ddtdt||d�S(sQ
    Return the Hamming window.

    The Hamming window is a taper formed by using a weighted cosine.

    Parameters
    ----------
    M : int
        Number of points in the output window. If zero or less, an
        empty array is returned.

    Returns
    -------
    out : ndarray
        The window, with the maximum value normalized to one (the value
        one appears only if the number of samples is odd).

    See Also
    --------
    bartlett, blackman, hanning, kaiser

    Notes
    -----
    The Hamming window is defined as

    .. math::  w(n) = 0.54 - 0.46cos\left(\frac{2\pi{n}}{M-1}\right)
               \qquad 0 \leq n \leq M-1

    The Hamming was named for R. W. Hamming, an associate of J. W. Tukey
    and is described in Blackman and Tukey. It was recommended for
    smoothing the truncated autocovariance function in the time domain.
    Most references to the Hamming window come from the signal processing
    literature, where it is used as one of many windowing functions for
    smoothing values.  It is also known as an apodization (which means
    "removing the foot", i.e. smoothing discontinuities at the beginning
    and end of the sampled signal) or tapering function.

    References
    ----------
    .. [1] Blackman, R.B. and Tukey, J.W., (1958) The measurement of power
           spectra, Dover Publications, New York.
    .. [2] E.R. Kanasewich, "Time Sequence Analysis in Geophysics", The
           University of Alberta Press, 1975, pp. 109-110.
    .. [3] Wikipedia, "Window function",
           http://en.wikipedia.org/wiki/Window_function
    .. [4] W.H. Press,  B.P. Flannery, S.A. Teukolsky, and W.T. Vetterling,
           "Numerical Recipes", Cambridge University Press, 1986, page 425.

    Examples
    --------
    >>> np.hamming(12)
    array([ 0.08      ,  0.15302337,  0.34890909,  0.60546483,  0.84123594,
            0.98136677,  0.98136677,  0.84123594,  0.60546483,  0.34890909,
            0.15302337,  0.08      ])

    Plot the window and the frequency response:

    >>> from numpy.fft import fft, fftshift
    >>> window = np.hamming(51)
    >>> plt.plot(window)
    [<matplotlib.lines.Line2D object at 0x...>]
    >>> plt.title("Hamming window")
    <matplotlib.text.Text object at 0x...>
    >>> plt.ylabel("Amplitude")
    <matplotlib.text.Text object at 0x...>
    >>> plt.xlabel("Sample")
    <matplotlib.text.Text object at 0x...>
    >>> plt.show()

    >>> plt.figure()
    <matplotlib.figure.Figure object at 0x...>
    >>> A = fft(window, 2048) / 25.5
    >>> mag = np.abs(fftshift(A))
    >>> freq = np.linspace(-0.5, 0.5, len(A))
    >>> response = 20 * np.log10(mag)
    >>> response = np.clip(response, -100, 100)
    >>> plt.plot(freq, response)
    [<matplotlib.lines.Line2D object at 0x...>]
    >>> plt.title("Frequency response of Hamming window")
    <matplotlib.text.Text object at 0x...>
    >>> plt.ylabel("Magnitude [dB]")
    <matplotlib.text.Text object at 0x...>
    >>> plt.xlabel("Normalized frequency [cycles per sample]")
    <matplotlib.text.Text object at 0x...>
    >>> plt.axis('tight')
    (-0.5, 0.5, -100.0, ...)
    >>> plt.show()

    iigH�z�G�?gq=
ףp�?g@(R
RR�RRR(R�R�((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRPGsZ

g��4!�\T�g��}�b3�<g��r넱�g�^�����<g��"P
�g'&&KF�5=g��bLa�g$ӛ�/��=g�j�z����g<t̾��=gV�����g4�T��&>g�0���K�g5dM�v;p>g�"�c쑾g��$��>g'd��o�ҾgY(��X?�>gZ�Y&+�g�|t�(?gR���B�g�u�Z?gI� ^�q�g����a��?g�!�N��g-��Ί>�?g�-4pK��g���w���?g��W��ӿg*�5�N��?g��T��`�g0�f�FV�g!����<g�A`��<g�ҫ`��g8��箸�g��}��<g�攐�*�<g�be~���g2�hϙ]'�gE�_
�V=gs��k�[=g�&�GCi=gf�C��g�{~5���g%t9Q��gO�$�=guo��>g�["�d,->gm�ր�VX>gna����>g���+A�>gR��x�?gI�墌�k?g�	��b��?cC`s^|d}d}x?tdt|��D](}|}|}|||||}q&Wd||S(Nigig�?(R�R�(RbR�tb0tb1R�tb2((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyt_chbevl�s
cC`st|�t|ddt�S(Ng@i(R#R�t_i0A(Rb((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyt_i0_1�scC`s)t|�td|dt�t|�S(Ng@@g@(R#R�t_i0BR (Rb((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyt_i0_2�scC`s~t|�j�}t|�}|dk}||||<|dk}t||�||<|}t||�||<|j�S(s0
    Modified Bessel function of the first kind, order 0.

    Usually denoted :math:`I_0`.  This function does broadcast, but will *not*
    "up-cast" int dtype arguments unless accompanied by at least one float or
    complex dtype argument (see Raises below).

    Parameters
    ----------
    x : array_like, dtype float or complex
        Argument of the Bessel function.

    Returns
    -------
    out : ndarray, shape = x.shape, dtype = x.dtype
        The modified Bessel function evaluated at each of the elements of `x`.

    Raises
    ------
    TypeError: array cannot be safely cast to required type
        If argument consists exclusively of int dtypes.

    See Also
    --------
    scipy.special.iv, scipy.special.ive

    Notes
    -----
    We use the algorithm published by Clenshaw [1]_ and referenced by
    Abramowitz and Stegun [2]_, for which the function domain is
    partitioned into the two intervals [0,8] and (8,inf), and Chebyshev
    polynomial expansions are employed in each interval. Relative error on
    the domain [0,30] using IEEE arithmetic is documented [3]_ as having a
    peak of 5.8e-16 with an rms of 1.4e-16 (n = 30000).

    References
    ----------
    .. [1] C. W. Clenshaw, "Chebyshev series for mathematical functions", in
           *National Physical Laboratory Mathematical Tables*, vol. 5, London:
           Her Majesty's Stationery Office, 1962.
    .. [2] M. Abramowitz and I. A. Stegun, *Handbook of Mathematical
           Functions*, 10th printing, New York: Dover, 1964, pp. 379.
           http://www.math.sfu.ca/~cbm/aands/page_379.htm
    .. [3] http://kobesearch.cpan.org/htdocs/Math-Cephes/Math/Cephes.html

    Examples
    --------
    >>> np.i0([0.])
    array(1.0)
    >>> np.i0([0., 1. + 2j])
    array([ 1.00000000+0.j        ,  0.18785373+0.64616944j])

    ig @(RR;RR�R�R�(RbR^tindtind2((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRV�s6cC`s}ddlm}|dkr,tjdg�Std|�}|dd}||td|||d��|t|��S(s�
    Return the Kaiser window.

    The Kaiser window is a taper formed by using a Bessel function.

    Parameters
    ----------
    M : int
        Number of points in the output window. If zero or less, an
        empty array is returned.
    beta : float
        Shape parameter for window.

    Returns
    -------
    out : array
        The window, with the maximum value normalized to one (the value
        one appears only if the number of samples is odd).

    See Also
    --------
    bartlett, blackman, hamming, hanning

    Notes
    -----
    The Kaiser window is defined as

    .. math::  w(n) = I_0\left( \beta \sqrt{1-\frac{4n^2}{(M-1)^2}}
               \right)/I_0(\beta)

    with

    .. math:: \quad -\frac{M-1}{2} \leq n \leq \frac{M-1}{2},

    where :math:`I_0` is the modified zeroth-order Bessel function.

    The Kaiser was named for Jim Kaiser, who discovered a simple
    approximation to the DPSS window based on Bessel functions.  The Kaiser
    window is a very good approximation to the Digital Prolate Spheroidal
    Sequence, or Slepian window, which is the transform which maximizes the
    energy in the main lobe of the window relative to total energy.

    The Kaiser can approximate many other windows by varying the beta
    parameter.

    ====  =======================
    beta  Window shape
    ====  =======================
    0     Rectangular
    5     Similar to a Hamming
    6     Similar to a Hanning
    8.6   Similar to a Blackman
    ====  =======================

    A beta value of 14 is probably a good starting point. Note that as beta
    gets large, the window narrows, and so the number of samples needs to be
    large enough to sample the increasingly narrow spike, otherwise NaNs will
    get returned.

    Most references to the Kaiser window come from the signal processing
    literature, where it is used as one of many windowing functions for
    smoothing values.  It is also known as an apodization (which means
    "removing the foot", i.e. smoothing discontinuities at the beginning
    and end of the sampled signal) or tapering function.

    References
    ----------
    .. [1] J. F. Kaiser, "Digital Filters" - Ch 7 in "Systems analysis by
           digital computer", Editors: F.F. Kuo and J.F. Kaiser, p 218-285.
           John Wiley and Sons, New York, (1966).
    .. [2] E.R. Kanasewich, "Time Sequence Analysis in Geophysics", The
           University of Alberta Press, 1975, pp. 177-178.
    .. [3] Wikipedia, "Window function",
           http://en.wikipedia.org/wiki/Window_function

    Examples
    --------
    >>> np.kaiser(12, 14)
    array([  7.72686684e-06,   3.46009194e-03,   4.65200189e-02,
             2.29737120e-01,   5.99885316e-01,   9.45674898e-01,
             9.45674898e-01,   5.99885316e-01,   2.29737120e-01,
             4.65200189e-02,   3.46009194e-03,   7.72686684e-06])


    Plot the window and the frequency response:

    >>> from numpy.fft import fft, fftshift
    >>> window = np.kaiser(51, 14)
    >>> plt.plot(window)
    [<matplotlib.lines.Line2D object at 0x...>]
    >>> plt.title("Kaiser window")
    <matplotlib.text.Text object at 0x...>
    >>> plt.ylabel("Amplitude")
    <matplotlib.text.Text object at 0x...>
    >>> plt.xlabel("Sample")
    <matplotlib.text.Text object at 0x...>
    >>> plt.show()

    >>> plt.figure()
    <matplotlib.figure.Figure object at 0x...>
    >>> A = fft(window, 2048) / 25.5
    >>> mag = np.abs(fftshift(A))
    >>> freq = np.linspace(-0.5, 0.5, len(A))
    >>> response = 20 * np.log10(mag)
    >>> response = np.clip(response, -100, 100)
    >>> plt.plot(freq, response)
    [<matplotlib.lines.Line2D object at 0x...>]
    >>> plt.title("Frequency response of Kaiser window")
    <matplotlib.text.Text object at 0x...>
    >>> plt.ylabel("Magnitude [dB]")
    <matplotlib.text.Text object at 0x...>
    >>> plt.xlabel("Normalized frequency [cycles per sample]")
    <matplotlib.text.Text object at 0x...>
    >>> plt.axis('tight')
    (-0.5, 0.5, -100.0, ...)
    >>> plt.show()

    i(RVig�?g@(t
numpy.dualRVR`R
RR R�(R�tbetaRVR�talpha((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRT?swcC`s9tj|�}tt|dkd|�}t|�|S(s�	
    Return the sinc function.

    The sinc function is :math:`\sin(\pi x)/(\pi x)`.

    Parameters
    ----------
    x : ndarray
        Array (possibly multi-dimensional) of values for which to to
        calculate ``sinc(x)``.

    Returns
    -------
    out : ndarray
        ``sinc(x)``, which has the same shape as the input.

    Notes
    -----
    ``sinc(0)`` is the limit value 1.

    The name sinc is short for "sine cardinal" or "sinus cardinalis".

    The sinc function is used in various signal processing applications,
    including in anti-aliasing, in the construction of a Lanczos resampling
    filter, and in interpolation.

    For bandlimited interpolation of discrete-time signals, the ideal
    interpolation kernel is proportional to the sinc function.

    References
    ----------
    .. [1] Weisstein, Eric W. "Sinc Function." From MathWorld--A Wolfram Web
           Resource. http://mathworld.wolfram.com/SincFunction.html
    .. [2] Wikipedia, "Sinc function",
           http://en.wikipedia.org/wiki/Sinc_function

    Examples
    --------
    >>> x = np.linspace(-4, 4, 41)
    >>> np.sinc(x)
    array([ -3.89804309e-17,  -4.92362781e-02,  -8.40918587e-02,
            -8.90384387e-02,  -5.84680802e-02,   3.89804309e-17,
             6.68206631e-02,   1.16434881e-01,   1.26137788e-01,
             8.50444803e-02,  -3.89804309e-17,  -1.03943254e-01,
            -1.89206682e-01,  -2.16236208e-01,  -1.55914881e-01,
             3.89804309e-17,   2.33872321e-01,   5.04551152e-01,
             7.56826729e-01,   9.35489284e-01,   1.00000000e+00,
             9.35489284e-01,   7.56826729e-01,   5.04551152e-01,
             2.33872321e-01,   3.89804309e-17,  -1.55914881e-01,
            -2.16236208e-01,  -1.89206682e-01,  -1.03943254e-01,
            -3.89804309e-17,   8.50444803e-02,   1.26137788e-01,
             1.16434881e-01,   6.68206631e-02,   3.89804309e-17,
            -5.84680802e-02,  -8.90384387e-02,  -8.40918587e-02,
            -4.92362781e-02,  -3.89804309e-17])

    >>> plt.plot(x, np.sinc(x))
    [<matplotlib.lines.Line2D object at 0x...>]
    >>> plt.title("Sinc Function")
    <matplotlib.text.Text object at 0x...>
    >>> plt.ylabel("Amplitude")
    <matplotlib.text.Text object at 0x...>
    >>> plt.xlabel("X")
    <matplotlib.text.Text object at 0x...>
    >>> plt.show()

    It works in 2-D as well:

    >>> x = np.linspace(-4, 4, 401)
    >>> xx = np.outer(x, x)
    >>> plt.imshow(np.sinc(xx))
    <matplotlib.image.AxesImage object at 0x...>

    ig#B����;(R`RRRR!(RbR^((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRO�sJcC`s)t|dtdt�}|jd�|S(sk
    Return a copy of an array sorted along the first axis.

    Parameters
    ----------
    a : array_like
        Array to be sorted.

    Returns
    -------
    sorted_array : ndarray
        Array of the same type and shape as `a`.

    See Also
    --------
    sort

    Notes
    -----
    ``np.msort(a)`` is equivalent to  ``np.sort(a, axis=0)``.

    R�R;i(R
R�R'(R�R�((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRM

s
c
K`s�tj|�}|jdd�}|dk	r�t|j�}|j}yRtj|�}||ksp||kr�t	d||jf��nd||<Wq�t
k
r�t�}xv|D]n}||ks�||kr�t	d||f��n||kr
td��n|j
||�d||<q�W|jtt|���}t|�}	x2tt|��D]\}
}|j|
|�}qcW|j|j|	 d�}d|d<q�Xndg|j}|||�}||fS(s+
    Internal Function.
    Call `func` with `a` as first argument swapping the axes to use extended
    axis on functions that don't support it natively.

    Returns result and a.shape with axis dims set to 1.

    Parameters
    ----------
    a : array_like
        Input array or object that can be converted to an array.
    func : callable
        Reduction function Kapable of receiving an axis argument.
        It is is called with `a` as first argument followed by `kwargs`.
     kwargs : keyword arguments
        additional keyword arguments to pass to `func`.

    Returns
    -------
    result : tuple
        Result of func(a, **kwargs) and a.shape with axis dims set to 1
        which can be used to reshape the result to the same shape a ufunc with
        keepdims=True would produce.

    R�saxis %d out of bounds (%d)isduplicate value in axisi����N(i����(R`RtgetR�R�R�R�toperatortindext
IndexErrorR�RR�Rtsymmetric_differencet	frozensetR�R�RRNR�R�(
R�RqR!R�tkeepdimR,tsaxRbR�tnkeepR�R�tr((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyt_ureduce)
s8	
	
c
C`sEt|dtd|d|d|�\}}|r=|j|�S|SdS(s
    Compute the median along the specified axis.

    Returns the median of the array elements.

    Parameters
    ----------
    a : array_like
        Input array or object that can be converted to an array.
    axis : {int, sequence of int, None}, optional
        Axis or axes along which the medians are computed. The default
        is to compute the median along a flattened version of the array.
        A sequence of axes is supported since version 1.9.0.
    out : ndarray, optional
        Alternative output array in which to place the result. It must
        have the same shape and buffer length as the expected output,
        but the type (of the output) will be cast if necessary.
    overwrite_input : bool, optional
       If True, then allow use of memory of input array `a` for
       calculations. The input array will be modified by the call to
       `median`. This will save memory when you do not need to preserve
       the contents of the input array. Treat the input as undefined,
       but it will probably be fully or partially sorted. Default is
       False. If `overwrite_input` is ``True`` and `a` is not already an
       `ndarray`, an error will be raised.
    keepdims : bool, optional
        If this is set to True, the axes which are reduced are left
        in the result as dimensions with size one. With this option,
        the result will broadcast correctly against the original `arr`.

        .. versionadded:: 1.9.0

    Returns
    -------
    median : ndarray
        A new array holding the result. If the input contains integers
        or floats smaller than ``float64``, then the output data-type is
        ``np.float64``.  Otherwise, the data-type of the output is the
        same as that of the input. If `out` is specified, that array is
        returned instead.

    See Also
    --------
    mean, percentile

    Notes
    -----
    Given a vector ``V`` of length ``N``, the median of ``V`` is the
    middle value of a sorted copy of ``V``, ``V_sorted`` - i
    e., ``V_sorted[(N-1)/2]``, when ``N`` is odd, and the average of the
    two middle values of ``V_sorted`` when ``N`` is even.

    Examples
    --------
    >>> a = np.array([[10, 7, 4], [3, 2, 1]])
    >>> a
    array([[10,  7,  4],
           [ 3,  2,  1]])
    >>> np.median(a)
    3.5
    >>> np.median(a, axis=0)
    array([ 6.5,  4.5,  2.5])
    >>> np.median(a, axis=1)
    array([ 7.,  2.])
    >>> m = np.median(a, axis=0)
    >>> out = np.zeros_like(m)
    >>> np.median(a, axis=0, out=m)
    array([ 6.5,  4.5,  2.5])
    >>> m
    array([ 6.5,  4.5,  2.5])
    >>> b = a.copy()
    >>> np.median(b, axis=1, overwrite_input=True)
    array([ 7.,  2.])
    >>> assert not np.all(a==b)
    >>> b = a.copy()
    >>> np.median(b, axis=None, overwrite_input=True)
    3.5
    >>> assert not np.all(a==b)

    RqR�R*toverwrite_inputN(R�t_medianR�(R�R�R*R�tkeepdimsR�R�((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRNe
s
Q
cC`s�tj|�}|dkr'|j}n
|j|}|ddkra|d}|d|g}n|ddg}tj|jtj�r�|jd�n|r�|dkr�|j	�}|j
|�q�|j
|d|�|}nt
||d|�}|jdkr|j�S|dkr'd}ntd�g|j
}|j|d}	|j|ddkrt|	|	d�||<nt|	d|	d�||<tj|jtj�r�|dkr�t||d|d|�}
tj|||j
�}tj|d�}|
j
dkry|tkr�tjdt�|dk	r^|jjtj�|d<|}
qv|jjtj�}
q�nRtj|j	��dkr�tjd	d
tj|j	��t�tj|
|<n|
St||d|d|�SdS(
Niiii����R�R*.s#Invalid value encountered in medians'Invalid value encountered in median fors %d results((.i����(R`RR�RaR�R�R�R�R[R%R(R�R�R�R)trollaxistisnanR�R�R�R�R�tnant
count_nonzero(R�R�R*R�tsztszhtkthtparttindexerR�troutR�((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyR��
sZ

	
	$			tlinearc	C`s�t|dtjdt�}t|dtd|d|d|d|d|�\}}|r�|jd	krs|j|�S|jt|�g|�Sn|Sd
S(s�
    Compute the qth percentile of the data along the specified axis.

    Returns the qth percentile(s) of the array elements.

    Parameters
    ----------
    a : array_like
        Input array or object that can be converted to an array.
    q : float in range of [0,100] (or sequence of floats)
        Percentile to compute, which must be between 0 and 100 inclusive.
    axis : {int, sequence of int, None}, optional
        Axis or axes along which the percentiles are computed. The
        default is to compute the percentile(s) along a flattened
        version of the array. A sequence of axes is supported since
        version 1.9.0.
    out : ndarray, optional
        Alternative output array in which to place the result. It must
        have the same shape and buffer length as the expected output,
        but the type (of the output) will be cast if necessary.
    overwrite_input : bool, optional
        If True, then allow use of memory of input array `a` 
        calculations. The input array will be modified by the call to
        `percentile`. This will save memory when you do not need to
        preserve the contents of the input array. In this case you
        should not make any assumptions about the contents of the input
        `a` after this function completes -- treat it as undefined.
        Default is False. If `a` is not already an array, this parameter
        will have no effect as `a` will be converted to an array
        internally regardless of the value of this parameter.
    interpolation : {'linear', 'lower', 'higher', 'midpoint', 'nearest'}
        This optional parameter specifies the interpolation method to
        use when the desired quantile lies between two data points
        ``i < j``:
            * linear: ``i + (j - i) * fraction``, where ``fraction``
              is the fractional part of the index surrounded by ``i``
              and ``j``.
            * lower: ``i``.
            * higher: ``j``.
            * nearest: ``i`` or ``j``, whichever is nearest.
            * midpoint: ``(i + j) / 2``.

        .. versionadded:: 1.9.0
    keepdims : bool, optional
        If this is set to True, the axes which are reduced are left in
        the result as dimensions with size one. With this option, the
        result will broadcast correctly against the original array `a`.

        .. versionadded:: 1.9.0

    Returns
    -------
    percentile : scalar or ndarray
        If `q` is a single percentile and `axis=None`, then the result
        is a scalar. If multiple percentiles are given, first axis of
        the result corresponds to the percentiles. The other axes are
        the axes that remain after the reduction of `a`. If the input 
        contains integers or floats smaller than ``float64``, the output
        data-type is ``float64``. Otherwise, the output data-type is the
        same as that of the input. If `out` is specified, that array is
        returned instead.

    See Also
    --------
    mean, median, nanpercentile

    Notes
    -----
    Given a vector ``V`` of length ``N``, the ``q``-th percentile of
    ``V`` is the value ``q/100`` of the way from the mimumum to the
    maximum in in a sorted copy of ``V``. The values and distances of
    the two nearest neighbors as well as the `interpolation` parameter
    will determine the percentile if the normalized ranking does not
    match the location of ``q`` exactly. This function is the same as
    the median if ``q=50``, the same as the minimum if ``q=0`` and the
    same as the maximum if ``q=100``.

    Examples
    --------
    >>> a = np.array([[10, 7, 4], [3, 2, 1]])
    >>> a
    array([[10,  7,  4],
           [ 3,  2,  1]])
    >>> np.percentile(a, 50)
    3.5
    >>> np.percentile(a, 50, axis=0)
    array([[ 6.5,  4.5,  2.5]])
    >>> np.percentile(a, 50, axis=1)
    array([ 7.,  2.])
    >>> np.percentile(a, 50, axis=1, keepdims=True)
    array([[ 7.],
           [ 2.]])

    >>> m = np.percentile(a, 50, axis=0)
    >>> out = np.zeros_like(m)
    >>> np.percentile(a, 50, axis=0, out=out)
    array([[ 6.5,  4.5,  2.5]])
    >>> m
    array([[ 6.5,  4.5,  2.5]])

    >>> b = a.copy()
    >>> np.percentile(b, 50, axis=1, overwrite_input=True)
    array([ 7.,  2.])
    >>> assert not np.all(a == b)

    R�R;RqtqR�R*R�t
interpolationiN(	R
R`R/R�R�t_percentileR�R�R�(	R�R�R�R*R�R�R�R�R�((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyR=sl!
cC`st|�}|jdkr.t}|d}nt}|jdkr�x�t|j�D]E}||dksy||dkr�td��n||cd<qSWnCtj	|dk�s�tj	|dk�r�td��n|d}|r|dkr|j
�}	q3|}	n'|dkr'|j�}	n|j�}	|dkrHd}n|	j
|}
||
d}|dkr�t|�jt�}n�|dkr�t|�jt�}nh|d	kr�d
t|�t|�}n?|dkr�t|�jt�}n|dkrntd
��tjtdt�}|jtkr
tj|jtj�rgt|dgf�}n|	j|d|�tj|	|d�}	d}tj|jtj�r�|d }tj|	dd�df�}n|r�|d}nt|	|d|d|�}
nt|�jt�}|d}|
d|||
dk<tj|jtj�rqt|dgf�}n||}d|}dg|	j}t|�||<||_
||_
|	jt||f�d|�tj|	|d�}	tj||d�}tj||d�}d}tj|jtj�r_|d }tj|	dd�df�}nt|	|d|�|}t|	|d|�|}tj||d�}tj||d�}|r�|jd�}|jd�}n|dk	rt||d|�}
nt||�}
tj |�rt!j"dt#�|r�|	jdkr�|dk	rw|jj$tj%�|d<|}
q�|jj$tj%�}
q|jj$tj%�|
d|jd�f<q|
jdkr�|jj$tj%�|
(q|jj$tj%�|
d|j&|jd�f<n|
S(Nii
ggY@s(Percentiles must be in the range [0,100]itlowerthighertmidpointg�?tnearestR�sNinterpolation can only be 'linear', 'lower' 'higher', 'midpoint', or 'nearest'R�i����R�.R*g�?s'Invalid value encountered in percentile('RR�R�R�R�RaR�R�R`R�R%RMR;R�RR�RRRR
R�R�R�R�R	R(R�R�RR�R�RR*R�R�R�R�R�trepeat(R�R�R�R*R�R�R�R�R�taptNxR�R�R�t
indices_belowt
indices_abovet
weights_abovet
weights_belowt
weights_shapetx1tx2((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyR�}s�
 *
		
	
"



		
"		+1g�?c
C`skt|�}|dkr!|}nlt|�}|jdkr{t|�}dg|j}|jd||<|j|�}nt|d|�}t|j�}td�g|}td�g|}tdd�||<tdd�||<y'|||||dj|�}	WnUt	k
rft
j|�}t
j|�}tj
|||||d|�}	nX|	S(sf
    Integrate along the given axis using the composite trapezoidal rule.

    Integrate `y` (`x`) along given axis.

    Parameters
    ----------
    y : array_like
        Input array to integrate.
    x : array_like, optional
        The sample points corresponding to the `y` values. If `x` is None,
        the sample points are assumed to be evenly spaced `dx` apart. The
        default is None.
    dx : scalar, optional
        The spacing between sample points when `x` is None. The default is 1.
    axis : int, optional
        The axis along which to integrate.

    Returns
    -------
    trapz : float
        Definite integral as approximated by trapezoidal rule.

    See Also
    --------
    sum, cumsum

    Notes
    -----
    Image [2]_ illustrates trapezoidal rule -- y-axis locations of points
    will be taken from `y` array, by default x-axis distances between
    points will be 1.0, alternatively they can be provided with `x` array
    or with `dx` scalar.  Return value will be equal to combined area under
    the red lines.


    References
    ----------
    .. [1] Wikipedia page: http://en.wikipedia.org/wiki/Trapezoidal_rule

    .. [2] Illustration image:
           http://en.wikipedia.org/wiki/File:Composite_trapezoidal_rule_illustration.png

    Examples
    --------
    >>> np.trapz([1,2,3])
    4.0
    >>> np.trapz([1,2,3], x=[4,6,8])
    8.0
    >>> np.trapz([1,2,3], dx=2)
    8.0
    >>> a = np.arange(6).reshape(2, 3)
    >>> a
    array([[0, 1, 2],
           [3, 4, 5]])
    >>> np.trapz(a, axis=0)
    array([ 1.5,  2.5,  3.5])
    >>> np.trapz(a, axis=1)
    array([ 2.,  8.])

    iiR�i����g@N(RR�R�R>R�R�R�R�R+R�R`RRR�(
R^RbR#R�RR�R,R%R&tret((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRU
s,>	'
*cC`s�y�tt|t�i|g�|�}t|t�rLt||j��n}t|t�r�tt||d�|dj��nGt|t�r�x5|D]*}tt||d�|dj��q�WnWnnXdS(s�
    Adds documentation to obj which is in module place.

    If doc is a string add it to obj as a docstring

    If doc is a tuple, then the first element is interpreted as
       an attribute of obj and the second as the docstring
          (method, docstring)

    If doc is a list, then each element of the list should be a
       sequence of length two --> [(method1, docstring1),
       (method2, docstring2), ...]

    This routine never raises an error.

    This routine cannot modify read-only docstrings, as appear
    in new-style classes or built-in functions. Because this
    routine never raises an error the caller must check manually
    that the docstrings were changed.
    iiN(	tgetattrt
__import__tglobalsR�RdR1tstripRR�(REtobjRhtnewtval((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRWhs$'
/cO`s�t|�}|jdt�}|jdt�}|jdd�}|rhtdt|�df��n|dkr�td��nd|}gt|�D]A\}}tj	|�j
|| d||d	dd��^q�}	g|	D]}|j^q�}
|dkrg|d	krgdd|d|	d_
dd|d|	d	_
|
d	|
d|
d<|
d	<n|r�|r�g|	D]}|j�^qzS|	SnC|r�tj|
d
t�}g|	D]}||^q�Stj|	�SdS(s�

    Return coordinate matrices from coordinate vectors.

    Make N-D coordinate arrays for vectorized evaluations of
    N-D scalar/vector fields over N-D grids, given
    one-dimensional coordinate arrays x1, x2,..., xn.

    .. versionchanged:: 1.9
       1-D and 0-D cases are allowed.

    Parameters
    ----------
    x1, x2,..., xn : array_like
        1-D arrays representing the coordinates of a grid.
    indexing : {'xy', 'ij'}, optional
        Cartesian ('xy', default) or matrix ('ij') indexing of output.
        See Notes for more details.

        .. versionadded:: 1.7.0
    sparse : bool, optional
        If True a sparse grid is returned in order to conserve memory.
        Default is False.

        .. versionadded:: 1.7.0
    copy : bool, optional
        If False, a view into the original arrays are returned in order to
        conserve memory.  Default is True.  Please note that
        ``sparse=False, copy=False`` will likely return non-contiguous
        arrays.  Furthermore, more than one element of a broadcast array
        may refer to a single memory location.  If you need to write to the
        arrays, make copies first.

        .. versionadded:: 1.7.0

    Returns
    -------
    X1, X2,..., XN : ndarray
        For vectors `x1`, `x2`,..., 'xn' with lengths ``Ni=len(xi)`` ,
        return ``(N1, N2, N3,...Nn)`` shaped arrays if indexing='ij'
        or ``(N2, N1, N3,...Nn)`` shaped arrays if indexing='xy'
        with the elements of `xi` repeated to fill the matrix along
        the first dimension for `x1`, the second for `x2` and so on.

    Notes
    -----
    This function supports both indexing conventions through the indexing
    keyword argument.  Giving the string 'ij' returns a meshgrid with
    matrix indexing, while 'xy' returns a meshgrid with Cartesian indexing.
    In the 2-D case with inputs of length M and N, the outputs are of shape
    (N, M) for 'xy' indexing and (M, N) for 'ij' indexing.  In the 3-D case
    with inputs of length M, N and P, outputs are of shape (N, M, P) for
    'xy' indexing and (M, N, P) for 'ij' indexing.  The difference is
    illustrated by the following code snippet::

        xv, yv = meshgrid(x, y, sparse=False, indexing='ij')
        for i in range(nx):
            for j in range(ny):
                # treat xv[i,j], yv[i,j]

        xv, yv = meshgrid(x, y, sparse=False, indexing='xy')
        for i in range(nx):
            for j in range(ny):
                # treat xv[j,i], yv[j,i]

    In the 1-D and 0-D case, the indexing and sparse keywords have no effect.

    See Also
    --------
    index_tricks.mgrid : Construct a multi-dimensional "meshgrid"
                     using indexing notation.
    index_tricks.ogrid : Construct an open multi-dimensional "meshgrid"
                     using indexing notation.

    Examples
    --------
    >>> nx, ny = (3, 2)
    >>> x = np.linspace(0, 1, nx)
    >>> y = np.linspace(0, 1, ny)
    >>> xv, yv = meshgrid(x, y)
    >>> xv
    array([[ 0. ,  0.5,  1. ],
           [ 0. ,  0.5,  1. ]])
    >>> yv
    array([[ 0.,  0.,  0.],
           [ 1.,  1.,  1.]])
    >>> xv, yv = meshgrid(x, y, sparse=True)  # make sparse output arrays
    >>> xv
    array([[ 0. ,  0.5,  1. ]])
    >>> yv
    array([[ 0.],
           [ 1.]])

    `meshgrid` is very useful to evaluate functions on a grid.

    >>> x = np.arange(-5, 5, 0.1)
    >>> y = np.arange(-5, 5, 0.1)
    >>> xx, yy = meshgrid(x, y, sparse=True)
    >>> z = np.sin(xx**2 + yy**2) / (xx**2 + yy**2)
    >>> h = plt.contourf(x,y,z)

    R;tsparsetindexingR�s2meshgrid() got an unexpected keyword argument '%s'itijs.Valid values for `indexing` are 'xy' and 'ij'.ii����NiR�(R�R�(i(i����(ii����(i(i����i(i(R�RR�R�R�R�R�RR`RR�R�RaR�R;RR�R�(txiR!R�tcopy_R�R�ts0R�RbtoutputR�t	mult_fact((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRX�s4f
Q cC`s�d}t|�tk	r<y
|j}Wq<tk
r8q<Xnt|�}|j}|jjrcdnd}|dkr�|dkr�|j	�}n|j}|d}n|dkr�t
jdt�|r�||�S|j
�Sntd�g|}|j|}t|j�}t|t�r|j|�\}	}
}t|	|
|�}t|�}
|
dkr�|ru||j
��S|j
�Sn|dkr�|}|d}	|dd}
n||c|
8<t||j|�}|	dkr�n!td|	�||<||||<|
|krnKt|
|
d�||<td�g|}t|
d�||<||||<|dkrnn�t|
|	dt�}t|d|
|	|�<t|	|
|
�||<td�g|}t|	|
�||<||}|||<||||<|r
||�S|Sn|}tj|�}|jtkrWt
jd	t�|jt�}nt|ttt f�r]|j!�}||ks�||kr�t"d
|||f��n|dkr�||7}n||cd8<t||j|�}td|�||<||||<t|d�||<td�g|}t|dd�||<||||<n|j#dkr�t|tj�r�|jt�}ntj$|td�s�t
jdt�|jt�}nt|dt�}||k||k@}|j%�st
jd
t�||}n|dk}|j%�sOt
jdt�||}nt||f<|||<||}|r�||�S|SdS(s
    Return a new array with sub-arrays along an axis deleted. For a one
    dimensional array, this returns those entries not returned by
    `arr[obj]`.

    Parameters
    ----------
    arr : array_like
      Input array.
    obj : slice, int or array of ints
      Indicate which sub-arrays to remove.
    axis : int, optional
      The axis along which to delete the subarray defined by `obj`.
      If `axis` is None, `obj` is applied to the flattened array.

    Returns
    -------
    out : ndarray
        A copy of `arr` with the elements specified by `obj` removed. Note
        that `delete` does not occur in-place. If `axis` is None, `out` is
        a flattened array.

    See Also
    --------
    insert : Insert elements into an array.
    append : Append elements at the end of an array.

    Notes
    -----
    Often it is preferable to use a boolean mask. For example:

    >>> mask = np.ones(len(arr), dtype=bool)
    >>> mask[[0,2,4]] = False
    >>> result = arr[mask,...]

    Is equivalent to `np.delete(arr, [0,2,4], axis=0)`, but allows further
    use of `mask`.

    Examples
    --------
    >>> arr = np.array([[1,2,3,4], [5,6,7,8], [9,10,11,12]])
    >>> arr
    array([[ 1,  2,  3,  4],
           [ 5,  6,  7,  8],
           [ 9, 10, 11, 12]])
    >>> np.delete(arr, 1, 0)
    array([[ 1,  2,  3,  4],
           [ 9, 10, 11, 12]])

    >>> np.delete(arr, np.s_[::2], 1)
    array([[ 2,  4],
           [ 6,  8],
           [10, 12]])
    >>> np.delete(arr, [1,3,5], None)
    array([ 1,  3,  5,  7,  8,  9, 10, 11, 12])

    RtCiis\in the future the special handling of scalars will be removed from delete and raise an errori����R�Nspin the future insert will treat boolean arrays and array-likes as boolean index instead of casting it to integers2index %i is out of bounds for axis %i with size %it	same_kindsPusing a non-integer array as obj in delete will result in an error in the futurescin the future out of bounds indices will raise an error instead of being ignored by `numpy.delete`.sEin the future negative indices will not be ignored by `numpy.delete`.(&R�R�Rt__array_wrap__R�RR�tflagstfncR%R�R�R�R;R�R�R�R�R�R�R�R
R�RR�R�R`t
FutureWarningR�RR�R6RR�R�RaR�R�(RTR�R�twrapR�tarrordertslobjR�tnewshapetstarttstoptsteptxrtnumtodelR�tslobj2R�t_objt
inside_boundstpositive_indices((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRYs�:

		









"





cC`s�d}t|�tk	r<y
|j}Wq<tk
r8q<Xnt|�}|j}|jjrcdnd}|dkr�|dkr�|j	�}n|j}|d}nW|dkr�||ks�||kr�t
d||f��n|dkr�||7}n|dkrFtjdt
�|j�}||d<|r?||�S|Sntd�g|}|j|}t|j�}	t|t�r�t|j|�itd6�}
n^tj|�}
|
jtkr�tjd	t�|
jt�}
n|
jdkrtd
��n|
jdkr�|
j�}||ks8||krTt
d|||f��n|dkrm||7}nt|dtd
|jd|j�}|
jdkr�tj |d||jd�}n|j|}|	|c|7<t!|	|j|�}
td|�||<|||
|<t|||�||<||
|<t||d�||<td�g|}t|d�||<|||
|<|r�||
�S|
S|
jdkr�t|tj�r�|
jt�}
ntj"|
td�stjdt
�|
jt�}
n|
|
dkc|7<t#|
�}|
j$dd�}|
|ctj|�7<|	|c|7<t%|	|dt�}t||
<t!|	|j|�}
td�g|}|
||<|||<||
|<||
|<|r�||
�S|
S(s

    Insert values along the given axis before the given indices.

    Parameters
    ----------
    arr : array_like
        Input array.
    obj : int, slice or sequence of ints
        Object that defines the index or indices before which `values` is
        inserted.

        .. versionadded:: 1.8.0

        Support for multiple insertions when `obj` is a single scalar or a
        sequence with one element (similar to calling insert multiple
        times).
    values : array_like
        Values to insert into `arr`. If the type of `values` is different
        from that of `arr`, `values` is converted to the type of `arr`.
        `values` should be shaped so that ``arr[...,obj,...] = values``
        is legal.
    axis : int, optional
        Axis along which to insert `values`.  If `axis` is None then `arr`
        is flattened first.

    Returns
    -------
    out : ndarray
        A copy of `arr` with `values` inserted.  Note that `insert`
        does not occur in-place: a new array is returned. If
        `axis` is None, `out` is a flattened array.

    See Also
    --------
    append : Append elements at the end of an array.
    concatenate : Join a sequence of arrays along an existing axis.
    delete : Delete elements from an array.

    Notes
    -----
    Note that for higher dimensional inserts `obj=0` behaves very different
    from `obj=[0]` just like `arr[:,0,:] = values` is different from
    `arr[:,[0],:] = values`.

    Examples
    --------
    >>> a = np.array([[1, 1], [2, 2], [3, 3]])
    >>> a
    array([[1, 1],
           [2, 2],
           [3, 3]])
    >>> np.insert(a, 1, 5)
    array([1, 5, 1, 2, 2, 3, 3])
    >>> np.insert(a, 1, 5, axis=1)
    array([[1, 5, 1],
           [2, 5, 2],
           [3, 5, 3]])

    Difference between sequence and scalars:

    >>> np.insert(a, [1], [[1],[2],[3]], axis=1)
    array([[1, 1, 1],
           [2, 2, 2],
           [3, 3, 3]])
    >>> np.array_equal(np.insert(a, 1, [1, 2, 3], axis=1),
    ...                np.insert(a, [1], [[1],[2],[3]], axis=1))
    True

    >>> b = a.flatten()
    >>> b
    array([1, 1, 2, 2, 3, 3])
    >>> np.insert(b, [2, 2], [5, 6])
    array([1, 1, 5, 6, 2, 2, 3, 3])

    >>> np.insert(b, slice(2, 4), [5, 6])
    array([1, 1, 5, 2, 6, 2, 3, 3])

    >>> np.insert(b, [2, 2], [7.13, False]) # type casting
    array([1, 1, 7, 0, 2, 2, 3, 3])

    >>> x = np.arange(8).reshape(2, 4)
    >>> idx = (1, 3)
    >>> np.insert(x, idx, 999, axis=1)
    array([[  0, 999,   1,   2, 999,   3],
           [  4, 999,   5,   6, 999,   7]])

    RR�iis5axis %i is out of bounds for an array of dimension %is\in the future the special handling of scalars will be removed from insert and raise an error.R�srin the future insert will treat boolean arrays and array-likes as a boolean index instead of casting it to integersDindex array argument obj to insert must be one dimensional or scalars2index %i is out of bounds for axis %i with size %iR;R�R�sPusing a non-integer array as obj in insert will result in an error in the futureR�t	mergesortN(&R�R�RR�R�RR�R�R�R%R�R�R�R�R;R�R�R�R�RR�RR`R
R�R�R�R�R�RaR�R�R�R
R�R�R�R(RTR�tvaluesR�R�R�R�R�R�R�R�R�tnumnewR�R�R�told_mask((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyRZ�s�X

		
%



"
$#


"





cC`sht|�}|dkrR|jdkr6|j�}nt|�}|jd}nt||fd|�S(s�
    Append values to the end of an array.

    Parameters
    ----------
    arr : array_like
        Values are appended to a copy of this array.
    values : array_like
        These values are appended to a copy of `arr`.  It must be of the
        correct shape (the same shape as `arr`, excluding `axis`).  If
        `axis` is not specified, `values` can be any shape and will be
        flattened before use.
    axis : int, optional
        The axis along which `values` are appended.  If `axis` is not
        given, both `arr` and `values` are flattened before use.

    Returns
    -------
    append : ndarray
        A copy of `arr` with `values` appended to `axis`.  Note that
        `append` does not occur in-place: a new array is allocated and
        filled.  If `axis` is None, `out` is a flattened array.

    See Also
    --------
    insert : Insert elements into an array.
    delete : Delete elements from an array.

    Examples
    --------
    >>> np.append([1, 2, 3], [[4, 5, 6], [7, 8, 9]])
    array([1, 2, 3, 4, 5, 6, 7, 8, 9])

    When `axis` is specified, `values` must have the correct shape.

    >>> np.append([[1, 2, 3], [4, 5, 6]], [[7, 8, 9]], axis=0)
    array([[1, 2, 3],
           [4, 5, 6],
           [7, 8, 9]])
    >>> np.append([[1, 2, 3], [4, 5, 6]], [7, 8, 9], axis=0)
    Traceback (most recent call last):
    ...
    ValueError: arrays must have same number of dimensions

    iR�N(RR�R�R%R	(RTR�R�((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyR[�s.(�t
__future__RRRR�RWR�R�tnumpyR`tnumpy.core.numericR�tnumericR6t
numpy.coreRRRRRRR	R
RRR
RRRRRRRRRRRtnumpy.core.umathRRRRRRRR R!R"R#R$tnumpy.core.fromnumericR%R&R'R(R)R*R+tnumpy.core.numerictypesR,R-tnumpy.lib.twodim_baseR.tutilsR/tnumpy.core.multiarrayR0R1R2R3R4R-R5R\tnumpy.compatR6tnumpy.compat.py3kR7tversion_infotxrangeR�t__all__R<RcReRfRhRpRsRuR�R�R�RIRJRHRGR9R8R;R?R>R@RARBR:RRRDRER�RCR�RFRKR�RLRSRRRQRPR�R�R�R�R�RVRTRORMR�RNR�R=R�RURWRXRYRZR[(((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/function_base.pyt<module>s"|R4							"		

���qC	|g1	�?}.7	$3	3	**��R	b	k	d	d						C		O		<XGx�[	#	���

Zerion Mini Shell 1.0