%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/
Upload File :
Create Path :
Current File : //proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyc

�
�9Zc@`s�ddlmZmZmZddddgZddlZddljjZ	ddlm
Z
mZmZm
Z
mZddlmZd	Zejdd
kr�dfd��YZe�Zd
�Zn�egdZx$ed�D]Zee�ee<q�Wdje�ZgZx*eD]"Zeekr7eje�nqWdje�Z[d�Zd�Zed�Zd�Zde	j fd��YZ!d�Z"eed�Z#eZ$dS(i(tdivisiontabsolute_importtprint_functiontmatrixtbmattmattasmatrixN(tconcatenatetisscalartbinary_reprtidentityt
asanyarray(t
issubdtypes0123456789.-+jeELit
_NumCharTablecB`seZd�ZRS(cC`s$t|�tkrt|�SdSdS(N(tchrt	_numcharstNone(tselfti((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyt__getitem__s
(t__name__t
__module__R(((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR
scC`s6|jt�}|s(td|��n
t|�SdS(NsInvalid data string supplied: (t	translatet_tablet	TypeErrorteval(tastrtstr_((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyt_evalsitcC`s9|jtt�}|s+td|��n
t|�SdS(NsInvalid data string supplied: (RRt	_todeleteRR(RR((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR)sc
C`s�|jd�}g}d}x�|D]�}|jd�}g}x0|D](}|j�}|jtt|��qDW|dkr�t|�}	n!t|�|	kr�td��n|d7}|j|�q"W|S(Nt;it,sRows not the same size.i(tsplittextendtmapRtlent
ValueErrortappend(
tdatatrowstnewdatatcounttrowttrowtnewrowtcolttemptNcols((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyt_convert_from_string0s 


cC`st|d|dt�S(s@
    Interpret the input as a matrix.

    Unlike `matrix`, `asmatrix` does not make a copy if the input is already
    a matrix or an ndarray.  Equivalent to ``matrix(data, copy=False)``.

    Parameters
    ----------
    data : array_like
        Input data.
    dtype : data-type
       Data-type of the output matrix.

    Returns
    -------
    mat : matrix
        `data` interpreted as a matrix.

    Examples
    --------
    >>> x = np.array([[1, 2], [3, 4]])

    >>> m = np.asmatrix(x)

    >>> x[0,0] = 5

    >>> m
    matrix([[5, 2],
            [3, 4]])

    tdtypetcopy(RtFalse(R'R2((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyRBs c
C`s�t|�}t|j�dks;|jd|jdkrJtd��ntt|�t�sntd��nddlm	}|dkr�|j
�}t|jd�|(|S|dkr�||�}|d9}n|}|dkrx*t|d�D]}t
j||�}q�W|St|�}|dt|�}}}x8|||dd	krvt
j||�}|d7}q?W|}xZt|d|�D]E}	t
j||�}|||	dd
kr�t
j||�}q�q�W|S(s{
    Raise a square matrix to the (integer) power `n`.

    For positive integers `n`, the power is computed by repeated matrix
    squarings and matrix multiplications. If ``n == 0``, the identity matrix
    of the same shape as M is returned. If ``n < 0``, the inverse
    is computed and then raised to the ``abs(n)``.

    Parameters
    ----------
    M : ndarray or matrix object
        Matrix to be "powered."  Must be square, i.e. ``M.shape == (m, m)``,
        with `m` a positive integer.
    n : int
        The exponent can be any integer or long integer, positive,
        negative, or zero.

    Returns
    -------
    M**n : ndarray or matrix object
        The return value is the same shape and type as `M`;
        if the exponent is positive or zero then the type of the
        elements is the same as those of `M`. If the exponent is
        negative the elements are floating-point.

    Raises
    ------
    LinAlgError
        If the matrix is not numerically invertible.

    See Also
    --------
    matrix
        Provides an equivalent function as the exponentiation operator
        (``**``, not ``^``).

    Examples
    --------
    >>> from numpy import linalg as LA
    >>> i = np.array([[0, 1], [-1, 0]]) # matrix equiv. of the imaginary unit
    >>> LA.matrix_power(i, 3) # should = -i
    array([[ 0, -1],
           [ 1,  0]])
    >>> LA.matrix_power(np.matrix(i), 3) # matrix arg returns matrix
    matrix([[ 0, -1],
            [ 1,  0]])
    >>> LA.matrix_power(i, 0)
    array([[1, 0],
           [0, 1]])
    >>> LA.matrix_power(i, -3) # should = 1/(-i) = i, but w/ f.p. elements
    array([[ 0.,  1.],
           [-1.,  0.]])

    Somewhat more sophisticated example

    >>> q = np.zeros((4, 4))
    >>> q[0:2, 0:2] = -i
    >>> q[2:4, 2:4] = i
    >>> q # one of the three quarternion units not equal to 1
    array([[ 0., -1.,  0.,  0.],
           [ 1.,  0.,  0.,  0.],
           [ 0.,  0.,  0.,  1.],
           [ 0.,  0., -1.,  0.]])
    >>> LA.matrix_power(q, 2) # = -np.eye(4)
    array([[-1.,  0.,  0.,  0.],
           [ 0., -1.,  0.,  0.],
           [ 0.,  0., -1.,  0.],
           [ 0.,  0.,  0., -1.]])

    iiisinput must be a square arraysexponent must be an integer(tinvi����it0t1(RR$tshapeR%RttypetintRtnumpy.linalgR5R3R
trangetNtdotR	(
tMtnR5tresultt_tbetatZtqtttk((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pytmatrix_powerds:G/
cB`s�eZdZdZd&ed�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd&d&d&d�Zd&d�Zdd�Zd&d&d&d�Zd&d&d&dd�Zd&d&d&dd�Zd&d&d&d�Zd&d&d�Zd&d&d�Zd&d&d�Zd&d&d�Zd&d&d�Zd&d&d�Z d&d&d�Z!d �Z"d!�Z#d"�Z$dd#�Z%d$�Z&d%�Z'e(e&d&�Z)e(e#d&�Z*e(e$d&�Z+e(e'd&�Z,e(e"d&�Z-RS('s�
    matrix(data, dtype=None, copy=True)

    Returns a matrix from an array-like object, or from a string of data.
    A matrix is a specialized 2-D array that retains its 2-D nature
    through operations.  It has certain special operators, such as ``*``
    (matrix multiplication) and ``**`` (matrix power).

    Parameters
    ----------
    data : array_like or string
       If `data` is a string, it is interpreted as a matrix with commas
       or spaces separating columns, and semicolons separating rows.
    dtype : data-type
       Data-type of the output matrix.
    copy : bool
       If `data` is already an `ndarray`, then this flag determines
       whether the data is copied (the default), or whether a view is
       constructed.

    See Also
    --------
    array

    Examples
    --------
    >>> a = np.matrix('1 2; 3 4')
    >>> print(a)
    [[1 2]
     [3 4]]

    >>> np.matrix([[1, 2], [3, 4]])
    matrix([[1, 2],
            [3, 4]])

    g$@cC`s�t|t�rQ|j}|dkr-|}n||krD|rD|S|j|�St|tj�r�|dkr{|j}ntj|�}|j|�}||jkr�|j|�S|r�|j�S|Snt|t	�r�t
|�}ntj|d|d|�}|j}|j
}	|dkr2td��n4|dkrGd}	n|dkrfd|	df}	nd}
|dkr�|jjr�d}
n|
p�|jjs�|j�}ntjj||	|jd	|d
|
�}|S(NR2R3ismatrix must be 2-dimensionaliitCtFtbuffertorder(ii(t
isinstanceRR2RtastypeR=tndarraytviewR3tstrR1tarraytndimR8R%tflagstfortrant
contiguoust__new__(tsubtypeR'R2R3tdtype2tintypetnewtarrRSR8RLtret((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyRW�sJ		


					cC`st|_t|t�r%|jr%dS|j}|dkr>dS|dkr�tg|jD]}|dkrW|^qW�}t|�}|dkr�||_dS|dkr�td��q�n	|j}|dkr�d|_n"|dkr�d|df|_ndS(Niisshape too large to be a matrix.i(ii(	R4t_getitemRMRRSttupleR8R$R%(RtobjRStxtnewshape((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyt__array_finalize__$s(		.		cC`s�t|_ztjj||�}Wdt|_Xt|tj�sE|S|jdkr\|dS|jdkr�|jd}yt	|�}Wn
d}nX|dkr�t
|d�r�|df|_q�d|f|_n|S(Nii((tTrueR^R=RORR4RMRSR8R$R(RtindextouttshR@((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR:s$	


cC`sat|tjttf�r1tj|t|��St|�sMt|d�r]tj||�St	S(Nt__rmul__(
RMR=ROtlistR_R>RRthasattrtNotImplemented(Rtother((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyt__mul__Ts
cC`stj||�S(N(R=R>(RRl((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyRh\scC`s|||(|S(N((RRl((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyt__imul___scC`s
t||�S(N(RH(RRl((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyt__pow__cscC`s|||(|S(N((RRl((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyt__ipow__fscC`stS(N(Rk(RRl((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyt__rpow__jscC`svt|j��jdd�}|j�}x<tdt|��D]%}||r@d||||<q@q@Wdj|�S(NRRRit s
(treprt	__array__treplacet
splitlinesR<R$tjoin(RtstlR((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyt__repr__ms
cC`st|j��S(N(RQRt(R((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyt__str__wscC`sJ|dkr|dS|dkr$|S|dkr:|j�Std��dS(s^A convenience function for operations that need to preserve axis
        orientation.
        iisunsupported axisN(ii(Rt	transposeR%(Rtaxis((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyt_alignzs
cC`s|dkr|dS|SdS(s�A convenience function for operations that want to collapse
        to a scalar like _align, but are using keepdims=True
        iN(ii(R(RR}((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyt	_collapse�scC`s|j�j�S(s�
        Return the matrix as a (possibly nested) list.

        See `ndarray.tolist` for full documentation.

        See Also
        --------
        ndarray.tolist

        Examples
        --------
        >>> x = np.matrix(np.arange(12).reshape((3,4))); x
        matrix([[ 0,  1,  2,  3],
                [ 4,  5,  6,  7],
                [ 8,  9, 10, 11]])
        >>> x.tolist()
        [[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11]]

        (Rtttolist(R((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR��scC`s(tjj||||dt�j|�S(s
        Returns the sum of the matrix elements, along the given axis.

        Refer to `numpy.sum` for full documentation.

        See Also
        --------
        numpy.sum

        Notes
        -----
        This is the same as `ndarray.sum`, except that where an `ndarray` would
        be returned, a `matrix` object is returned instead.

        Examples
        --------
        >>> x = np.matrix([[1, 2], [4, 3]])
        >>> x.sum()
        10
        >>> x.sum(axis=1)
        matrix([[3],
                [7]])
        >>> x.sum(axis=1, dtype='float')
        matrix([[ 3.],
                [ 7.]])
        >>> out = np.zeros((1, 2), dtype='float')
        >>> x.sum(axis=1, dtype='float', out=out)
        matrix([[ 3.],
                [ 7.]])

        tkeepdims(R=ROtsumRdR(RR}R2Rf((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR��s cC`stjj|d|�S(sL
        Return a possibly reshaped matrix.

        Refer to `numpy.squeeze` for more documentation.

        Parameters
        ----------
        axis : None or int or tuple of ints, optional
            Selects a subset of the single-dimensional entries in the shape.
            If an axis is selected with shape entry greater than one,
            an error is raised.

        Returns
        -------
        squeezed : matrix
            The matrix, but as a (1, N) matrix if it had shape (N, 1).

        See Also
        --------
        numpy.squeeze : related function

        Notes
        -----
        If `m` has a single column then that column is returned
        as the single row of a matrix.  Otherwise `m` is returned.
        The returned matrix is always either `m` itself or a view into `m`.
        Supplying an axis keyword argument will not affect the returned matrix
        but it may cause an error to be raised.

        Examples
        --------
        >>> c = np.matrix([[1], [2]])
        >>> c
        matrix([[1],
                [2]])
        >>> c.squeeze()
        matrix([[1, 2]])
        >>> r = c.T
        >>> r
        matrix([[1, 2]])
        >>> r.squeeze()
        matrix([[1, 2]])
        >>> m = np.matrix([[1, 2], [3, 4]])
        >>> m.squeeze()
        matrix([[1, 2],
                [3, 4]])

        R}(R=ROtsqueeze(RR}((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR��s1RIcC`stjj|d|�S(sD
        Return a flattened copy of the matrix.

        All `N` elements of the matrix are placed into a single row.

        Parameters
        ----------
        order : {'C', 'F', 'A', 'K'}, optional
            'C' means to flatten in row-major (C-style) order. 'F' means to
            flatten in column-major (Fortran-style) order. 'A' means to
            flatten in column-major order if `m` is Fortran *contiguous* in
            memory, row-major order otherwise. 'K' means to flatten `m` in
            the order the elements occur in memory. The default is 'C'.

        Returns
        -------
        y : matrix
            A copy of the matrix, flattened to a `(1, N)` matrix where `N`
            is the number of elements in the original matrix.

        See Also
        --------
        ravel : Return a flattened array.
        flat : A 1-D flat iterator over the matrix.

        Examples
        --------
        >>> m = np.matrix([[1,2], [3,4]])
        >>> m.flatten()
        matrix([[1, 2, 3, 4]])
        >>> m.flatten('F')
        matrix([[1, 3, 2, 4]])

        RL(R=ROtflatten(RRL((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR�s#cC`s(tjj||||dt�j|�S(s�
        Returns the average of the matrix elements along the given axis.

        Refer to `numpy.mean` for full documentation.

        See Also
        --------
        numpy.mean

        Notes
        -----
        Same as `ndarray.mean` except that, where that returns an `ndarray`,
        this returns a `matrix` object.

        Examples
        --------
        >>> x = np.matrix(np.arange(12).reshape((3, 4)))
        >>> x
        matrix([[ 0,  1,  2,  3],
                [ 4,  5,  6,  7],
                [ 8,  9, 10, 11]])
        >>> x.mean()
        5.5
        >>> x.mean(0)
        matrix([[ 4.,  5.,  6.,  7.]])
        >>> x.mean(1)
        matrix([[ 1.5],
                [ 5.5],
                [ 9.5]])

        R�(R=ROtmeanRdR(RR}R2Rf((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR�'s icC`s+tjj|||||dt�j|�S(s?
        Return the standard deviation of the array elements along the given axis.

        Refer to `numpy.std` for full documentation.

        See Also
        --------
        numpy.std

        Notes
        -----
        This is the same as `ndarray.std`, except that where an `ndarray` would
        be returned, a `matrix` object is returned instead.

        Examples
        --------
        >>> x = np.matrix(np.arange(12).reshape((3, 4)))
        >>> x
        matrix([[ 0,  1,  2,  3],
                [ 4,  5,  6,  7],
                [ 8,  9, 10, 11]])
        >>> x.std()
        3.4520525295346629
        >>> x.std(0)
        matrix([[ 3.26598632,  3.26598632,  3.26598632,  3.26598632]])
        >>> x.std(1)
        matrix([[ 1.11803399],
                [ 1.11803399],
                [ 1.11803399]])

        R�(R=ROtstdRdR(RR}R2Rftddof((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR�Is cC`s+tjj|||||dt�j|�S(s*
        Returns the variance of the matrix elements, along the given axis.

        Refer to `numpy.var` for full documentation.

        See Also
        --------
        numpy.var

        Notes
        -----
        This is the same as `ndarray.var`, except that where an `ndarray` would
        be returned, a `matrix` object is returned instead.

        Examples
        --------
        >>> x = np.matrix(np.arange(12).reshape((3, 4)))
        >>> x
        matrix([[ 0,  1,  2,  3],
                [ 4,  5,  6,  7],
                [ 8,  9, 10, 11]])
        >>> x.var()
        11.916666666666666
        >>> x.var(0)
        matrix([[ 10.66666667,  10.66666667,  10.66666667,  10.66666667]])
        >>> x.var(1)
        matrix([[ 1.25],
                [ 1.25],
                [ 1.25]])

        R�(R=ROtvarRdR(RR}R2RfR�((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR�ks cC`s(tjj||||dt�j|�S(s�
        Return the product of the array elements over the given axis.

        Refer to `prod` for full documentation.

        See Also
        --------
        prod, ndarray.prod

        Notes
        -----
        Same as `ndarray.prod`, except, where that returns an `ndarray`, this
        returns a `matrix` object instead.

        Examples
        --------
        >>> x = np.matrix(np.arange(12).reshape((3,4))); x
        matrix([[ 0,  1,  2,  3],
                [ 4,  5,  6,  7],
                [ 8,  9, 10, 11]])
        >>> x.prod()
        0
        >>> x.prod(0)
        matrix([[  0,  45, 120, 231]])
        >>> x.prod(1)
        matrix([[   0],
                [ 840],
                [7920]])

        R�(R=ROtprodRdR(RR}R2Rf((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR��scC`s%tjj|||dt�j|�S(sG
        Test whether any array element along a given axis evaluates to True.

        Refer to `numpy.any` for full documentation.

        Parameters
        ----------
        axis : int, optional
            Axis along which logical OR is performed
        out : ndarray, optional
            Output to existing array instead of creating new one, must have
            same shape as expected output

        Returns
        -------
            any : bool, ndarray
                Returns a single bool if `axis` is ``None``; otherwise,
                returns `ndarray`

        R�(R=ROtanyRdR(RR}Rf((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR��scC`s%tjj|||dt�j|�S(s�
        Test whether all matrix elements along a given axis evaluate to True.

        Parameters
        ----------
        See `numpy.all` for complete descriptions

        See Also
        --------
        numpy.all

        Notes
        -----
        This is the same as `ndarray.all`, but it returns a `matrix` object.

        Examples
        --------
        >>> x = np.matrix(np.arange(12).reshape((3,4))); x
        matrix([[ 0,  1,  2,  3],
                [ 4,  5,  6,  7],
                [ 8,  9, 10, 11]])
        >>> y = x[0]; y
        matrix([[0, 1, 2, 3]])
        >>> (x == y)
        matrix([[ True,  True,  True,  True],
                [False, False, False, False],
                [False, False, False, False]], dtype=bool)
        >>> (x == y).all()
        False
        >>> (x == y).all(0)
        matrix([[False, False, False, False]], dtype=bool)
        >>> (x == y).all(1)
        matrix([[ True],
                [False],
                [False]], dtype=bool)

        R�(R=ROtallRdR(RR}Rf((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR��s&cC`s%tjj|||dt�j|�S(s�
        Return the maximum value along an axis.

        Parameters
        ----------
        See `amax` for complete descriptions

        See Also
        --------
        amax, ndarray.max

        Notes
        -----
        This is the same as `ndarray.max`, but returns a `matrix` object
        where `ndarray.max` would return an ndarray.

        Examples
        --------
        >>> x = np.matrix(np.arange(12).reshape((3,4))); x
        matrix([[ 0,  1,  2,  3],
                [ 4,  5,  6,  7],
                [ 8,  9, 10, 11]])
        >>> x.max()
        11
        >>> x.max(0)
        matrix([[ 8,  9, 10, 11]])
        >>> x.max(1)
        matrix([[ 3],
                [ 7],
                [11]])

        R�(R=ROtmaxRdR(RR}Rf((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR��s!cC`stjj|||�j|�S(s�
        Indexes of the maximum values along an axis.

        Return the indexes of the first occurrences of the maximum values
        along the specified axis.  If axis is None, the index is for the
        flattened matrix.

        Parameters
        ----------
        See `numpy.argmax` for complete descriptions

        See Also
        --------
        numpy.argmax

        Notes
        -----
        This is the same as `ndarray.argmax`, but returns a `matrix` object
        where `ndarray.argmax` would return an `ndarray`.

        Examples
        --------
        >>> x = np.matrix(np.arange(12).reshape((3,4))); x
        matrix([[ 0,  1,  2,  3],
                [ 4,  5,  6,  7],
                [ 8,  9, 10, 11]])
        >>> x.argmax()
        11
        >>> x.argmax(0)
        matrix([[2, 2, 2, 2]])
        >>> x.argmax(1)
        matrix([[3],
                [3],
                [3]])

        (R=ROtargmaxR~(RR}Rf((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR�s%cC`s%tjj|||dt�j|�S(s�
        Return the minimum value along an axis.

        Parameters
        ----------
        See `amin` for complete descriptions.

        See Also
        --------
        amin, ndarray.min

        Notes
        -----
        This is the same as `ndarray.min`, but returns a `matrix` object
        where `ndarray.min` would return an ndarray.

        Examples
        --------
        >>> x = -np.matrix(np.arange(12).reshape((3,4))); x
        matrix([[  0,  -1,  -2,  -3],
                [ -4,  -5,  -6,  -7],
                [ -8,  -9, -10, -11]])
        >>> x.min()
        -11
        >>> x.min(0)
        matrix([[ -8,  -9, -10, -11]])
        >>> x.min(1)
        matrix([[ -3],
                [ -7],
                [-11]])

        R�(R=ROtminRdR(RR}Rf((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR�7s!cC`stjj|||�j|�S(s�
        Indexes of the minimum values along an axis.

        Return the indexes of the first occurrences of the minimum values
        along the specified axis.  If axis is None, the index is for the
        flattened matrix.

        Parameters
        ----------
        See `numpy.argmin` for complete descriptions.

        See Also
        --------
        numpy.argmin

        Notes
        -----
        This is the same as `ndarray.argmin`, but returns a `matrix` object
        where `ndarray.argmin` would return an `ndarray`.

        Examples
        --------
        >>> x = -np.matrix(np.arange(12).reshape((3,4))); x
        matrix([[  0,  -1,  -2,  -3],
                [ -4,  -5,  -6,  -7],
                [ -8,  -9, -10, -11]])
        >>> x.argmin()
        11
        >>> x.argmin(0)
        matrix([[2, 2, 2, 2]])
        >>> x.argmin(1)
        matrix([[3],
                [3],
                [3]])

        (R=ROtargminR~(RR}Rf((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR�Zs%cC`stjj|||�j|�S(s�
        Peak-to-peak (maximum - minimum) value along the given axis.

        Refer to `numpy.ptp` for full documentation.

        See Also
        --------
        numpy.ptp

        Notes
        -----
        Same as `ndarray.ptp`, except, where that would return an `ndarray` object,
        this returns a `matrix` object.

        Examples
        --------
        >>> x = np.matrix(np.arange(12).reshape((3,4))); x
        matrix([[ 0,  1,  2,  3],
                [ 4,  5,  6,  7],
                [ 8,  9, 10, 11]])
        >>> x.ptp()
        11
        >>> x.ptp(0)
        matrix([[8, 8, 8, 8]])
        >>> x.ptp(1)
        matrix([[3],
                [3],
                [3]])

        (R=ROtptpR~(RR}Rf((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR��scC`sN|j\}}||kr.ddlm}nddlm}t||��S(s=
        Returns the (multiplicative) inverse of invertible `self`.

        Parameters
        ----------
        None

        Returns
        -------
        ret : matrix object
            If `self` is non-singular, `ret` is such that ``ret * self`` ==
            ``self * ret`` == ``np.matrix(np.eye(self[0,:].size)`` all return
            ``True``.

        Raises
        ------
        numpy.linalg.LinAlgError: Singular matrix
            If `self` is singular.

        See Also
        --------
        linalg.inv

        Examples
        --------
        >>> m = np.matrix('[1, 2; 3, 4]'); m
        matrix([[1, 2],
                [3, 4]])
        >>> m.getI()
        matrix([[-2. ,  1. ],
                [ 1.5, -0.5]])
        >>> m.getI() * m
        matrix([[ 1.,  0.],
                [ 0.,  1.]])

        i(R5(tpinv(R8t
numpy.dualR5R�R(RR?R=tfunc((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pytgetI�s
%cC`s
|j�S(s1
        Return `self` as an `ndarray` object.

        Equivalent to ``np.asarray(self)``.

        Parameters
        ----------
        None

        Returns
        -------
        ret : ndarray
            `self` as an `ndarray`

        Examples
        --------
        >>> x = np.matrix(np.arange(12).reshape((3,4))); x
        matrix([[ 0,  1,  2,  3],
                [ 4,  5,  6,  7],
                [ 8,  9, 10, 11]])
        >>> x.getA()
        array([[ 0,  1,  2,  3],
               [ 4,  5,  6,  7],
               [ 8,  9, 10, 11]])

        (Rt(R((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pytgetA�scC`s|j�j�S(s
        Return `self` as a flattened `ndarray`.

        Equivalent to ``np.asarray(x).ravel()``

        Parameters
        ----------
        None

        Returns
        -------
        ret : ndarray
            `self`, 1-D, as an `ndarray`

        Examples
        --------
        >>> x = np.matrix(np.arange(12).reshape((3,4))); x
        matrix([[ 0,  1,  2,  3],
                [ 4,  5,  6,  7],
                [ 8,  9, 10, 11]])
        >>> x.getA1()
        array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11])

        (Rttravel(R((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pytgetA1�scC`stjj|d|�S(s	
        Return a flattened matrix.

        Refer to `numpy.ravel` for more documentation.

        Parameters
        ----------
        order : {'C', 'F', 'A', 'K'}, optional
            The elements of `m` are read using this index order. 'C' means to
            index the elements in C-like order, with the last axis index
            changing fastest, back to the first axis index changing slowest.
            'F' means to index the elements in Fortran-like index order, with
            the first index changing fastest, and the last index changing
            slowest. Note that the 'C' and 'F' options take no account of the
            memory layout of the underlying array, and only refer to the order
            of axis indexing.  'A' means to read the elements in Fortran-like
            index order if `m` is Fortran *contiguous* in memory, C-like order
            otherwise.  'K' means to read the elements in the order they occur
            in memory, except for reversing the data when strides are negative.
            By default, 'C' index order is used.

        Returns
        -------
        ret : matrix
            Return the matrix flattened to shape `(1, N)` where `N`
            is the number of elements in the original matrix.
            A copy is made only if necessary.

        See Also
        --------
        matrix.flatten : returns a similar output matrix but always a copy
        matrix.flat : a flat iterator on the array.
        numpy.ravel : related function which returns an ndarray

        RL(R=ROR�(RRL((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR�s$cC`s
|j�S(s@
        Returns the transpose of the matrix.

        Does *not* conjugate!  For the complex conjugate transpose, use ``.H``.

        Parameters
        ----------
        None

        Returns
        -------
        ret : matrix object
            The (non-conjugated) transpose of the matrix.

        See Also
        --------
        transpose, getH

        Examples
        --------
        >>> m = np.matrix('[1, 2; 3, 4]')
        >>> m
        matrix([[1, 2],
                [3, 4]])
        >>> m.getT()
        matrix([[1, 3],
                [2, 4]])

        (R|(R((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pytgetT.scC`s6t|jjtj�r(|j�j�S|j�SdS(sF
        Returns the (complex) conjugate transpose of `self`.

        Equivalent to ``np.transpose(self)`` if `self` is real-valued.

        Parameters
        ----------
        None

        Returns
        -------
        ret : matrix object
            complex conjugate transpose of `self`

        Examples
        --------
        >>> x = np.matrix(np.arange(12).reshape((3,4)))
        >>> z = x - 1j*x; z
        matrix([[  0. +0.j,   1. -1.j,   2. -2.j,   3. -3.j],
                [  4. -4.j,   5. -5.j,   6. -6.j,   7. -7.j],
                [  8. -8.j,   9. -9.j,  10.-10.j,  11.-11.j]])
        >>> z.getH()
        matrix([[  0. +0.j,   4. +4.j,   8. +8.j],
                [  1. +1.j,   5. +5.j,   9. +9.j],
                [  2. +2.j,   6. +6.j,  10.+10.j],
                [  3. +3.j,   7. +7.j,  11.+11.j]])

        N(t
issubclassR2R9R=tcomplexfloatingR|t	conjugate(R((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pytgetHNsN(.RRt__doc__t__array_priority__RRdRWRcRRmRhRnRoRpRqRzR{R~RR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�tpropertytTtAtA1tHtI(((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR�sR$.									
		
		$5%"""!(#'#'!	,		'	 	"cC`s|jd�}g}x�|D]�}|jd�}g}x!|D]}|j|j��q>W|}g}	x~|D]v}
|
j�}
y||
}WnFtk
r�y||
}Wq�tk
r�td|
f��q�XnX|	j|�qnW|jt|	dd��qWt|dd�S(NRR s%s not foundR}i����i(R!R"tstriptKeyErrorR&R(RQtgdicttldictR(trowtupR+R,R-RatcoltupR.tthismat((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyt_from_stringvs*




cC`st|t�ra|dkr?tj�j}|j}|j}n|}|}tt	|||��St|t
tf�r�g}xO|D]G}t|tj
�r�tt|dd��S|jt|dd��q�Wtt|dd��St|tj
�rt|�SdS(s9
    Build a matrix object from a string, nested sequence, or array.

    Parameters
    ----------
    obj : str or array_like
        Input data.  Names of variables in the current scope may be
        referenced, even if `obj` is a string.
    ldict : dict, optional
        A dictionary that replaces local operands in current frame.
        Ignored if `obj` is not a string or `gdict` is `None`.
    gdict : dict, optional
        A dictionary that replaces global operands in current frame.
        Ignored if `obj` is not a string.

    Returns
    -------
    out : matrix
        Returns a matrix object, which is a specialized 2-D array.

    See Also
    --------
    matrix

    Examples
    --------
    >>> A = np.mat('1 1; 1 1')
    >>> B = np.mat('2 2; 2 2')
    >>> C = np.mat('3 4; 5 6')
    >>> D = np.mat('7 8; 9 0')

    All the following expressions construct the same block matrix:

    >>> np.bmat([[A, B], [C, D]])
    matrix([[1, 1, 2, 2],
            [1, 1, 2, 2],
            [3, 4, 7, 8],
            [5, 6, 9, 0]])
    >>> np.bmat(np.r_[np.c_[A, B], np.c_[C, D]])
    matrix([[1, 1, 2, 2],
            [1, 1, 2, 2],
            [3, 4, 7, 8],
            [5, 6, 9, 0]])
    >>> np.bmat('A,B; C,D')
    matrix([[1, 1, 2, 2],
            [1, 1, 2, 2],
            [3, 4, 7, 8],
            [5, 6, 9, 0]])

    R}i����iN(RMRQRtsyst	_getframetf_backt	f_globalstf_localsRR�R_RiR=RORR&(R`R�R�tframet	glob_dicttloc_dicttarr_rowsR+((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyR�s"3	
(%t
__future__RRRt__all__R�tnumpy.core.numerictcoretnumericR=RRR	R
Rtnumpy.core.numerictypesRRtversion_infoR
RRRR<RGRRwRR&R1RRHRORR�RR(((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/matrixlib/defmatrix.pyt<module>s>(	

		"	l����	K

Zerion Mini Shell 1.0