NumpySerializer | R Documentation |
Serialize data of various formats to a numpy npy file format. This serializer class uses python numpy package to serialize, R objects through the use of the 'reticulate' package.
sagemaker.mlcore::BaseSerializer
-> sagemaker.mlcore::SimpleBaseSerializer
-> NumpySerializer
dtype
The dtype of the data
np
Initialized python numpy package
new()
Initialize a NumpySerializer
instance.
NumpySerializer$new(dtype = NULL, content_type = "application/x-npy")
dtype
(str): The 'dtype' of the data. 'reticulate' auto maps to python, please set R class to be serialized.
content_type
(str): The MIME type to signal to the inference endpoint when sending request data (default: "application/x-npy").
serialize()
Serialize data to a buffer using the .npy format.
NumpySerializer$serialize(data)
data
(object): Data to be serialized. Can be a NumPy array, list, file, or buffer.
(raw): A buffer containing data serialized in the .npy format.
clone()
The objects of this class are cloneable with this method.
NumpySerializer$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other serializer:
BaseDeserializer
,
BaseSerializer
,
BytesDeserializer
,
CSVDeserializer
,
CSVSerializer
,
DataTableDeserializer
,
IdentitySerializer
,
JSONDeserializer
,
JSONLinesDeserializer
,
JSONLinesSerializer
,
JSONSerializer
,
LibSVMSerializer
,
NumpyDeserializer
,
SimpleBaseDeserializer
,
SimpleBaseSerializer
,
SparseMatrixSerializer
,
StringDeserializer
,
TibbleDeserializer
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.