import numpy as np
a = np.zeros(10, dtype = int)
a
array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
a = np.ones((3,5), dtype = float)
a
array([[1., 1., 1., 1., 1.], [1., 1., 1., 1., 1.], [1., 1., 1., 1., 1.]])
a = np.full((3,5), 3.14)
a
array([[3.14, 3.14, 3.14, 3.14, 3.14], [3.14, 3.14, 3.14, 3.14, 3.14], [3.14, 3.14, 3.14, 3.14, 3.14]])
np.arange(0, 20, 2)
array([ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18])
np.linspace(0, 1, 5)
array([0. , 0.25, 0.5 , 0.75, 1. ])
HINT when you just use np.random(3, 3), then you get this error: 'module' object is not callable
a = np.random.random((3, 3))
a
array([[0.92882601, 0.15277742, 0.61847288], [0.26835166, 0.1343164 , 0.13999919], [0.43270145, 0.89307018, 0.52218327]])
a = np.random.normal(0, 1, (3, 3))
a
array([[ 0.54278146, -0.29350707, -0.76737292], [-0.00821164, -0.49738633, 0.13785728], [ 1.27666228, -1.43017619, -1.2518886 ]])
a = np.random.randint(0, 10, (3, 3))
a
array([[8, 7, 3], [7, 7, 0], [1, 7, 8]])
a = np.eye(3)
a
array([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]])
np.empty(3)
array([1., 1., 1.])