Vector Math
- | - |
---|---|
np.add(arr1,arr2) |
Elementwise add arr2 to arr1 |
np.subtract(arr1,arr2) |
Elementwise subtract arr2 from arr1 |
np.multiply(arr1,arr2) |
Elementwise multiply arr1 by arr2 |
np.divide(arr1,arr2) |
Elementwise divide arr1 by arr2 |
np.power(arr1,arr2) |
Elementwise raise arr1 raised to the power of arr2 |
np.array_equal(arr1,arr2) |
Returns True if the arrays have the same elements and shape |
np.sqrt(arr) |
Square root of each element in the array |
np.sin(arr) |
Sine of each element in the array |
np.log(arr) |
Natural log of each element in the array |
np.abs(arr) |
Absolute value of each element in the array |
np.ceil(arr) |
Rounds up to the nearest int |
np.floor(arr) |
Rounds down to the nearest int |
np.round(arr) |
Rounds to the nearest int |
Comments
Related