Skip to content

Commit

Permalink
Explicit reshape
Browse files Browse the repository at this point in the history
  • Loading branch information
lhnwrk committed May 15, 2024
1 parent f5f6202 commit 1f61f17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mlserver/codecs/pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def _to_series(input_or_output: InputOrOutput) -> pd.Series:
return pd.Series(payload)

if isinstance(payload, np.ndarray):
payload = payload.reshape(-1, 1).squeeze(axis=1)
payload = payload.reshape(input_or_output.shape[0], 1).squeeze(axis=1)

dtype = to_dtype(input_or_output)
return pd.Series(payload, dtype=dtype)
Expand Down

0 comments on commit 1f61f17

Please sign in to comment.