I think you can't avoid checking all the columns of the concerned row if you want to return a particular row, because even if there is only one non-zero element in that row, we would still have to insert all zeroes in it.
like in [0, 0, 0, 1, ,0,0, 0, 0] we would have to insert all these zeroes, and thus we have would need to check all the zeroes non matter what the situation is. -Saurabh Jha -- 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.