title: How can I partially fill a numpy array with a value given a range?
body: <p>Given a numpy array, a range, and a value, how can I fill the array with the value inside the range?</p>
  
  <p>Is there a way that is faster than filling it in manually with a loop one by one?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p><code>myArray = np.zeros(10)</code></p>
  
  <p>What I want:
  [0, 0, 0, 0, 1, 1, 1, 0, 0, 0]</p>