We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58bf4a1 commit 52e189cCopy full SHA for 52e189c
src/sagemaker/serializers.py
@@ -68,12 +68,12 @@ def serialize(self, data):
68
io.BytesIO: A buffer containing data serialzied in the .npy format.
69
"""
70
if isinstance(data, np.ndarray):
71
- if not data.size > 0:
+ if data.size == 0:
72
raise ValueError("Cannot serialize empty array.")
73
return self._serialize_array(data)
74
75
if isinstance(data, list):
76
- if not len(data) > 0:
+ if len(data) == 0:
77
78
return self._serialize_array(np.array(data, self.dtype))
79
0 commit comments