Write a function softMax(x) to return a 1darray of softmaxfunction values ??=???−?∑?−1?=0???−?fi=exi−m∑j=0K−1exj−m for?=0,2,⋯,?−1i=0,2,⋯,K−1, where ?x is a 1darray of ?K floats, ??xi isthe (?+1)(i+1)-th element of array ?x, and ?m is the largestelement in array ?x. Sample: if z = np.array([10, 5, 8]), thensoftMax(z) returns array([0.876, 0.006, 0.118]).
in python program and the output should be array([0.876, 0.006,0.118])