MAINT: more flexibility to handle multiplication of a sparse matrix and a subclass of numpy.matrix