how to take mean of the column of tuple
<p>I have a tuple which I convert to numpay array </p>

<pre><code>dt=np.dtype('float,float') 
ar=np.array(val,dtype=dt)
</code></pre>

<p>Like this</p>

<pre><code>ar=[(0.08181818181818182, 0.394023569023569) (0.0, 0.0)
 (0.16785714285714287, 0.3227678571428571)]
</code></pre>

<p>I want to take columns mean of this array ( 0.08+0+0.16)</p>

<p>tried this code</p>

<pre><code>np.mean(ar, axis=0)
</code></pre>

<p>but its giving this error</p>

<pre><code> print np.mean(ar, axis=0)
  File "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", line 2878, in mean
    out=out, keepdims=keepdims)
  File "/usr/local/lib/python2.7/dist-packages/numpy/core/_methods.py", line 65, in _mean
    ret = umr_sum(arr, axis, dtype, out, keepdims)
TypeError: cannot perform reduce with flexible type
</code></pre>