ENH: making code more readable by creating function which is called in inner loop
ENH: making code more readable by creating function which is called in inner loop

jwiggins/keyenst,ilanschnell/ironpkg,jwiggins/keyenst,ilanschnell/ironpkg