Skip to content

Commit 8ba1bd0

Browse files
author
Balaji Veeramani
committed
Update error message
1 parent d99c1e5 commit 8ba1bd0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/sagemaker/amazon/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ def serialize(self, data):
4444
data = data.reshape(1, data.shape[0])
4545

4646
if len(data.shape) != 2:
47-
raise ValueError("Expected a one or two dimensional array.")
47+
raise ValueError(
48+
"Expected a 1D or 2D array, but got a %dD array instead." % len(data.shape)
49+
)
4850

4951
buffer = io.BytesIO()
5052
write_numpy_to_dense_tensor(buffer, data)

0 commit comments

Comments
 (0)