MAINT: Use a contextmanager to ensure loadtxt closes the input file.
MAINT: Use a contextmanager to ensure loadtxt closes the input file.

This seems easier to track that a giant try... finally.

Also move the `fencoding` initialization to within the contextmanager,
in the rather unlikely case an exception occurs during the call to
`getpreferredencoding`.

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