title: How to divide an array by an other array element wise in numpy?
body: <p>I have two arrays, and I want all the elements of one to be divided by the second. For example,</p>
  
  <pre><code>In [24]: a = np.array([1,2,3])                                                      
  
  In [25]: b = np.array([1,2,3])                                                      
  
  In [26]: a/b                                                                        
  Out[26]: array([1., 1., 1.])
  
  In [27]: 1/b                                                                        
  Out[27]: array([1.        , 0.5       , 0.33333333])
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/8nzbV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8nzbV.png" alt="enter image description here"></a></p>
  
  <p>This is not the answer I want, the output I want is like (we can see all of the elements of a are divided by b)</p>
  
  <pre><code>In [28]: c = []                                                                     
  
  In [29]: for i in a: 
      ...:     c.append(i/b) 
      ...:                                                                            
  
  In [30]: c                                                                          
  Out[30]: 
  [array([1.        , 0.5       , 0.33333333]),
   array([2.        , 1.        , 0.66666667]),
  In [34]: np.array(c)                                                                
  Out[34]: 
  array([[1.        , 0.5       , 0.33333333],
         [2.        , 1.        , 0.66666667],
         [3.        , 1.5       , 1.        ]])
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/riFr4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/riFr4.png" alt="enter image description here"></a></p>
  
  <p>But I don't like for loop, it's too slow for big data, so is there a function that included in numpy package or any good (faster) way to solve this problem?</p>