Closed jaketae closed 4 years ago
Need to wait for https://github.com/keras-team/keras-preprocessing/pull/284 to be merged before I merge this. May take some times. Sorry for the delay.
Need to wait for #284 to be merged before I merge this. May take some times. Sorry for the delay.
@Dref360 No problem, I appreciate the prompt feedback!
Seems like you have some pep8 errors to fix.
./keras_preprocessing/sequence.py:62:1: W293 blank line contains whitespace ./keras_preprocessing/sequence.py:65:1: W293 blank line contains whitespace ./keras_preprocessing/sequence.py:70:15: E111 indentation is not a multiple of four ./keras_preprocessing/sequence.py:71:15: E111 indentation is not a multiple of four ./keras_preprocessing/image/image_data_generator.py:327:39: W291 trailing whitespace
@Dref360 Thank you for the heads up. I've made some fixes to resolve the PEP8 issues based on your comments.
Summary
Robust dtype check
np.isscalar()
returnsTrue
for all scalars, not just floats or list/tuple of floats. Instead, useisinstance()
to check dtype ofzoom_range
.Dictionary code optimization Use
{}
for dictionaries instead ofdict()
for readability and better performance.Related Issues
N/A
PR Overview