GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — docarray/docarray/array/memory.py at docarray-v1-fixes · docarray/docarray
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
Expand file tree/ Copy pathmemory.pyMore file actions 35 lines (23 loc) · 1.06 KB / Copy pathmemory.pyFile metadata and controls35 lines (23 loc) · 1.06 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 from docarray.array.document import DocumentArray from docarray.array.storage.memory import StorageMixins class DocumentArrayInMemory(StorageMixins, DocumentArray): """ Default DocumentArray that stores Documents in memory. With this implementation, :meth:`match` and :meth:`find` perform exact (exhaustive) vector search. Example usage: .. code-block:: python from docarray import Document, DocumentArray da = DocumentArray( [Document(text='The cake is a lie'), Document(text='Do a barrel roll!')] ) da.apply(Document.embed_feature_hashing) query = Document(text='Can i have some cake?').embed_feature_hashing() query.match(da, metric='jaccard', use_scipy=True) print(query.matches[:, ('text', 'scores__jaccard__value')]) .. code-block:: bash [['The cake is a lie', 'Do a barrel roll!'], [0.9, 1.0]] .. seealso:: For further details, see our :ref:`user guide <documentarray>`. """ def __new__(cls, *args, **kwargs): return super().__new__(cls) |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |