multiplying two array in python3.7
You are simply defining your array so that it is made of python sets. That is a different data structure which is not able to be  multiplied, unlike an array.

Just change your code to this:

array1 = np.array([[1,2,3,4],[5,6,7,8]])


The only difference is using square brackets instead of curly ones. These are python list objects (or standard arrays).

array2=array1*array1  
print(array2)

[[ 1  4  9 16]
 [25 36 49 64]]