class_docstr: Accumulate query results from a sliced dataset. The final result will
  be in self.D, self.I.
docstr: Add results for a subset of heaps.
  D, I should hold resutls for all the subset
  as a special case, if I is 1D, then all ids are assumed to be the same
docstr_tok: ["Add","results","for","a","subset","of","heaps",".","D",",","I","should","hold","resutls","for","all","the","subset","as","a","special","case",",","if","I","is","1D",",","then","all","ids","are","assumed","to","be","the","same"]
code: def add_result_subset(self, subset, D, I):
      """
      Add results for a subset of heaps.
      D, I should hold resutls for all the subset
      as a special case, if I is 1D, then all ids are assumed to be the same
      """
      nsubset, kd = D.shape
      assert nsubset == len(subset)
      assert (
          I.ndim == 2
          and D.shape == I.shape
          or I.ndim == 1
          and I.shape == (kd,)
      )
      D = np.ascontiguousarray(D, dtype="float32")
      I = np.ascontiguousarray(I, dtype="int64")
      subset = np.ascontiguousarray(subset, dtype="int64")
      id_stride = 0 if I.ndim == 1 else kd
      self.heaps.addn_query_subset_with_ids(
          nsubset,
          swig_ptr(subset),
          kd,
          swig_ptr(D),
          swig_ptr(I),
          id_stride,
      )
  
imports: import numpy
  from faiss.loader import *
  import faiss
  import collections.abc
label_desc: Use image node_id 3 for calling the ResultHeap obj's underlying member method code with example usage: obj.add_result_subset(subset, D, I) without return types