shouldn't it be ```, k``` here instead of hardcoded ```1```?
no need to comment original code out -- if you believe that this one "fixes" it -- just remove it.  And I guess that orig_dsmatrix -1'ing etc could be removed as well?

may be to make it at least "partially" correct it should have "k=None" as default, then if it is None, assume k=1 for non-confusion measures and for confusion measure spit out the flattened full matrix ?