Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Remove _scale_img function
Browse files Browse the repository at this point in the history
  • Loading branch information
rragundez committed Sep 24, 2019
1 parent 65cc538 commit 9a4260f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions keras_preprocessing/image/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,14 +282,6 @@ def array_to_img(x, data_format='channels_last', scale=True, dtype='float32'):
raise ValueError('Unsupported channel number: %s' % (x.shape[2],))


def _scale_img(x, lower_bound, upper_bound):
x = x + max(-np.min(x), 0)
x_max = np.max(x)
if x_max != 0:
x /= x_max
return x * (upper_bound - lower_bound) + lower_bound


def img_to_array(img, data_format='channels_last', dtype='float32'):
"""Converts a PIL Image instance to a Numpy array.
Expand Down

0 comments on commit 9a4260f

Please sign in to comment.