# Revision history [back]

This is an answer to the follow-up question posted as a comment to @tmonteil's answer.

There is no function ones_vector but we can define a vector of ones as the first row of a matrix of ones:

sage: v = matrix.ones(SR, 1, 10)[0]
sage: v
(1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
sage: v.parent()
Vector space of dimension 10 over Symbolic Ring


It lives in the same space as the zero vector:

sage: u = zero_vector(SR, 10)
sage: u
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
sage: u.parent()
Vector space of dimension 10 over Symbolic Ring