Write a NumPy program to get the powers of an array values element-wise. Return the array of powers.
Example 1:
Input: np.array([1, 2, 3, 4, 5]), 2
Output: array([ 1, 4, 9, 16, 25])
Example 2:
Input: np.array([10, 20, 30, 40, 50]), 3
Output: array([ 1000, 8000, 27000, 64000, 125000])