PEP8 Use 2 lines between functions.
ENH Move allocation of ind outside the for-loop.