Files
faiss/tests/test_binary_factory.py
T
Lucas Hosseini 6880286ea0 Facebook sync (#504)
* Facebook sync

* Update swig wrappers.

* Fix comment.
2018-07-06 14:12:11 +02:00

24 lines
558 B
Python

# Copyright (c) 2015-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD+Patents license found in the
# LICENSE file in the root directory of this source tree.
#! /usr/bin/env python2
import unittest
import faiss
class TestBinaryFactory(unittest.TestCase):
def test_factory_1(self):
index = faiss.index_binary_factory(16, "BIVF10")
assert index.invlists is not None
def test_factory_2(self):
index = faiss.index_binary_factory(16, "BFlat")
assert index.code_size == 2