
    KhPx                         / S Qr SSKrSSKrSSKrSSKJr  SSKJs  Jr	  SSKJ
r
Jr  SSKJr  S r\" S5      SS	 j5       r\" S5       " S
 S\	R                   5      5       rS r\" S5      SS j5       rg))matrixbmatasmatrix    N   )
set_module)concatenateisscalarmatrix_powerc                    S H  nU R                  US5      n M     U R                  S5      n/ n[        U5       H  u  pEUR                  S5      n/ nU H<  nUR                  5       n	UR                  [	        [
        R                  U	5      5        M>     US:X  a  [        U5      n
O[        U5      W
:w  a  [        S5      eUR                  U5        M     U$ )Nz[] ;,r   zRows not the same size.)
replacesplit	enumerateextendmapastliteral_evallen
ValueErrorappend)datacharrowsnewdatacountrowtrownewrowcoltempNcolss              K/var/www/html/env/lib/python3.13/site-packages/numpy/matrixlib/defmatrix.py_convert_from_stringr&      s    ||D"%  ::c?DGo
yy~C99;DMM#c..56  A:KE[E!677v & N    numpyc                     [        XSS9$ )a  
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
--------
>>> import numpy as np
>>> x = np.array([[1, 2], [3, 4]])

>>> m = np.asmatrix(x)

>>> x[0,0] = 5

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

Fdtypecopy)r   )r   r+   s     r%   r   r   #   s    D $%00r'   c                      \ rS rSrSrSrS&S jrS rS rS r	S	 r
S
 rS rS rS rS rS rS rS'S jrS(S jrS)S jrS'S jrS*S jrS*S jrS'S jrS+S jrS+S jrS+S jrS+S jrS+S jrS+S jrS+S jr\ S 5       r!\ S  5       r"\ S! 5       r#S)S" jr$\ S# 5       r%\ S$ 5       r&\%RN                  r(\"RN                  r)\#RN                  r*\&RN                  r+\!RN                  r,S%r-g),r   H   a&  
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).

.. note:: It is no longer recommended to use this class, even for linear
          algebra. Instead use regular arrays. The class may be removed
          in the future.

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
--------
>>> import numpy as np
>>> a = np.matrix('1 2; 3 4')
>>> a
matrix([[1, 2],
        [3, 4]])

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

