I was so excited about that test case, but it turned out to be my mistake.
Since it's so difficult to blame myself, I'll blame my brain (he's probably OK with it). Because it's him who thinks that patterns matter, and if it's a standard way to use rows for samples representation and columns for features, then it should always be like that, no exceptions could be found out there.
So after I got kicked in my head by reality, I tried to solve the case again. The code could be found here.
Aaaand it does not look so fascinating. Just boring tbh.