towhee.dataframe.array.array.Array¶
- class towhee.dataframe.array.array.Array(data=None, name: Optional[str] = None)[source]¶
Bases:
object
One-dimensional array of data
- Parameters:
data (numpy.ndarray, list, dict or scalar) – Contains data to be stored in Array.
dtype (numpy.dtype, str, PIL.Image or towhee.DType, optional) – Data type of the Array. If not specified, it will be inferred from data.
name (str) – Name of the Array.
copy (bool, default False) – Copy the data contents to the Array.
Methods
Append a list-like items to the end of this Array.
clear
Release the unreferenced lower part of the Array up to the index but not including.
get_relative
Indicator whether Array is empty.
Append one item to the end of this Array.
set_name
Attributes
Data of the Array
Name of the Array'.
Total number of elements in the Array since creation.
- append(data)[source]¶
Append a list-like items to the end of this Array.
- Parameters:
data (list or Array) – The data to be appended.
- property data: List¶
Data of the Array
- gc(offset)[source]¶
Release the unreferenced lower part of the Array up to the index but not including.
- is_empty() bool [source]¶
Indicator whether Array is empty.
- Returns:
- (bool)
Return True if Array has no elements.
- property name: str¶
Name of the Array’.
- property size: int¶
Total number of elements in the Array since creation.