1515from __future__ import absolute_import
1616
1717import json
18- from typing import Iterable # noqa ignore=F401 imported but unused
1918
2019import numpy as np
2120from six import BytesIO , StringIO
2221
2322from sagemaker_inference import content_types , errors
2423
2524
26- def _array_to_json (array_like ): # type: (np.array or Iterable or int or float) -> str
25+ def _array_to_json (array_like ):
2726 """Convert an array-like object to JSON.
2827
2928 To understand better what an array-like object is see:
@@ -45,7 +44,7 @@ def default(_array_like):
4544 return json .dumps (array_like , default = default )
4645
4746
48- def _array_to_npy (array_like ): # type: (np.array or Iterable or int or float) -> object
47+ def _array_to_npy (array_like ):
4948 """Convert an array-like object to the NPY format.
5049
5150 To understand better what an array-like object is see:
@@ -63,7 +62,7 @@ def _array_to_npy(array_like): # type: (np.array or Iterable or int or float) -
6362 return buffer .getvalue ()
6463
6564
66- def _array_to_csv (array_like ): # type: (np.array or Iterable or int or float) -> str
65+ def _array_to_csv (array_like ):
6766 """Convert an array-like object to CSV.
6867
6968 To understand better what an array-like object is see:
@@ -89,7 +88,6 @@ def _array_to_csv(array_like): # type: (np.array or Iterable or int or float) -
8988
9089
9190def encode (array_like , content_type ):
92- # type: (np.array or Iterable or int or float, str) -> np.array
9391 """Encode an array-like object in a specific content_type to a numpy array.
9492
9593 To understand better what an array-like object is see:
0 commit comments