We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5968df3 commit 1592dc7Copy full SHA for 1592dc7
src/sagemaker/amazon/common.py
@@ -27,18 +27,18 @@
27
28
29
class RecordSerializer(BaseSerializer):
30
- """Serialize array-like data for an inference request."""
+ """Serialize a NumPy array for an inference request."""
31
32
CONTENT_TYPE = "application/x-recordio-protobuf"
33
34
def serialize(self, data):
35
- """Serialize array-like data into a buffer containing RecordIO records.
+ """Serialize a NumPy array into a buffer containing RecordIO records.
36
37
Args:
38
data (numpy.ndarray): The data to serialize.
39
40
Returns:
41
- _io.BytesIO: A buffer containing the data serialized as records.
+ io.BytesIO: A buffer containing the data serialized as records.
42
"""
43
if len(data.shape) == 1:
44
data = data.reshape(1, data.shape[0])
0 commit comments