docstr: Test in case of nprobe > nlist.
docstr_tok: ["Test","in","case","of","nprobe",">","nlist","."]
code: def test_ivf_nprobe(self):
      """Test in case of nprobe > nlist."""
      d = self.xq.shape[1] * 8
      xt, xb, xq = self.xt, self.xb, self.xq
  
      # nlist = 10
      index = faiss.index_binary_factory(d, "BIVF10")
  
      # When nprobe >= nlist, it is equivalent to an IndexFlat.
  
      index.train(xt)
      index.add(xb)
      index.nprobe = 2048
      k = 5
  
      # test kNN search
      D, I = index.search(xq, k)
  
      ref_index = faiss.index_binary_factory(d, "BFlat")
      ref_index.add(xb)
      ref_D, ref_I = ref_index.search(xq, k)
  
      print(D[0], ref_D[0])
      print(I[0], ref_I[0])
      assert np.all(D == ref_D)
      # assert np.all(I == ref_I)  # id may be different
  
      # test range search
      thresh = 5  # *squared* distance
      lims, D, I = index.range_search(xq, thresh)
      ref_lims, ref_D, ref_I = ref_index.range_search(xq, thresh)
      assert np.all(lims == ref_lims)
      assert np.all(D == ref_D)
  
imports: import os
  import numpy
  import unittest
  import faiss
  from common_faiss_tests import compare_binary_result_lists, make_binary_dataset
label_desc: Use image node_id 7 for calling the TestBinaryIVF obj's underlying member method code with example usage: obj.test_ivf_nprobe() without return types