Skip to content

deserialize.dtype_from_proto

Full path: schola.core.protocols.protobuf.deserialize.dtype_from_proto

schola.core.protocols.protobuf.deserialize.dtype_from_proto

dtype_from_proto

dtype_from_proto(msg)

Convert a protobuf DType message to a NumPy dtype.

Parameters

msg (proto_dtype.DType) : The protobuf DType message to convert.

Returns

The corresponding NumPy data type.

Return type: np.dtype

Raises

  • KeyError - If the protobuf DType is not recognized.