docarray.array.mixins.content module#
- class docarray.array.mixins.content.ContentPropertyMixin[source]#
Bases:
objectHelpers that provide faster getter & setter for
contentby using protobuf directly.- property embeddings: Optional[ArrayType]#
Return a
ArrayTypestacking all the embedding attributes as rows.- Return type:
Optional[ArrayType]- Returns:
a
ArrayTypeof embedding
- property tensors: Optional[ArrayType]#
Return a
ArrayTypestacking alltensor.The tensor attributes are stacked together along a newly created first dimension (as if you would stack using
np.stack(X, axis=0)).Warning
This operation assumes all tensors have the same shape and dtype. All dtype and shape values are assumed to be equal to the values of the first element in the DocumentArray
- Return type:
Optional[ArrayType]- Returns:
a
ArrayTypeof tensors
- property texts: Optional[List[str]]#
Get
textof all Documents- Return type:
Optional[List[str]]- Returns:
a list of texts
- property blobs: Optional[List[bytes]]#
Get the blob attribute of all Documents.
- Return type:
Optional[List[bytes]]- Returns:
a list of blobs