nanshe/advanced_image_processing.py: Removed itertools product for equivalent solution using NumPy.