def locate(rods, locations):
    """Combines location information with pixel rods.

    Args:
        rods: Chip shaped numpy array of rods
        locations:  Chip shaped numpy array of locations

    Returns:
        dict: (location):rod for each location and rod in the arrays.

    Incoming locations as 3d array:

    >>> array([[[0,0], [0,1], [0,2]],
               [[1,0], [1,1], [1,2]],
               [[2,0], [2,1], [2,2]]])

    Incoming rods also as 3d array:

    >>> array([[[110,110,234,664], [23,887,110,111], [110,464,223,112]],
               [[111,887,1,110],   [33,111,12,111],  [0,111,66,112]],
               [[12,99,112,110],   [112,87,231,111], [112,45,47,112]]])

    locrods converts locations to:

    >>> locations.reshape(locations.shape[0] * locations.shape[1], -1)
    array([[0, 0],
           [0, 1],
           [0, 2],
           [1, 0],
           [1, 1],
           [1, 2],
           [2, 0],
           [2, 1],
           [2, 2]])

    And rods to:

    >>> rods.reshape(rods.shape[0] * rods.shape[1], -1)
    array([[110, 110, 234, 664],
           [23,  887, 110, 111],
           [110, 464, 223, 112],
           [111, 887, 1,   110],
           [33,  111, 12,  111],
           [0,   111, 66,  112],
           [12,  99,  112, 110],
           [112, 87,  231, 111],
           [112, 45,  47,  112]])

    Then the locations and rods are zipped together via a dictionary
    comprehension and returned.

    >>> {
         (0,0): [110, 110, 234, 664],
         (0,1): [23,  887, 110, 111],
         (0,2): [110, 464, 223, 112],
         (1,0): [111, 887, 1,   110],
         (1,1): [33,  111, 12,  111],
         (1,2): [0,   111, 66,  112],
         (2,0): [12,  99,  112, 110],
         (2,1): [112, 87,  231, 111],
         (2,2): [112, 45,  47,  112]
        }
    """

    flat_locs = locations.reshape(locations.shape[0] * locations.shape[1], -1)
    flat_rods = rods.reshape(rods.shape[0] * rods.shape[1], -1)
    return {tuple(k): v for k, v in zip(flat_locs, flat_rods)}