Using Array And Scalars
import numpy as np
# creating an array
arr1 = np.array([(1, 2, 3, 4), (8, 9, 10, 11)])
arr1
array([[ 1, 2, 3, 4],
[ 8, 9, 10, 11]])
# multiplication
arr1 * arr1
array([[ 1, 4, 9, 16],
[ 64, 81, 100, 121]])
# substraction
arr1 - arr1
array([[0, 0, 0, 0],
[0, 0, 0, 0]])
# division
1 / arr1
array([[1. , 0.5 , 0.33333333, 0.25 ],
[0.125 , 0.11111111, 0.1 , 0.09090909]])
# power
arr1 ** 3
array([[ 1, 8, 27, 64],
[ 512, 729, 1000, 1331]])