I have a list of dictionaries with identical keys, where the values of each dictionary are NumPy arrays of the same size.
Here's the example
a = {"a": np.array([1,2]),"b": np.array([2,4]),}
b = {"a": np.array([5,7]),"b": np.array([12,34]),}
c = [a,b]
I would like to sum the values(Numpy arrays) for the same keys across all of the dictionaries.
I have tried Counter form collections but it only seems to work for scalar values. I tried to do it with two loops but got confused. I probably can do it with three loops but is there another more elegant way?
Thanks