In [1]:
import numpy as np
In [2]:
arr = np.arange(0,11)
In [3]:
arr
Out[3]:
In [4]:
arr + arr
Out[4]:
In [5]:
arr - arr
Out[5]:
In [14]:
arr * arr
Out[14]:
In [15]:
arr / arr # world a splode?
Out[15]:
In [12]:
arr + 100
Out[12]:
In [13]:
arr * 100
Out[13]:
In [16]:
arr - 100
Out[16]:
In [17]:
arr / 5.0
Out[17]:
In [18]:
1 / arr
Out[18]:
In [20]:
arr ** arr # well that escalated quickly
Out[20]:
In [34]:
np.sqrt(arr)
Out[34]:
In [22]:
np.exp(arr)
Out[22]:
In [26]:
np.max(arr) # same as below, but passing the array directly to the max() function
Out[26]:
In [27]:
arr.max() # same as above, but calling method off of array object
Out[27]:
In [32]:
np.sin(arr) # also np.cos(), np.tan(), np.arccos(), etc
Out[32]:
In [33]:
np.log(arr) # sploded
Out[33]:
In [ ]: