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 :
sage: A = ZZ^3 sage: A.coordinates? … Definition: A.coordinates(self, v, check=True) Docstring: Write v in terms of the basis for self. …. "check" - bool (default: True); if True, also verify that v is really in self. …. If v is not in self, raises an "ArithmeticError" exception. sage: v = vector( [1/2, 1/3, 1/4] ) sage: v in A False sage: A.coordinates( v ) [1/2, 1/3, 1/4] # BIZARRE Shouldn't this raise the ArithmeticError exception, as advertised ? Looking at the code of this method reveals that it does: return self.coordinate_vector(v, check=check).list() A.coordinate_vector is presumably doing: Write v in terms of the standard basis for self and return the resulting coefficients in a vector over the fraction field of the base ring. ... If v is not in self, raises an ArithmeticError exception. And, presumably, it does not really implement this specification. Unless I am missing something, of course. Cheers, --- 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.