PERF: Reduce overhead of np.linalg.norm for small arrays (#21394)
PERF: Reduce overhead of np.linalg.norm for small arrays (#21394)

Reduce the overhead of np.linalg.norm by replacing dot(x,x) with x.dot(x).
This is OK, since `x` is converted to a base-class array here.
numpy/numpy,mhvk/numpy,seberg/numpy,seberg/numpy,mattip/numpy,jakirkham/numpy,pdebuyl/numpy,seberg/numpy,endolith/numpy,pdebuyl/numpy,mhvk/numpy,mattip/numpy,mhvk/numpy,rgommers/numpy,numpy/numpy,jakirkham/numpy,anntzer/numpy,mhvk/numpy,mattip/numpy,charris/numpy,numpy/numpy,jakirkham/numpy,jakirkham/numpy,charris/numpy,anntzer/numpy,rgommers/numpy,rgommers/numpy,endolith/numpy,mattip/numpy,pdebuyl/numpy,endolith/numpy,rgommers/numpy,charris/numpy,charris/numpy,anntzer/numpy,pdebuyl/numpy,seberg/numpy,mhvk/numpy,endolith/numpy,numpy/numpy,anntzer/numpy,jakirkham/numpy