Skip to content
Merged
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion docarray/array/array_stacked.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def _from_columns(
da_stacked._docs = docs
return da_stacked

def to(self: T, device: str):
def to(self: T, device: str) -> T:
"""Move all tensors of this DocumentArrayStacked to the given device

:param device: the device to move the data to
Expand All @@ -106,6 +106,7 @@ def to(self: T, device: str):
else: # recursive call
col_docarray = cast(T, col)
col_docarray.to(device)
return self

@classmethod
def _get_columns_schema(
Expand Down