Armadillo has trouble inverting complex matrices. This is circumvented by this function.
Useful links