/usr/lib64/python2.6/site-packages/numpy
NameSizeModeActions
compat/-0755rm
core/-0755rm
distutils/-0755rm
doc/-0755rm
fft/-0755rm
lib/-0755rm
linalg/-0755rm
ma/-0755rm
matrixlib/-0755rm
numarray/-0755rm
oldnumeric/-0755rm
polynomial/-0755rm
random/-0755rm
testing/-0755rm
tests/-0755rm
add_newdocs.py1593310644editdlrm
add_newdocs.pyc2149100644editdlrm
add_newdocs.pyo2149100644editdlrm
ctypeslib.py123730644editdlrm
ctypeslib.pyc121920644editdlrm
ctypeslib.pyo121920644editdlrm
dual.py17830644editdlrm
dual.pyc21730644editdlrm
dual.pyo21730644editdlrm
matlib.py93310644editdlrm
matlib.pyc104650644editdlrm
matlib.pyo104650644editdlrm
setup.py9450644editdlrm
setup.pyc10560644editdlrm
setup.pyo10560644editdlrm
setupscons.py14860644editdlrm
setupscons.pyc16320644editdlrm
setupscons.pyo16320644editdlrm
version.py5750644editdlrm
version.pyc6340644editdlrm
version.pyo6340644editdlrm
_import_tools.py128880644editdlrm
_import_tools.pyc112480644editdlrm
_import_tools.pyo112480644editdlrm
__config__.py14990644editdlrm
__config__.pyc16240644editdlrm
__config__.pyo16240644editdlrm
__init__.py48750644editdlrm
__init__.pyc50840644editdlrm
__init__.pyo50840644editdlrm
Edit: /usr/lib64/python2.6/site-packages/numpy/matlib.pyo (10465B)
Ñò \ÐKc@s¼ddkZddklZlZddkTeiZeiZedddg7Zddd„Zddd „Z ddd „Z dd „Z dd e d „Z d„Zd„Zd„ZdS(iÿÿÿÿN(tmatrixtasmatrix(t*trandtrandntrepmattCcCstit||d|ƒS(s Return a new matrix of given shape and type, without initializing entries. Parameters ---------- shape : int or tuple of int Shape of the empty matrix. dtype : data-type, optional Desired output data-type. order : {'C', 'F'}, optional Whether to store multi-dimensional data in C (row-major) or Fortran (column-major) order in memory. See Also -------- empty_like, zeros Notes ----- `empty`, unlike `zeros`, does not set the matrix values to zero, and may therefore be marginally faster. On the other hand, it requires the user to manually set all the values in the array, and should be used with caution. Examples -------- >>> import numpy.matlib >>> np.matlib.empty((2, 2)) # filled with random data matrix([[ 6.76425276e-320, 9.79033856e-307], [ 7.39337286e-309, 3.22135945e-309]]) >>> np.matlib.empty((2, 2), dtype=int) matrix([[ 6600475, 0], [ 6586976, 22740995]]) torder(tndarrayt__new__R(tshapetdtypeR((s2/usr/lib64/python2.6/site-packages/numpy/matlib.pytempty s$cCs,tit||d|ƒ}|idƒ|S(sŒ Matrix of ones. Return a matrix of given shape and type, filled with ones. Parameters ---------- shape : {sequence of ints, int} Shape of the matrix dtype : data-type, optional The desired data-type for the matrix, default is np.float64. order : {'C', 'F'}, optional Whether to store matrix in C- or Fortran-contiguous order, default is 'C'. Returns ------- out : matrix Matrix of ones of given shape, dtype, and order. See Also -------- ones : Array of ones. matlib.zeros : Zero matrix. Notes ----- If `shape` has length one i.e. ``(N,)``, or is a scalar ``N``, `out` becomes a single row matrix of shape ``(1,N)``. Examples -------- >>> np.matlib.ones((2,3)) matrix([[ 1., 1., 1.], [ 1., 1., 1.]]) >>> np.matlib.ones(2) matrix([[ 1., 1.]]) Ri(RR Rtfill(R R Rta((s2/usr/lib64/python2.6/site-packages/numpy/matlib.pytones1s) cCs,tit||d|ƒ}|idƒ|S(s± Return a matrix of given shape and type, filled with zeros. Parameters ---------- shape : int or sequence of ints Shape of the matrix dtype : data-type, optional The desired data-type for the matrix, default is float. order : {'C', 'F'}, optional Whether to store the result in C- or Fortran-contiguous order, default is 'C'. Returns ------- out : matrix Zero matrix of given shape, dtype, and order. See Also -------- numpy.zeros : Equivalent array function. matlib.ones : Return a matrix of ones. Notes ----- If `shape` has length one i.e. ``(N,)``, or is a scalar ``N``, `out` becomes a single row matrix of shape ``(1,N)``. Examples -------- >>> import numpy.matlib >>> np.matlib.zeros((2, 3)) matrix([[ 0., 0., 0.], [ 0., 0., 0.]]) >>> np.matlib.zeros(2) matrix([[ 0., 0.]]) Ri(RR RR (R R RR((s2/usr/lib64/python2.6/site-packages/numpy/matlib.pytzeros^s( cCsEtdg|dgd|ƒ}t||fd|ƒ}||_|S(s— Returns the square identity matrix of given size. Parameters ---------- n : int Size of the returned identity matrix. dtype : data-type, optional Data-type of the output. Defaults to ``float``. Returns ------- out : matrix `n` x `n` matrix with its main diagonal set to one, and all other elements zero. See Also -------- numpy.identity : Equivalent array function. matlib.eye : More general matrix identity function. Examples -------- >>> import numpy.matlib >>> np.identity(3, dtype=int) array([[1, 0, 0], [0, 1, 0], [0, 0, 1]]) iiR (tarrayR tflat(tnR Rtb((s2/usr/lib64/python2.6/site-packages/numpy/matlib.pytidentityŠs  icCstti||||ƒƒS(sà Return a matrix with ones on the diagonal and zeros elsewhere. Parameters ---------- n : int Number of rows in the output. M : int, optional Number of columns in the output, defaults to `n`. k : int, optional Index of the diagonal: 0 refers to the main diagonal, a positive value refers to an upper diagonal, and a negative value to a lower diagonal. dtype : dtype, optional Data-type of the returned matrix. Returns ------- I : matrix A `n` x `M` matrix where all elements are equal to zero, except for the `k`-th diagonal, whose values are equal to one. See Also -------- numpy.eye : Equivalent array function. identity : Square identity matrix. Examples -------- >>> import numpy.matlib >>> np.matlib.eye(3, k=1, dtype=float) matrix([[ 0., 1., 0.], [ 0., 0., 1.], [ 0., 0., 0.]]) (Rtnpteye(RtMtkR ((s2/usr/lib64/python2.6/site-packages/numpy/matlib.pyR®s%cGs8t|dtƒo|d}nttii|ŒƒS(sj Return a matrix of random values with given shape. Create a matrix of the given shape and propagate it with random samples from a uniform distribution over ``[0, 1)``. Parameters ---------- \*args : Arguments Shape of the output. If given as N integers, each integer specifies the size of one dimension. If given as a tuple, this tuple gives the complete shape. Returns ------- out : ndarray The matrix of random values with shape given by `\*args`. See Also -------- randn, numpy.random.rand Examples -------- >>> import numpy.matlib >>> np.matlib.rand(2, 3) matrix([[ 0.68340382, 0.67926887, 0.83271405], [ 0.00793551, 0.20468222, 0.95253525]]) >>> np.matlib.rand((2, 3)) matrix([[ 0.84682055, 0.73626594, 0.11308016], [ 0.85429008, 0.3294825 , 0.89139555]]) If the first argument is a tuple, other arguments are ignored: >>> np.matlib.rand((2, 3), 4) matrix([[ 0.46898646, 0.15163588, 0.95188261], [ 0.59208621, 0.09561818, 0.00583606]]) i(t isinstancettupleRRtrandomR(targs((s2/usr/lib64/python2.6/site-packages/numpy/matlib.pyRÕs)cGs8t|dtƒo|d}nttii|ŒƒS(só Return a random matrix with data from the "standard normal" distribution. `randn` generates a matrix filled with random floats sampled from a univariate "normal" (Gaussian) distribution of mean 0 and variance 1. Parameters ---------- \*args : Arguments Shape of the output. If given as N integers, each integer specifies the size of one dimension. If given as a tuple, this tuple gives the complete shape. Returns ------- Z : matrix of floats A matrix of floating-point samples drawn from the standard normal distribution. See Also -------- rand, random.randn Notes ----- For random samples from :math:`N(\mu, \sigma^2)`, use: ``sigma * np.matlib.randn(...) + mu`` Examples -------- >>> import numpy.matlib >>> np.matlib.randn(1) matrix([[-0.09542833]]) >>> np.matlib.randn(1, 2, 3) matrix([[ 0.16198284, 0.0194571 , 0.18312985], [-0.7509172 , 1.61055 , 0.45298599]]) Two-by-four matrix of samples from :math:`N(3, 6.25)`: >>> 2.5 * np.matlib.randn((2, 4)) + 3 matrix([[ 4.74085004, 8.89381862, 4.09042411, 4.83721922], [ 7.52373709, 5.07933944, -2.64043543, 0.45610557]]) i(RRRRRR(R((s2/usr/lib64/python2.6/site-packages/numpy/matlib.pyRs.c CsÃt|ƒ}|i}|djod\}}n5|djod|id}}n|i\}}||}||}|id|iƒi|dƒi||ƒi|dƒ}|i||ƒS(sj Repeat a 0-D to 2-D array or matrix MxN times. Parameters ---------- a : array_like The array or matrix to be repeated. m, n : int The number of times `a` is repeated along the first and second axes. Returns ------- out : ndarray The result of repeating `a`. Examples -------- >>> import numpy.matlib >>> a0 = np.array(1) >>> np.matlib.repmat(a0, 2, 3) array([[1, 1, 1], [1, 1, 1]]) >>> a1 = np.arange(4) >>> np.matlib.repmat(a1, 2, 2) array([[0, 1, 2, 3, 0, 1, 2, 3], [0, 1, 2, 3, 0, 1, 2, 3]]) >>> a2 = np.asmatrix(np.arange(6).reshape(2, 3)) >>> np.matlib.repmat(a2, 2, 3) matrix([[0, 1, 2, 0, 1, 2, 0, 1, 2], [3, 4, 5, 3, 4, 5, 3, 4, 5], [0, 1, 2, 0, 1, 2, 0, 1, 2], [3, 4, 5, 3, 4, 5, 3, 4, 5]]) ii(ii(t asanyarraytndimR treshapetsizetrepeat( RtmRRtorigrowstorigcolstrowstcolstc((s2/usr/lib64/python2.6/site-packages/numpy/matlib.pyR4s%      9(tnumpyRtnumpy.matrixlib.defmatrixRRt __version__t__all__tNoneR RRRtfloatRRRR(((s2/usr/lib64/python2.6/site-packages/numpy/matlib.pyts    &-, $' - 2