Don't you just want `sparse_format="csc"` instead of the added condition?