Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
a574d84
fix: inherit from cls in da
samsja Nov 29, 2022
05b90e9
fix: move class atribute to top torch tensor
samsja Nov 29, 2022
df5fe28
feat: add stack and unstack mod
samsja Dec 1, 2022
915cbf5
feat: add blocker for stack mod
samsja Dec 1, 2022
fd7d8a7
feat: add blocker for stack mod
samsja Dec 1, 2022
95316af
fix: fix issue with dict iterationg
samsja Dec 1, 2022
70d6430
refactor: init column in stacked mode entry and not init
samsja Dec 2, 2022
b290040
fix: fix typo
samsja Dec 2, 2022
ac26cda
fix: fix typo
samsja Dec 2, 2022
f50c27b
feat: add column mode for tensor
samsja Dec 2, 2022
869c8ee
feat: add decorator
samsja Dec 2, 2022
7cfbb0e
feat: add setter
samsja Dec 2, 2022
58d53ae
fix: fix getter
samsja Dec 5, 2022
8ddf618
feat: add setter as property
samsja Dec 5, 2022
4ce3a4b
feat: add more test
samsja Dec 5, 2022
9c181f6
feat: add numpy to stack mod
samsja Dec 5, 2022
4f73b9e
feat: add stack classmethod
samsja Dec 5, 2022
9cec782
feat: embedding type (#877)
JohannesMessner Dec 1, 2022
3506501
refactor: halfway trough mypy not complaining
samsja Dec 5, 2022
f148857
refactor: almost the end of mypy
samsja Dec 5, 2022
e37608d
refactor: mypy good
samsja Dec 5, 2022
94b3b08
chore: add docstring for stack mode
samsja Dec 5, 2022
f3d91c7
chore: add docstring for document array
samsja Dec 5, 2022
64b856b
chore: add docstring
samsja Dec 5, 2022
4297ab2
fix: apply johannes suggestion
samsja Dec 5, 2022
52a5e69
fix: apply johannes suggestion
samsja Dec 5, 2022
3b91d61
fix: apply johannes suggestion
samsja Dec 5, 2022
6866bc6
fix: shorten docstring
samsja Dec 6, 2022
c801689
fix: apply johannes suggestion
samsja Dec 6, 2022
93e1892
refactor: apply johannes suggestion
samsja Dec 6, 2022
73d2fda
fix: apply johannes suggestion
samsja Dec 6, 2022
bcaad73
feat: add warning in list like funciton
samsja Dec 6, 2022
ce34689
fix: fix docstring column fields
samsja Dec 6, 2022
1f57835
feat: add warning in list like funciton
samsja Dec 6, 2022
a6abd5e
feat: apply jihannes suggestion
samsja Dec 6, 2022
834fada
feat: apply aleaddine suggestion
samsja Dec 6, 2022
bc76613
feat: apply jihannes suggestion
samsja Dec 6, 2022
17802b3
feat: apply jihannes suggestion
samsja Dec 6, 2022
052288f
feat: apply jihannes suggestion
samsja Dec 6, 2022
b0dd31d
fix: docstring for blocked method
samsja Dec 6, 2022
5fd7864
feat: add better docstring for context manager
samsja Dec 6, 2022
c1bfa6f
fix: mypy
samsja Dec 6, 2022
9a75e80
feat: apply alex suggestion
samsja Dec 6, 2022
d0d75c0
feat: apply alex suggestion
samsja Dec 6, 2022
e0fec6b
feat: apply alex suggestion
samsja Dec 6, 2022
0b3f538
fix: mypy
samsja Dec 6, 2022
228277d
fix: rebase
samsja Dec 6, 2022
6d07939
fix: rebase
samsja Dec 6, 2022
65ba015
refactor: fix problem
samsja Dec 6, 2022
baa7f53
feat: apply alex suggestion
samsja Dec 6, 2022
d7c0458
feat: apply alex suggestion
samsja Dec 6, 2022
0049d66
fix: apply black to suggestion
samsja Dec 6, 2022
1286876
fix: update docstring
samsja Dec 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions docarray/array/abstract_array.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
from abc import abstractmethod
from typing import Iterable, Type
from typing import TYPE_CHECKING, Dict, Iterable, List, Optional, Sequence, Type, Union

from docarray.document import BaseDocument

if TYPE_CHECKING:
from docarray.typing import NdArray, TorchTensor

class AbstractDocumentArray(Iterable):

class AbstractDocumentArray(Sequence):

document_type: Type[BaseDocument]
_columns: Optional[
Comment thread
samsja marked this conversation as resolved.
Dict[str, Union['TorchTensor', 'AbstractDocumentArray', 'NdArray', None]]
] # here columns are the holder of the data in tensor modes

@abstractmethod
def __init__(self, docs: Iterable[BaseDocument]):
Expand All @@ -17,3 +23,11 @@ def __class_getitem__(
cls, item: Type[BaseDocument]
) -> Type['AbstractDocumentArray']:
...

@abstractmethod
def is_stacked(self) -> bool:
...

@abstractmethod
def _column_fields(self) -> List[str]:
...
Loading