code: def lookup(self, *coordinate_arrays):
          
          assert len(coordinate_arrays) == self.dimensions
          # Convert each coordinate array to an index array
          index_arrays = [np.clip(np.searchsorted(self.bin_edges[i], coordinate_arrays[i]) - 1,
                                  0,
                                  len(self.bin_edges[i]) - 2)
                          for i in range(self.dimensions)]
          # Use the index arrays to slice the histogram
          return self.histogram[index_arrays]
docs: Lookup values at specific points.
          coordinate_arrays: numpy arrays of coordinates, one for each dimension
          e.g. lookup(np.array([0, 2]), np.array([1, 3])) looks up (x=0, y=1) and (x=2, y3).
  
          Clips if out of range!! TODO: option to throw exception instead.
          TODO: Needs tests!!
          TODO: port to Hist1d... or finally join the classes
          TODO: Support for scalar arguments