Hello Sages

Last week (?) I noticed that a program I wrote was making a mistake, 
because f.coeffs() and f.coefficients() return very different results: the 
former provides a dense representation (with 0's), the second a sparse one 
(no 0's, correlating with f.exponents()).

I like this OK, but the help string isn't clear on this: the latter states 
merely, "Return the coefficients of the monomials appearing in self;" while 
the former states, "Returns "self.list()." " The help on self.list() states 
merely, "Returns a list with the coefficients of self."

So the difference is that one states "monomials *appearing* in self," while 
the other does not clarify that it gives the monomials appearing in self, 
which presumably means it includes monomials *not* appearing in self. I'm 
not good at these kinds of inferences, so this does not immediately convey 
"dense" or "sparse representation," or not to me, anyway.

I would propose the following:

*f.coeffs?* should state something to the effect of, "Returns all the 
coefficients of a dense representation of f."

*f.coefficients?* should state something like, "Returns all the 
coefficients of a sparse representation of f; that is, it returns only the 
non-zero coefficients, in a list correlated with f.exponents." (Notice the 
explicit statement of the correlation, reinforcing sparse representation.)

*f.list?* should be mostly identical to f.coeffs?

I'm willing to open a ticket & author a patch to this effect, if at least 
one other person agrees here.

john perry

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to