TST/ENH: test and fix for the explicit empty matrix