title: Dividing elements of array Python
body: <p>Hello I'm a beginner programmer and I know there must be a simple way to do this but for some reason can't find the answer. I have two arrays and just want to divide each element by the elements in the other array. for example</p>
  
  <pre><code>a= np.array([2,4,6,8,10,12])
  b=np.array([2,1,2,1,2,1])
  so that the result is (1,4,3,8,5,12)....
  </code></pre>
  
  <p>I tried doing this over a for loop :</p>
  
  <pre><code>for i in range(a):
      c = a[i]/b[i]
  </code></pre>
  
  <p>but it doesnt work and gives the error 
  "TypeError: only integer arrays with one element can be converted to an index"</p>