docs: def nn_dims(self, x, y, dims_x, dims_y, k=1, radius=np.inf, eps=0.0, p=2):
          """Find the k nearest neighbors of a subset of dims of x and y in the observed output data
          @see Databag.nn() for argument description
          @return  distance and indexes of found nearest neighbors.
          """
          assert len(x) == len(dims_x)
          assert len(y) == len(dims_y)
          if len(dims_x) == 0:
              kdtree = scipy.spatial.cKDTree([np.array(data_y)[np.array(dims_y) - self.dim_x] for data_y in self.data[DATA_Y]])
          elif len(dims_y) == 0:
              kdtree = scipy.spatial.cKDTree([np.array(data_x)[dims_x] for data_x in self.data[DATA_X]])
          else:
              kdtree = scipy.spatial.cKDTree([np.hstack((np.array(data_x)[dims_x], np.array(data_y)[np.array(dims_y) - self.dim_x])) for data_x,data_y in zip(self.data[DATA_X], self.data[DATA_Y])])
          dists, idxes =  kdtree.query(np.hstack((x, y)), 
                                 k = k, 
                                 distance_upper_bound = radius,
                                 eps = eps, 
                                 p = p)
          if k == 1:
              dists, idxes = np.array([dists]), [idxes]
          return dists, idxes