I have an empty 'numpy.ndarray'
import numpy as np
my_grid = np.zeros((5, 5))
parse = "max","min","avg"
I wish to create a dictionary where each element of parse is the "Key"
from collections import defaultdict
GridMetric = dict()
for arg in parse:
GridMetric[arg].append(my_grid)
but i get this error
Traceback (most recent call last):
File "<editor selection>", line 3, in <module>
KeyError: 'max'
parsehere.GridMetric = defaultdict(list).