I have an array such as this:
array =[[1,2,3],
[5,3,4],
[6,7,2]]
and for each member I would like to calculate the ratio of them to the sum of the row.
Therefore, the result of my question in proposed sample is:
result = [[1/(1+2+3),2/(1+2+3),3/(1+2+3)],
[5/(5+3+4),3/(5+3+4),4/(5+3+4)],
[6/(6+7+2),7/(6+7+2),2/(6+7+2)]]
I write the following code but it does not work because two operators have different shape:
array/array.sum(array, axis=1)