Introduction to NumPy

In [1]:
import numpy as np
In [2]:
np.linspace(0, 1, 6)
Out[2]:
array([0. , 0.2, 0.4, 0.6, 0.8, 1. ])
In [3]:
np.arange(4, 10)
Out[3]:
array([4, 5, 6, 7, 8, 9])

To create a single zero, you can use the zeros function:

In [4]:
np.zeros(1)
Out[4]:
array([0.])

or the arange function:

In [5]:
np.arange(1)
Out[5]:
array([0])