title: replace elements in array using based on index list comprehension
body: <p>I would like to replace elements at specific positions in an array baes on the index. Is there a more efficient way than using for loops, e.g. list comprehension?
  Here is some exemplary code:</p>
  <pre><code>n=10
  te=15
  SampleData=np.random.rand(te,n)
  percentiles = np.linspace(0,100,n)
  
  SDist=np.zeros((te,n))
  # the fllowing is what I would like to change:
  for i in range(n):
      for t in range(te):
        SDist[t,i]=np.percentile(SampleData[t,:],percentiles[i])
  </code></pre>
  <p>Thanks in advance!</p>