If I understand well, the shape of this array (u) is such that the samples dimension is the second one?

I think that I would prefer if the first dimension was the samples, as it is standard in scikit-learn.