Skip to content

Commit

Permalink
fix: sample shouldn't be a memoryview
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
  • Loading branch information
aarnphm committed Oct 26, 2022
1 parent ee88749 commit ce5f242
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bentoml/_internal/io_descriptors/numpy.py
Expand Up @@ -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 {
Expand Down

0 comments on commit ce5f242

Please sign in to comment.