On 19 December 2012 10:49, Charles Bouillaguet <charles.bouillag...@gmail.com> wrote: > On Dec 19, 2012, at 4:16 AM, P Purkayastha wrote: > >> On 12/19/2012 12:28 AM, Charles Bouillaguet wrote: >>> Hi all, >>> >>> There seems to be an inconsistency between the docstrings and the actual >>> behavior of some module-related methods. For instance, I am surprised by >>> the behavior of the coordinates() method : >>> >> >> It is consistent with whatever A.ambient_vector_space() is doing. There is >> even a doctest: >> >> sage: M = ZZ^3; >> sage: V = M.ambient_vector_space(); V >> Vector space of dimension 3 over Rational Field >> >> Since the "ambient vector space" is the Rational field, A.coordinates >> returns the rational numbers. I don't know what is meant by the term >> "ambient vector space" in this context. > > Fair enough, but the docstring of A.coordinates() says nothing about ambient > space. So I think that a) either the docstring must be fixed or b) the > function must be fixed. > > Which one has your preference ?
I suggest adding to the documentation of A.coordinates() that it works also if the given element is in the ambient space, with an example of that. In concrete terms you need the element to be an F-linear combination of the generators where F is the fraction field of the base ring R, and not just an R-linear combination. This functionality is useful (I have used it in some number field functions) and I would not want it removed. John > --- > Charles Bouillaguet > http://www.lifl.fr/~bouillaguet/ > > -- > 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. > > -- 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.