I've been trying to figure out how np.dot works for multi-dimensional arrays (dimension > 2). I couldn't quite locate where this is specified in the source code. I assume this is done in C with multiple calls to cblas gemm. Any pointers will be most appreciated!