MAINT: improve efficiency of pad by avoiding use of apply_along_axis
MAINT: improve efficiency of pad by avoiding use of apply_along_axis

pad assumed that apply_along_axis was modifying the padded array in-place.
In this case, it is more efficient to avoid the overhead of creating an output buffer and just
directly iterate the inplace operations instead using transpose and nditer instead.

MAINT: use moveaxis in place of transpose to improve clarity

pbrod/numpy,charris/numpy,WarrenWeckesser/numpy,mhvk/numpy,mattip/numpy,simongibbons/numpy,rgommers/numpy,mhvk/numpy,pizzathief/numpy,pdebuyl/numpy,MSeifert04/numpy,grlee77/numpy,MSeifert04/numpy,jorisvandenbossche/numpy,jorisvandenbossche/numpy,abalkin/numpy,shoyer/numpy,WarrenWeckesser/numpy,ahaldane/numpy,madphysicist/numpy,madphysicist/numpy,ahaldane/numpy,pbrod/numpy,grlee77/numpy,pdebuyl/numpy,seberg/numpy,mattip/numpy,anntzer/numpy,charris/numpy,mhvk/numpy,anntzer/numpy,simongibbons/numpy,numpy/numpy,ahaldane/numpy,MSeifert04/numpy,rgommers/numpy,endolith/numpy,shoyer/numpy,jakirkham/numpy,WarrenWeckesser/numpy,anntzer/numpy,mattip/numpy,pbrod/numpy,endolith/numpy,jakirkham/numpy,MSeifert04/numpy,numpy/numpy,MSeifert04/numpy,rgommers/numpy,pizzathief/numpy,simongibbons/numpy,endolith/numpy,simongibbons/numpy,pizzathief/numpy,anntzer/numpy,jakirkham/numpy,endolith/numpy,pdebuyl/numpy,mhvk/numpy,WarrenWeckesser/numpy,pdebuyl/numpy,charris/numpy,madphysicist/numpy,jorisvandenbossche/numpy,pizzathief/numpy,jorisvandenbossche/numpy,rgommers/numpy,numpy/numpy,grlee77/numpy,mattip/numpy,WarrenWeckesser/numpy,shoyer/numpy,seberg/numpy,pbrod/numpy,shoyer/numpy,jorisvandenbossche/numpy,abalkin/numpy,jakirkham/numpy,mhvk/numpy,madphysicist/numpy,abalkin/numpy,pbrod/numpy,shoyer/numpy,charris/numpy,jakirkham/numpy,seberg/numpy,grlee77/numpy,simongibbons/numpy,ahaldane/numpy,ahaldane/numpy,madphysicist/numpy,numpy/numpy,pizzathief/numpy,grlee77/numpy,seberg/numpy