Expand BaseVectors

These methods are needed in various places for training and vector
similarity.
This commit is contained in:
Adriane Boyd 2023-04-04 10:54:07 +02:00
parent 3f243342bf
commit 030a7001a2

View File

@ -52,16 +52,36 @@ cdef class BaseVectors:
def __getitem__(self, key):
raise NotImplementedError
def __contains__(self, key):
raise NotImplementedError
def is_full(self):
raise NotImplementedError
def get_batch(self, keys):
raise NotImplementedError
@property
def shape(self):
raise NotImplementedError
def __len__(self):
raise NotImplementedError
@property
def vectors_length(self):
raise NotImplementedError
@property
def size(self):
raise NotImplementedError
def add(self, key, *, vector=None):
raise NotImplementedError
def to_ops(self, ops: Ops):
raise NotImplementedError
# add dummy methods for to_bytes, from_bytes, to_disk and from_disk to
# allow serialization
def to_bytes(self, **kwargs):