exa.common.api.proto_serialization.datum.unpack

Contents

exa.common.api.proto_serialization.datum.unpack#

unpack(source)#

Unpacks a protobuf into a native Python type or a numpy array. Reverse operation of pack().

Parameters:

source (iqm.data_definitions.common.v1.data_types_pb2.Datum) – A protobuf instance that encapsulates some data.

Returns:

Unpacked data.

Raises:

TypeError or google.protobuf.message.DecodeError in case of invalid buffer

Return type:

None | str | bool | int | float | complex | ndarray | list