Thanks Nils. I this is similar to, but more elegant than, what I tried 
earlier. I went back to the solution above, however, I thought that there 
was probably a lot of overhead in creating the space ZZ^3 and the 
homomorphism. Indeed,

%timeit V.hom([(ZZ^3)(v) for v in [[1,2,3],[2,1,4],[3,3,7]]]).kernel()
125 loops, best of 3: 2.15 ms per loop

sage: %timeit 
V.submodule_with_basis([V.linear_combination_of_basis(b.list())  for b in 
mat.kernel().basis()])
625 loops, best of 3: 1.39 ms per loop

so it does seem to be slower, although one example is hardly definitive.

Andrew

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.


Reply via email to