import numpy as np
x = np.array([1,22, 333, 44, 5]) x
array([ 1, 22, 333, 44, 5])
1/x
array([1. , 0.04545455, 0.003003 , 0.02272727, 0.2 ])
x2 = np.arange(0, 12, 2) x2
array([ 0, 2, 4, 6, 8, 10])
xx = np.linspace(0, 10, 6) xx
array([ 0., 2., 4., 6., 8., 10.])
xx**2
array([ 0., 4., 16., 36., 64., 100.])
x2+xx
array([ 0., 4., 8., 12., 16., 20.])