8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86774fc commit 503081bCopy full SHA for 503081b
examples/animation/simple_3danim.py
@@ -14,13 +14,13 @@ def Gen_RandLine(length, dims=2) :
14
dims is the number of dimensions the line has.
15
"""
16
lineData = np.empty((dims, length))
17
- lineData[:, 0] = np.random.rand(1, dims)
+ lineData[:, 0] = np.random.rand(dims)
18
for index in xrange(1, length) :
19
# scaling the random numbers by 0.1 so
20
# movement is small compared to position.
21
# subtraction by 0.5 is to change the range to [-0.5, 0.5]
22
# to allow a line to move backwards.
23
- step = ((np.random.rand(1, dims) - 0.5) * 0.1)
+ step = ((np.random.rand(dims) - 0.5) * 0.1)
24
lineData[:, index] = lineData[:, index-1] + step
25
26
return lineData
0 commit comments