title: Calculate matrix column mean
body: <p>I've got this matrix:</p>
  
  <pre><code>      [[[ 0.49757494  0.50242506]
        [ 0.50340754  0.49659246]
        [ 0.50785456  0.49214544]
           ..., 
        [ 0.50817149  0.49182851]
        [ 0.50658656  0.49341344]
        [ 0.49419885  0.50580115]]
  
        [[ 0.117       0.883     ]
        [ 0.604       0.396     ]
        [ 1.          0.        ]
           ..., 
        [ 0.98559675  0.01440325]
        [ 0.948       0.052     ]
        [ 0.012       0.988     ]]
  
        [[ 0.21099179  0.78900821]
        [ 0.75212493  0.24787507]
        [ 0.96653919  0.03346081]
             ..., 
        [ 0.97485074  0.02514926]
        [ 0.95051503  0.04948497]
        [ 0.05409603  0.94590397]]]
  </code></pre>
  
  <p>If the weights are w1,w2,w3, how can I calculate the mean of first column and second column for each matrix (3 by 2) ? So I can get like:</p>
  
  <pre><code>      [[[(X1        Y1]
          ...,
        [X2           Y2]
        [[X3          Y3]
          ...,
  </code></pre>
  
  <p>Thanks in advance.</p>
  
  <p>EDIT: input shape is  (3, 37375, 2), and I would like to have instead of a (3,2), a (1,2). I would like to get the mean for each column, example:</p>
  
  <pre><code>   (0.497*w1 + 0.503*w2 + 0.507*w3)/ (w1 + w2 + w3)     &lt;--- First column
  </code></pre>