g      $@Nc                    [         R                  " S[        SS9  [        U[        5      (       a0  UR
                  nUc  UnXB:X  a	  U(       d  U$ UR                  U5      $ [        U[        R                  5      (       ap  Uc  UR
                  nO[        R
                  " U5      nUR                  U 5      nXQR
                  :w  a  UR                  U5      $ U(       a  UR                  5       $ U$ [        U[        5      (       a  [        U5      nU(       d  S OSn[        R                  " XUS9nUR                  nUR                  n	US:  a  [!        S5      eUS:X  a  Sn	OUS	:X  a  S	U	S   4n	S
n
US:X  a  UR"                  R$                  (       a  Sn
U
(       d+  UR"                  R&                  (       d  UR                  5       n[        R                  R)                  X	UR
                  UU
S9nU$ )Nzthe matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.r   )
stacklevelTr*   zmatrix must be 2-dimensionalr      r2   r2   CF)bufferorder)warningswarnPendingDeprecationWarning
isinstancer   r+   astypeNndarrayviewr,   strr&   arrayndimshaper   flagsfortran
contiguous__new__)subtyper   r+   r,   dtype2intypenewarrrA   rB   r6   rets               r%   rF   matrix.__new__u   s    H
 0A	? dF##ZZF$;;u%%dAII&&}))G$C#zz&))xxz!
dC  '-D  tTggdd3xx		1H;<<QYEQYaMEAI399,,E--((*Cii		'*&+   - 
r'   c                    SU l         [        U[        5      (       a  UR                   (       a  g U R                  nUS:X  a  g US:  aW  [	        U R
                   Vs/ s H  o3S:  d  M
  UPM     sn5      n[        U5      nUS:X  a  X@l        g US:  a  [        S5      eOU R
                  nUS:X  a  SU l        g US:X  a  SUS   4U l        g s  snf )NFr   r2   zshape too large to be a matrix.r   r1   )_getitemr:   r   rA   tuplerB   r   r   )selfobjrA   xnewshapes        r%   __array_finalize__matrix.__array_finalize__   s    sF##yyAI1H=A1ua=>Hx=Dqy%
( !BCC  zzH19DJ 	 QYXa[)DJ >s   	C(Cc                    SU l          [        R                  R                  X5      nSU l         [	        U[        R                  5      (       d  U$ UR
                  S:X  a  US   $ UR
                  S:X  aH  UR                  S   n [        U5      nUS:  a  [        US   5      (       a  US4Ul        U$ SU4Ul        U$ ! SU l         f = f! [         a    Sn NIf = f)NTFr    r2   )
rO   r<   r=   __getitem__r:   rA   rB   r   	Exceptionr	   )rQ   indexoutshns        r%   rY   matrix.__getitem__   s    	"))''4C!DM#qyy))J88q=r7N88q=1BJ 1u%(++G	 
 G	
% "DM  s   B? C ?	CCCc                    [        U[        R                  [        [        45      (       a   [        R
                  " U [        U5      5      $ [        U5      (       d  [        US5      (       d  [        R
                  " X5      $ [        $ )N__rmul__)
r:   r<   r=   listrP   dotr   r	   hasattrNotImplementedrQ   others     r%   __mul__matrix.__mul__   sY    eaiiu56655x//E??'%"<"<55%%r'   c                 .    [         R                  " X5      $ N)r<   rc   rf   s     r%   ra   matrix.__rmul__   s    uuU!!r'   c                     X-  U S S & U $ rk   rX   rf   s     r%   __imul__matrix.__imul__   s    ,Qr'   c                     [        X5      $ rk   r
   rf   s     r%   __pow__matrix.__pow__   s    D((r'   c                     X-  U S S & U $ rk   rX   rf   s     r%   __ipow__matrix.__ipow__   s    -Qr'   c                     [         $ rk   )re   rf   s     r%   __rpow__matrix.__rpow__   s    r'   c                 d    Uc  U S   $ US:X  a  U $ US:X  a  U R                  5       $ [        S5      e)zNA convenience function for operations that need to preserve axis
orientation.
r   r   r   r2   zunsupported axis)	transposer   rQ   axiss     r%   _alignmatrix._align   s?     <:1WK1W>>##/00r'   c                     Uc  U S   $ U $ )zqA convenience function for operations that want to collapse
to a scalar like _align, but are using keepdims=True
rz   rX   r|   s     r%   	_collapsematrix._collapse  s     <:Kr'   c                 >    U R                  5       R                  5       $ )aR  
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]]

)	__array__tolistrQ   s    r%   r   matrix.tolist  s    ( ~~&&((r'   c                 ^    [         R                  R                  XX#SS9R                  U5      $ )aC  
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((2, 1), dtype='float')
>>> x.sum(axis=1, dtype='float', out=np.asmatrix(out))
matrix([[3.],
        [7.]])

Tkeepdims)r<   r=   sumr   rQ   r}   r+   r\   s       r%   r   
matrix.sum%  s)    @ yy}}Td}CMMdSSr'   c                 <    [         R                  R                  XS9$ )a  
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 axes of length one 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<   r=   squeezer|   s     r%   r   matrix.squeezeI  s    b yy   11r'   c                 <    [         R                  R                  XS9$ )al  
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]])

r6   )r<   r=   flattenrQ   r6   s     r%   r   matrix.flatten~  s    F yy   33r'   c                 ^    [         R                  R                  XX#SS9R                  U5      $ )a  
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]])

Tr   )r<   r=   meanr   r   s       r%   r   matrix.mean  s)    @ yy~~d%t~DNNtTTr'   c           	      `    [         R                  R                  XX#USS9R                  U5      $ )a  
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 # may vary
>>> x.std(0)
matrix([[ 3.26598632,  3.26598632,  3.26598632,  3.26598632]]) # may vary
>>> x.std(1)
matrix([[ 1.11803399],
        [ 1.11803399],
        [ 1.11803399]])

Tr   )r<   r=   stdr   rQ   r}   r+   r\   ddofs        r%   r   
matrix.std  ,    @ yy}}TTD}ISSTXYYr'   c           	      `    [         R                  R                  XX#USS9R                  U5      $ )aj  
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]]) # may vary
>>> x.var(1)
matrix([[1.25],
        [1.25],
        [1.25]])

Tr   )r<   r=   varr   r   s        r%   r   
matrix.var  r   r'   c                 ^    [         R                  R                  XX#SS9R                  U5      $ )a  
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]])

Tr   )r<   r=   prodr   r   s       r%   r   matrix.prod	  s(    > yy~~d%t~DNNtTTr'   c                 ^    [         R                  R                  XUSS9R                  U5      $ )a  
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`

Tr   )r<   r=   anyr   rQ   r}   r\   s      r%   r   
matrix.any*  s(    * yy}}Tt}<FFtLLr'   c                 ^    [         R                  R                  XUSS9R                  U5      $ )a  
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]])
>>> (x == y).all()
False
>>> (x == y).all(0)
matrix([[False, False, False, False]])
>>> (x == y).all(1)
matrix([[ True],
        [False],
        [False]])

Tr   )r<   r=   allr   r   s      r%   r   
matrix.allA  s)    L yy}}Tt}<FFtLLr'   c                 ^    [         R                  R                  XUSS9R                  U5      $ )a
  
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]])

Tr   )r<   r=   maxr   r   s      r%   r   
matrix.maxi  )    B yy}}Tt}<FFtLLr'   c                 `    [         R                  R                  XU5      R                  U5      $ )a  
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<   r=   argmaxr~   r   s      r%   r   matrix.argmax  '    J yyC077==r'   c                 ^    [         R                  R                  XUSS9R                  U5      $ )a   
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]])

