class_docstr: Use a precomputed distance matrix to construct the KNNG.
  
  Parameters
  ----------
  distance_matrix: np.ndarray
      A square, symmetric, and contain only poistive values.
class_docstr_tok: ["Use","a","precomputed","distance","matrix","to","construct","the","KNNG",".","Parameters","--","--","--","--","--","distance_matrix",":","np.ndarray","A","square",",","symmetric",",","and","contain","only","poistive","values","."]
docstr: Use a precomputed distance matrix to determine the KNNG for the
  transformed samples.
  
  Parameters
  ----------
  query: array_like
      An M x N distance matrix where M is the number of query points and
      N is the number of samples in the existing embedding.
  k: int
  
  Returns
  -------
  indices: np.ndarray
  distances: np.ndarray
docstr_tok: ["Use","a","precomputed","distance","matrix","to","determine","the","KNNG","for","the","transformed","samples",".","Parameters","--","--","--","--","--","query",":","array_like","An","M","x","N","distance","matrix","where","M","is","the","number","of","query","points","and","N","is","the","number","of","samples","in","the","existing","embedding",".","k",":","int","Returns","--","--","--","-","indices",":","np.ndarray","distances",":","np.ndarray"]
code: def query(self, query, k):
      """Use a precomputed distance matrix to determine the KNNG for the
      transformed samples.
  
      Parameters
      ----------
      query: array_like
          An M x N distance matrix where M is the number of query points and
          N is the number of samples in the existing embedding.
      k: int
  
      Returns
      -------
      indices: np.ndarray
      distances: np.ndarray
  
      """
      indices = np.argsort(query, axis=1)[:, :k]
      distances = np.take_along_axis(query, indices, axis=1)
      return indices, distances
  
imports: import logging
  import os
  import warnings
  import numpy
  from scipy.spatial.distance import cdist
  from sklearn import neighbors
  from sklearn.utils import check_random_state
  from openTSNE import utils
label_desc: Use image node_id 3 for calling the PrecomputedDistanceMatrix obj's underlying member method code with example usage: obj.query(query, k) and returns: indices,  distances