Extract Patches From Image Python