Array¶

class Array(dtype: str, shape: list[int], stype: str, data: bytes)[source]¶

Bases: object

Array type.

A dataclass containing serialized data from an array-like or tensor-like object along with some metadata about it.

Parameters:
  • dtype (str) – A string representing the data type of the serialised object (e.g. np.float32)

  • shape (List[int]) – A list representing the shape of the unserialized array-like object. This is used to deserialize the data (depending on the serialization method) or simply as a metadata field.

  • stype (str) – A string indicating the type of serialisation mechanism used to generate the bytes in data from an array-like or tensor-like object.

  • data (bytes) – A buffer of bytes containing the data.

Methods

numpy()

Return the array as a NumPy array.

Attributes

dtype

shape

stype

data

numpy() ndarray[Any, dtype[Any]][source]¶

Return the array as a NumPy array.