Move some imports out of functions to the top of the file
Move some imports out of functions to the top of the file

Some of the imports in the array API module have to be inside functions to
avoid circular imports, but these ones did not.

pdebuyl/numpy,mhvk/numpy,jakirkham/numpy,simongibbons/numpy,jakirkham/numpy,mhvk/numpy,mhvk/numpy,pdebuyl/numpy,anntzer/numpy,simongibbons/numpy,mattip/numpy,numpy/numpy,endolith/numpy,seberg/numpy,jakirkham/numpy,endolith/numpy,numpy/numpy,jakirkham/numpy,mhvk/numpy,numpy/numpy,mattip/numpy,anntzer/numpy,mattip/numpy,charris/numpy,seberg/numpy,seberg/numpy,anntzer/numpy,jakirkham/numpy,endolith/numpy,rgommers/numpy,charris/numpy,simongibbons/numpy,rgommers/numpy,charris/numpy,mhvk/numpy,anntzer/numpy,seberg/numpy,rgommers/numpy,simongibbons/numpy,endolith/numpy,simongibbons/numpy,mattip/numpy,rgommers/numpy,pdebuyl/numpy,pdebuyl/numpy,charris/numpy,numpy/numpy