title: replacing a value in a list of numpy arrays
body: <p>I need to generate two lists of arrays:
  Each list will contain 1d-arrays, but lengths of each 1d-array may be different.
  First list will contain some meaningful values.
  Second list must be exactly the same in shape, but should contain only ones.</p>
  
  <p>Code to generate first array:</p>
  
  <pre class="lang-py prettyprint-override"><code>myarray=[]
  rowcount=3
  elements_per_row=[2,3,5]
  for i in range (0,rowcount):
      elements=elements_per_row[i]
      temparray=np.random.randn(elements)
      myarray.append(temparray)
  </code></pre>
  
  <p>Output of the code above will be a list of arrays (namely- 3 arrays with 2,3,5 elements, filled with random numbers).</p>
  
  <p>I have two questions:</p>
  
  <ol>
  <li><p>Is there any more elegant/vectorized/computationally faster way to generate first list ( array of arrays will be fine as well)? </p></li>
  <li><p>Generate a list of arrays exactly the same shape, but filled with ones:</p></li>
  </ol>
  
  <p>I do understand the most straightforward way: just add one more array at the beginning, and fill it with np.ones. 
  'Bruteforce' approach will be:</p>
  
  <pre class="lang-py prettyprint-override"><code>myarray=[]
  arrayofones=[]
  rowcount=3
  elements_per_row=[2,3,5]
  for i in range (0,rowcount):
      elements=elements_per_row[i]
  
      #generating meaningful values
      temparray=np.random.randn(elements)
      myarray.append(temparray)
  
      # generating ones
      temparray=np.ones(elements)
      arrayofones.append(temparray)
  </code></pre>
  
  <p>But, what will be a better approach if <code>myarray</code> is given as an input, and I still need to get list of arrays of ones?</p>