On Tuesday, April 16, 2019 at 8:35:27 PM UTC-7, John H Palmieri wrote:
>
>
> I think it's any sparse matrix, not just sparse matrices over SR.
>
> sage: m = matrix(3, [1, 0, 0, 0, 2, 0, 0, 0, 3], sparse=True)
> sage: exp(m)  # hits the bug
>
> Indeed. That's because m.exp() first changes the ring to SR and then calls 
"exp" on that result. For dense matrices that works. For sparse matrices it 
doesn't. One fix would be to change "exp" on sparse matrices to

self.dense_matrix().change_ring(SR).exp()

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to