# What is the formula used by np.dot?

Dot products are pretty simple for 1- or 2-dimensional arrays, but anything beyond that is incomprehensible to me. I tried looking into numpy‘s dot function but the C code is incomprehensible to me. What is the formula numpy is using to calculate the inner product of multidimensional arrays?