What I propose was to be used with your inheritance method. The else part should also be changed to
``` # the number of non-zero elements is smaller than the subregion smat = {} for rk, ck in self._smat: if rlo <= rk <= rhi and clo <= ck <= chi: smat[(rk-rlo, ck-clo)] = self._smat[(rk, ck)] return self._new(r, c, smat) ``` -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.