mirror of
https://github.com/wassname/IndicoIo-python.git
synced 2026-07-21 12:20:44 +08:00
Added api error handeling and updated docs
This commit is contained in:
@@ -93,6 +93,8 @@ def image_preprocess(image):
|
||||
"""
|
||||
if isinstance(image,list):
|
||||
image = np.asarray(image)
|
||||
if type(image).__module__ != np.__name__:
|
||||
raise ValueError('Image was not of type numpy.ndarray or list.')
|
||||
if image.max() > 1:
|
||||
image = image/255.
|
||||
if len(image.shape) == 2:
|
||||
|
||||
Reference in New Issue
Block a user