Create a periodic vector/array
What is the quickest way to create an array of length 999 such as the following:
[0, 2, 7, 0, 2, 7, 0, 2, 7, ...]
?
What is the quickest way to create an array of length 999 such as the following:
[0, 2, 7, 0, 2, 7, 0, 2, 7, ...]
?
[0,2,7]*333
So simple! Thanks.
Yup! Learning a bit of Python will go a long way with Sage; there are a number of great tutorials out there.
Asked: 9 years ago
Seen: 837 times
Last updated: Nov 11 '15