np.isscalar() returns True for all scalars, including those that are not of type float. A better alternative is to use isinstance() to verify that zoom_range is either a float or a list/tuple of floats.
Related Issues
N/A
PR Overview
[n] This PR requires new unit tests [y/n] (make sure tests are included)
[n] This PR requires to update the documentation [y/n] (make sure the docs are up-to-date)
[y] This PR is backwards compatible [y/n]
[n] This PR changes the current API [y/n] (all API changes need to be approved by fchollet)
Summary
np.isscalar()
returnsTrue
for all scalars, including those that are not of typefloat
. A better alternative is to useisinstance()
to verify thatzoom_range
is either a float or a list/tuple of floats.Related Issues
N/A
PR Overview