code: def _inner_default(x1, x2):
      
      # Ravel both in the same order
      order = 'F' if all(a.data.flags.f_contiguous for a in (x1, x2)) else 'C'
  
      if is_real_dtype(x1.dtype):
          if x1.size > THRESHOLD_MEDIUM:
              # This is as fast as BLAS dotc
              return np.tensordot(x1, x2, [range(x1.ndim)] * 2)
          else:
              # Several times faster for small arrays
              return np.dot(x1.data.ravel(order),
                            x2.data.ravel(order))
      else:
          # x2 as first argument because we want linearity in x1
          return np.vdot(x2.data.ravel(order),
                         x1.data.ravel(order))
docs: Default Euclidean inner product implementation.