In this example we will show how to generate a 1-D array containing a specified number of random integers in Python NumPy.

### Source Code

```
from numpy import random
# generate a 1-D array containing 6 random integers from 0 to 50
n = random.randint(50, size=6)
print(n)
```

Output:

```
[27 41 5 22 5 47]
```