class_docstr: Accumulate query results from a sliced dataset. The final result will
  be in self.D, self.I.
docstr: nq: number of query vectors,
  k: number of results per query
  keep_max: keep the top-k maximum values instead of the minima
docstr_tok: ["nq",":","number","of","query","vectors",",","k",":","number","of","results","per","query","keep_max",":","keep","the","top-k","maximum","values","instead","of","the","minima"]
code: def __init__(self, nq, k, keep_max=False):
      """
      nq: number of query vectors,
      k: number of results per query
      keep_max: keep the top-k maximum values instead of the minima
      """
      self.I = np.zeros((nq, k), dtype="int64")
      self.D = np.zeros((nq, k), dtype="float32")
      self.nq, self.k = nq, k
      if keep_max:
          heaps = float_minheap_array_t()
      else:
          heaps = float_maxheap_array_t()
      heaps.k = k
      heaps.nh = nq
      heaps.val = swig_ptr(self.D)
      heaps.ids = swig_ptr(self.I)
      heaps.heapify()
      self.heaps = heaps
  
imports: import numpy
  from faiss.loader import *
  import faiss
  import collections.abc
label_desc: Use image node_id 1 to create a new ResultHeap object  with example: obj = ResultHeap(nq, k, keep_max)