Steps To Reproduce
sage: from sage.rings.polynomial.multi_polynomial_sequence import PolynomialSequence
sage: R.<x,y> = QQ[]
sage: PolynomialSequence([x+2*y+3, 4*x, 5]).coefficient_matrix()
(
[1 2 3] [x]
[4 0 0] [y]
[0 0 5], [1]
)
sage: _[1].parent()
Full MatrixSpace of 3 by 1 dense matrices over Multivariate Polynomial Ring in x, y over Rational Field
Expected Behavior
The second element should be a vector - it is the vector of monomials appearing in the sequence.
Actual Behavior
It returns a 1-column matrix.
Additional Information
The problem is that iterating over a vector gives the elements, whereas iterating over a 1-column matrix gives vectors.
Environment
Checklist