SArrayBuilder(dtype, num_segments=1, history_size=10)¶
An interface to incrementally build an SArray element by element.
Once closed, the SArray cannot be “reopened” using this interface.
- dtype : type
The type of the elements in the SArray.
- num_segments : int, optional
Number of segments that can be written in parallel.
- history_size : int, optional
The number of elements to be cached as history. Caches the last history_size elements added with append or append_multiple.
- out : SArrayBuilder
>>> from turicreate import SArrayBuilder
>>> sb = SArrayBuilder(int)
>>> sb.close() dtype: int Rows: 3 [1, 2, 3]
||Append a single element to an SArray.|
||Append multiple elements to an SArray.|
||Creates an SArray from all values that were appended to the SArrayBuilder.|
||The type the result SArray will be if close is called.|
||Outputs the last num elements that were appended either by append or append_multiple.|