jina.types.arrays.mixins.empty module

class jina.types.arrays.mixins.empty.EmptyMixin[source]

Bases: object

Helper functions for building arrays with empty Document.

classmethod empty(size=0)[source]

Create a DocumentArray or DocumentArrayMemmap object with size empty Document objects.

Parameters

size (int) – the number of empty Documents in this container

Return type

~T

Returns

a DocumentArray or DocumentArrayMemmap object