This was essential done to numpy einsum, and doing the dot operations in multiple dimensions.
It was though necessary to realize, that to do the proper dot product operations, the outer two
axis if M0 should be swapped, by rolling the outer axis one back.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.