Move ascontiguousarray higher.
Move ascontiguousarray higher.

This avoids some copies and triggered cython memoryview read-only
error. To fix that I had to add a few const modifiers here and there.

vigna/scipy,Eric89GXL/scipy,zerothi/scipy,gertingold/scipy,jamestwebber/scipy,matthew-brett/scipy,vigna/scipy,gertingold/scipy,person142/scipy,WarrenWeckesser/scipy,e-q/scipy,e-q/scipy,mdhaber/scipy,mdhaber/scipy,arokem/scipy,grlee77/scipy,WarrenWeckesser/scipy,vigna/scipy,arokem/scipy,aarchiba/scipy,perimosocordiae/scipy,person142/scipy,scipy/scipy,Stefan-Endres/scipy,perimosocordiae/scipy,jor-/scipy,e-q/scipy,jamestwebber/scipy,mdhaber/scipy,rgommers/scipy,mdhaber/scipy,vigna/scipy,zerothi/scipy,ilayn/scipy,jamestwebber/scipy,arokem/scipy,gertingold/scipy,person142/scipy,Stefan-Endres/scipy,nmayorov/scipy,ilayn/scipy,andyfaff/scipy,pizzathief/scipy,perimosocordiae/scipy,grlee77/scipy,scipy/scipy,Stefan-Endres/scipy,nmayorov/scipy,nmayorov/scipy,Eric89GXL/scipy,ilayn/scipy,lhilt/scipy,pizzathief/scipy,WarrenWeckesser/scipy,tylerjereddy/scipy,perimosocordiae/scipy,jor-/scipy,andyfaff/scipy,tylerjereddy/scipy,andyfaff/scipy,gertingold/scipy,Stefan-Endres/scipy,e-q/scipy,Stefan-Endres/scipy,anntzer/scipy,Eric89GXL/scipy,WarrenWeckesser/scipy,arokem/scipy,grlee77/scipy,Stefan-Endres/scipy,matthew-brett/scipy,rgommers/scipy,anntzer/scipy,grlee77/scipy,person142/scipy,lhilt/scipy,aeklant/scipy,aeklant/scipy,matthew-brett/scipy,vigna/scipy,aarchiba/scipy,zerothi/scipy,WarrenWeckesser/scipy,aarchiba/scipy,ilayn/scipy,aeklant/scipy,andyfaff/scipy,scipy/scipy,aeklant/scipy,zerothi/scipy,pizzathief/scipy,mdhaber/scipy,zerothi/scipy,pizzathief/scipy,tylerjereddy/scipy,WarrenWeckesser/scipy,ilayn/scipy,mdhaber/scipy,nmayorov/scipy,matthew-brett/scipy,rgommers/scipy,e-q/scipy,endolith/scipy,matthew-brett/scipy,endolith/scipy,rgommers/scipy,lhilt/scipy,aarchiba/scipy,endolith/scipy,endolith/scipy,grlee77/scipy,jor-/scipy,andyfaff/scipy,tylerjereddy/scipy,zerothi/scipy,anntzer/scipy,scipy/scipy,aeklant/scipy,arokem/scipy,endolith/scipy,ilayn/scipy,jor-/scipy,Eric89GXL/scipy,jor-/scipy,Eric89GXL/scipy,perimosocordiae/scipy,lhilt/scipy,person142/scipy,jamestwebber/scipy,scipy/scipy,anntzer/scipy,andyfaff/scipy,gertingold/scipy,lhilt/scipy,endolith/scipy,scipy/scipy,jamestwebber/scipy,Eric89GXL/scipy,aarchiba/scipy,anntzer/scipy,rgommers/scipy,tylerjereddy/scipy,perimosocordiae/scipy,nmayorov/scipy,pizzathief/scipy,anntzer/scipy