Did I find the right examples for you? yes no

All Samples(16)  |  Call(12)  |  Derive(0)  |  Import(4)
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(more...)

        def rand(*args):
    """
    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]])       #random
    >>> np.matlib.rand((2, 3))
    matrix([[ 0.84682055,  0.73626594,  0.11308016],
            [ 0.85429008,  0.3294825 ,  0.89139555]])       #random

    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]])       #random

    """
    if isinstance(args[0], tuple):
        args = args[0]
    return asmatrix(np.random.rand(*args))
        


src/d/o/dolo-0.4.6.3/dolo/numeric/extern/helpers.py   dolo(Download)
from numpy import r_, c_, arange, diff, mean, sqrt, log, mat
from numpy import asarray, nan
from numpy.matlib import ones, zeros, rand, eye, empty
from numpy.linalg import eigh, cholesky, solve, lstsq
# (lstsq also as tool to determine rank)
# test cases:
if __name__ == '__main__':
    from numpy.matlib import rand
    data = rand((100, 3))
    print getDeterministics(100, 'ctl', 0.3).shape
    # check loop for sorting evals:
    for run in range(100):
        m1 = rand((10,5))
        m2 = rand((10,5))
        m1in = m1.T * m1

src/d/o/dolo-HEAD/dolo/numeric/extern/helpers.py   dolo(Download)
from numpy import r_, c_, arange, diff, mean, sqrt, log, mat
from numpy import asarray, nan
from numpy.matlib import ones, zeros, rand, eye, empty
from numpy.linalg import eigh, cholesky, solve, lstsq
# (lstsq also as tool to determine rank)
# test cases:
if __name__ == '__main__':
    from numpy.matlib import rand
    data = rand((100, 3))
    print getDeterministics(100, 'ctl', 0.3).shape
    # check loop for sorting evals:
    for run in range(100):
        m1 = rand((10,5))
        m2 = rand((10,5))
        m1in = m1.T * m1

src/n/u/nupic-linux64-HEAD/lib64/python2.6/site-packages/numpy/tests/test_matlib.py   nupic-linux64(Download)
def test_rand():
    x = np.matlib.rand(3)
    # check matrix type, array would have shape (3,)
    assert_(x.ndim == 2)
 

src/m/i/MissionPlanner-HEAD/Lib/site-packages/numpy/tests/test_matlib.py   MissionPlanner(Download)
def test_rand():
    x = np.matlib.rand(3)
    # check matrix type, array would have shape (3,)
    assert_(x.ndim == 2)
 

src/n/u/numpy-1.8.1/numpy/tests/test_matlib.py   numpy(Download)
def test_rand():
    x = np.matlib.rand(3)
    # check matrix type, array would have shape (3,)
    assert_(x.ndim == 2)
 

src/p/y/pyLDS-HEAD/test/test_LDS.py   pyLDS(Download)
def test_kfilter():
	model = setup()
	T = 100
	U = [mb.rand(2,1) for t in range(T)]
	Xo, Y = model.simulate(U)
def test_rtssmoother():
	model = setup()
	T = 100
	U = [mb.rand(2,1) for t in range(T)]
	Xo, Y = model.simulate(U)
def test_kfilter_nonstationary():
	T, model = setup_nonstationary()
	U = [mb.rand(2,1) for t in range(T)]
	Xo, Y = model.simulate(U)
	X, P, K, XPred, PPred = model.kfilter(Y, U)