I have a 3D numpy array (matrix) of shape (130992,15,18) and a dictionary (dict) where a given value in a dictionary corresponds to a given