On 11/08/2012 05:36 PM, John Cremona wrote:
Either I am doing something wrong or a simple operation which should
be fast is in fact very slow, but I do not know why.
If V,W are vector spaces over QQ, subspaces of the same ambient
space, then V.sum(W) should return their sum, with an echelon basis
obtained from the bases of V and W. But this takes a stupidly long
time. For example:
sage: Q100=QQ^100
sage: V=Q100.subspace([Q100.random_element()])
sage: W=Q100.subspace([Q100.random_element()])
# so V,W are both 1-dimensional
sage: V.sum(W)
sage: time V.sum(W)
# takes forever (on 5.3) -- why?
John
What Francis said is correct. V.sum(W) sums the elements in W. Over QQ,
the number of elements is not finite. I am surprised if your machine is
still up, because it should have just exhausted all memory! :)
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.