You can convert all nan values to zeros using np.nan_to_num() and then
proceed further. Demo:
>>> data
array([[ 5.1, 3.5, 1.4, 0.2],
[ 4.9, 3. , nan, 0.2],
[ 4.7, 3.2, 1.3, nan],
[ nan, 3.1, 1.5, 0.2]])
>>> np.cov(data.T)
array([[ nan, nan, nan, nan],
[ nan, 0.04666667, nan, nan],

Assuming that the block of columns are based on the first two
characters, i.e. A1, A2, we can split this into different blocks by
using substr to extract the first two characters from the column names
and use this as index to split. Then, we can either use apply with
range and diff to get the result or use pmax and pmin.
indx < substr(colnames(df), 1,2)
If the grouping is not based on t

Luckily for you, this inverse is symmetric. Unluckily for you you
can't compare floating points this way:
>>> import numpy as np
>>>
>>> n = 1000
>>> a =np.random.rand(n, n)
>>> a_symm = (a+a.T)/2
>>>
>>> a_symm_inv = np.linalg.inv(a_symm)
>>> a_symm_inv_T = a_symm_inv.T
>>> print a_symm_inv[2,1]
0.0505944152801
&g
