docarray.score package#
Subpackages#
Submodules#
Module contents#
- class docarray.score.NamedScore(_obj=None, copy=False, field_resolver=None, unknown_fields_handler='catch', **kwargs)[source]#
Bases:
AllMixins
,BaseDCType
- clear()#
Clear all fields from this
Document
to their default values.- Return type:
None
- copy_from(other)#
Overwrite self by copying from another
Document
.- Parameters:
other (T) – the other Document to copy from
- Return type:
None
- property description: Optional[str]#
- Return type:
Optional
[str
]
- property nbytes: int#
Return total bytes consumed by protobuf.
- Return type:
int
- Returns:
number of bytes
- property non_empty_fields: Tuple[str]#
Get all non-emtpy fields of this
Document
.Non-empty fields are the fields with not-None and not-default values.
- Return type:
Tuple
[str
]- Returns:
field names in a tuple.
- property op_name: Optional[str]#
- Return type:
Optional
[str
]
- pop(*fields)#
Clear some fields from this
Document
to their default values.- Parameters:
fields – field names to clear.
- Return type:
None
- property ref_id: Optional[str]#
- Return type:
Optional
[str
]
- to_dict()#
- property value: Optional[float]#
- Return type:
Optional
[float
]