docstr: If the data is not zero-centering, it would be more accurate to
  use double-precision floating-point numbers.
docstr_tok: ["If","the","data","is","not","zero-centering",",","it","would","be","more","accurate","to","use","double-precision","floating-point","numbers","."]
code: def test_update_codebooks_with_double(self):
      """If the data is not zero-centering, it would be more accurate to
      use double-precision floating-point numbers."""
      ds = datasets.SyntheticDataset(16, 1000, 1000, 0)
  
      xt = ds.get_train() + 1000
      xb = ds.get_database() + 1000
  
      M = 4
      nbits = 4
  
      lsq = faiss.LocalSearchQuantizer(ds.d, M, nbits)
      lsq.train(xt)
      err_double = eval_codec(lsq, xb)
  
      lsq = faiss.LocalSearchQuantizer(ds.d, M, nbits)
      lsq.update_codebooks_with_double = False
      lsq.train(xt)
      err_float = eval_codec(lsq, xb)
  
      # 6533.377 vs 25457.99
      print(err_double, err_float)
      self.assertLess(err_double, err_float)
  
imports: import numpy
  import faiss
  import unittest
  from faiss.contrib import datasets
label_desc: Use image node_id 3 for calling the TestComponents obj's underlying member method code with example usage: obj.test_update_codebooks_with_double() without return types