# 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, ...]
```

?

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, ...]
```

?

add a comment

1

Asked: **
2015-11-11 11:51:31 -0600
**

Seen: **44 times**

Last updated: **Nov 11 '15**

Replace rows an columns by zeros in a numpy array

Creating an array of variables

Can I define a function from a list of values?

export data and labels in cvs file

Newton's cubic Fractal help. Plotting

Elegant solution to 'thin out' array and plot line

Convert all complex numbers in array/matrix to value 0 or remove these numbers

Using the solution of a linear system, and splitting a matrix

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.