Tr   )r<   r=   minr   r   s      r%   r   
matrix.min  r   r'   c                 `    [         R                  R                  XU5      R                  U5      $ )a  
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<   r=   argminr~   r   s      r%   r   matrix.argmin  r   r'   c                 N    [         R                  " XU5      R                  U5      $ )a   
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<   ptpr~   r   s      r%   r   
matrix.ptp  s     > uuT%,,T22r'   c                 d    U R                   u  pX:X  a  SSKJn  OSSKJn  [	        U" U 5      5      $ )aa  
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.], # may vary
        [ 0.,  1.]])

r   )inv)pinv)rB   numpy.linalgr   r   r   )rQ   Mr<   funcs       r%   Imatrix.I  s*    L zz601T
##r'   c                 "    U R                  5       $ )a  
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]])

)r   r   s    r%   Amatrix.AK  s    8 ~~r'   c                 >    U R                  5       R                  5       $ )ax  
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, ...,  9, 10, 11])


)r   ravelr   s    r%   A1	matrix.A1i  s    6 ~~%%''r'   c                 <    [         R                  R                  XS9$ )a!  
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

r   )r<   r=   r   r   s     r%   r   matrix.ravel  s    H yyt11r'   c                 "    U R                  5       $ )a  
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   s    r%   Tmatrix.T  s    > ~~r'   c                     [        U R                  R                  [        R                  5      (       a  U R                  5       R                  5       $ U R                  5       $ )a  
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]])

)
issubclassr+   typer<   complexfloatingr{   	conjugater   s    r%   Hmatrix.H  sB    < djjooq'8'899>>#--//>>##r'   )rO   rB   )NT)NNNrk   )r3   )NNNr   NN).__name__
__module____qualname____firstlineno____doc____array_priority__rF   rU   rY   rh   ra   rn   rq   rt   rw   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   propertyr   r   r   r   r   r   fgetgetTgetAgetA1getHgetI__static_attributes__rX   r'   r%   r   r   H   sE   )T 5n.4")1). TH12j#4J UD ZD ZDUBM.&MP!MF%>N!MF%>N3B *$ *$X    : ( (:$2L    @  $  $F 66D66DGGE66D66Dr'   r   c           	         U R                  S5      n/ nU H  nUR                  S5      n/ nU H"  nUR                  UR                  5       5        M$     Un/ n	U H)  n
U
R                  5       n
 X*   nU	R                  U5        M+     UR                  [        U	SS95        M     [        USS9$ ! [         a+     X   n NM! [         a  n[	        SU
< S35      S eS nAff = ff = f)Nr   r   zname z is not definedr   r   )r   r   stripKeyError	NameErrorr   r   )r?   gdictldictr   rowtupr   r    r!   rS   coltupr"   thismates                r%   _from_stringr     s    99S>DFyy~AMM!'')$ C))+CN* MM'"  	k&r23% & vA&&  NN#jG N#eC7/$BCMNNs*   .B..
C#9B??
C		C	C	C#c                 6   [        U [        5      (       aT  Uc8  [        R                  " 5       R                  nUR
                  nUR                  nOUnUn[        [        XU5      5      $ [        U [        [        45      (       ak  / nU  HP  n[        U[        R                  5      (       a  [        [        U SS95      s  $ UR                  [        USS95        MR     [        [        USS95      $ [        U [        R                  5      (       a  [        U 5      $ g)a  
Build a matrix object from a string, nested sequence, or array.

Parameters
----------
obj : str or array_like
    Input data. If a string, variables in the current scope may be
    referenced by name.
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
--------
block :
    A generalization of this function for N-d arrays, that returns normal
    ndarrays.

Examples
--------
>>> import numpy as np
>>> A = np.asmatrix('1 1; 1 1')
>>> B = np.asmatrix('2 2; 2 2')
>>> C = np.asmatrix('3 4; 5 6')
>>> D = np.asmatrix('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]])

Nr   r   r   )r:   r?   sys	_getframef_back	f_globalsf_localsr   r   rP   rb   r<   r=   r   r   )rR   r   r   frame	glob_dictloc_dictarr_rowsr   s           r%   r   r     s    n #s=MMO**EI~~HIHl38<==#t}%%C#qyy))k#B788Cb 9:	 
 k(344#qyy!!c{ "r'   rk   r   )__all__r   r7   r   _utilsr   numpy._core.numeric_corenumericr<   r   r	   r   r   r&   r   r=   r   r   r   rX   r'   r%   <module>r     s   
( 
  
    5 &( G!1 !1H GmQYY m m^'2 GL Lr'   