December 2017
Intermediate to advanced
386 pages
10h 42m
English
ufunc functions can also admit more than one argument. The most common example of this is array operations. For example, we can add two arrays with the following code:
x = np.array([1.2, -0.23, 3.4])y = np.array([2.4, -1.7, -5.4])z = x + y
This code uses the + operator to compute the component-wise sum, or vector sum, of the two one-dimensional arrays x and y, and stores the result in array z.
Read now
Unlock full access