title: Numpy Operation
body: <p>I am trying to figure out how to divide each value in numpy array with the total number of values. And
  write the result to a new array. I tried a for loop but got all zeros in the new array.
  Maybe array needs to be flattened. Any suggestions?
  Thanks for your help.</p>
  <pre><code>tf = np.array([[1,0,2],[0,2,0]])
  
  array([[1, 0, 2],
         [0, 2, 0]])
  </code></pre>
  <p>Here is the output I want</p>
  <pre><code>array([[0.333, 0.   , 0.667],
         [0.   , 0.667, 0.   ]])
  </code></pre>