Assuming that the output should be in the form (1,n) , i.e. a scalar for each covariance operation for each column A with B and therefore for columns n ending with n such scalars, you can use two approaches that use the covariance formula .
Approach No. 1: with broadcast
np.sum((A - A.mean(0))*(B - B.mean(0)),0)/B.size
Approach No. 2: with matrix multiplication
np.dot((B - B.mean(0)).T,(A - A.mean(0)))/B.size
source share