diff --git a/src/bentoml/_internal/io_descriptors/numpy.py b/src/bentoml/_internal/io_descriptors/numpy.py index c9c63984298..bac076e4c4e 100644 --- a/src/bentoml/_internal/io_descriptors/numpy.py +++ b/src/bentoml/_internal/io_descriptors/numpy.py @@ -284,7 +284,7 @@ def openapi_example(self) -> t.Any: if isinstance(self.sample, np.generic): raise BadInput("NumpyNdarray: sample must be a numpy array.") from None # NOTE: we only need to - return self.sample.ravel().tolist() + return self.sample.tolist() def openapi_request_body(self) -> dict[str, t.Any]: return {