Bug: XDAWN spatial filter
The XDAWN spatial filter trainer used the lapack routine dsygv which computes generalized eigenvalues/eigenvector for symmetric matrices A and B. But B need s to be positive definite. In many cases, our B are not definite (because of average reference). If a channel is disconnected, it will be non definite too.
It seems to work in practice (maybe because of numerical errors), but the result might not be optimal as we may amplify the null component artificially. Funnily, I have had some cases in python (which relies on a different lapack routine dsygvd) which gives me errors.... So at best it is a weak implementation unless I missed something.
One simple possibility is to add a matrix full of ones (with a small factor, but it does not really matter) to matrix B to make it definite... That would make us safe from a lapack detection of the non-definiteness of the B matrix.