title: Pass shape tuple to Numpy `random.rand`
body: <p>I am using <code>np.random.rand</code> to create a matrix/tensor of the desired shape. However, this shape argument (generated in runtime) is a tuple such as: (2, 3, 4). How can we use this <code>shape</code> in <code>np.random.rand</code>?</p>
  
  <p>Doing <code>np.random.rand(shape)</code> doesn't work and would give the following error:</p>
  
  <p><code>TypeError: 'tuple' object cannot be interpreted as an index</code></p>