code: def eps_nn(X, eps=1.0):
      """Returns the eps-nearest-neighbours graph of the data
  
      Parameters
      ----------
      X, array of shape (n_samples, n_features), input data
      eps, float, optional: the neighborhood width
  
      Returns
      -------
      the resulting graph instance
      """
      from ..utils.fast_distance import euclidean_distance
  
      if np.size(X) == X.shape[0]:
          X = np.reshape(X, (np.size(X), 1))
      try:
          eps = float(eps)
      except:
          "eps cannot be cast to a float"
      if np.isnan(eps):
          raise ValueError("eps is nan")
      if np.isinf(eps):
          raise ValueError("eps is inf")
      dist = euclidean_distance(X)
      dist = np.maximum(dist, 1.0e-16)
      dist[dist >= eps] = 0
  
      # this would is just for numerical reasons
      dist -= np.diag(np.diag(dist))
      return wgraph_from_adjacency(dist)
  
imports: import numpy
  from scipy.sparse import coo_matrix
label_desc: Use image node_id 6 for calling a global function with example usage: eps_nn(X, eps) and returns: wgraph_from_adjacency