Skip to content

serialize.dtype_to_proto

Full path: schola.core.protocols.protobuf.serialize.dtype_to_proto

schola.core.protocols.protobuf.serialize.dtype_to_proto

dtype_to_proto

dtype_to_proto(dtype)

Convert a NumPy dtype to a protobuf DType message.

Parameters

dtype (np.dtype) : The NumPy data type to convert.

Returns

The corresponding protobuf DType message.

Return type: proto_dtype.DType

Raises

  • KeyError - If the NumPy dtype is not recognized or supported.