class_docstr: Accumulate query results from a sliced dataset. The final result will
  be in self.D, self.I.
docstr: Add results for all heaps
  D, I should be of size (nh, nres)
  D, I do not need to be in a particular order (heap or sorted)
docstr_tok: ["Add","results","for","all","heaps","D",",","I","should","be","of","size","(","nh",",","nres",")","D",",","I","do","not","need","to","be","in","a","particular","order","(","heap","or","sorted",")"]
code: def add_result(self, D, I):
      """
      Add results for all heaps
      D, I should be of size (nh, nres)
      D, I do not need to be in a particular order (heap or sorted)
      """
      nq, kd = D.shape
      D = np.ascontiguousarray(D, dtype="float32")
      I = np.ascontiguousarray(I, dtype="int64")
      assert I.shape == (nq, kd)
      assert nq == self.nq
      self.heaps.addn_with_ids(kd, swig_ptr(D), swig_ptr(I), kd)
  
imports: import numpy
  from faiss.loader import *
  import faiss
  import collections.abc
label_desc: Use image node_id 2 for calling the ResultHeap obj's underlying member method code with example usage: obj.add_result(D, I) without return types