In [1]:
dims = 3
length = 10

lineData = np.empty((dims, length))
lineData[:, 0] = np.random.rand(dims)
for index in range(1, length) :
    # scaling the random numbers by 0.1 so
    # movement is small compared to position.
    # subtraction by 0.5 is to change the range to [-0.5, 0.5]
    # to allow a line to move backwards.
    step = ((np.random.rand(dims) - 0.5) * 0.1)
    lineData[:, index] = lineData[:, index-1] + step

lineData


Out[1]:
array([[ 0.75720211,  0.74718355,  0.76199832,  0.81120784,  0.78488408,
         0.7514288 ,  0.72207901,  0.70182893,  0.67413891,  0.72112972],
       [ 0.47967236,  0.43142075,  0.46243714,  0.49393843,  0.49164275,
         0.45236601,  0.46634398,  0.43994008,  0.47050365,  0.51430031],
       [ 0.59108673,  0.63527947,  0.63076866,  0.67147668,  0.62409375,
         0.67293944,  0.65609828,  0.62499028,  0.57906133,  0.52951011]])

In [2]:
np.random.rand(3,10)


Out[2]:
array([[ 0.16986942,  0.83206202,  0.91216653,  0.93453495,  0.57750475,
         0.09241297,  0.82722322,  0.63706143,  0.48126526,  0.72329103],
       [ 0.32378598,  0.46079083,  0.33484699,  0.22296426,  0.79352775,
         0.63730101,  0.06693648,  0.2130392 ,  0.10741641,  0.53869933],
       [ 0.6537889 ,  0.14218846,  0.53219751,  0.42326513,  0.23419913,
         0.79155497,  0.78010479,  0.38853618,  0.07818531,  0.25197476]])

In [ ]: