MAINT: Removing ndimage dependency to math module
MAINT: Removing ndimage dependency to math module

- Replace calls to sin and cos from math by theire equivalent in numpy.
- Rename matrix variable to rot_matrix.
- Remove the mtrx variable that is equal to matrix.

See #10011

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