You are facing this error because of the very interesting property of the numpy arrays it says all the elements of your NumPy array must be of a same type
Even if all the elements in your list are all of the type int (more specifically 'numpy.int64'), then all of those elements in the array will be converted to the floats because of some of the element in the some of the row is float.
On the similar lines if we include even the single string at some place in your array then all of the elements of that array are converted to strings:
The original result array has the elements of the type 'numpy.int64', but the if the
result/4 operation is returning the array of the type 'numpy.float64' (as 82 / 4 = 20.5, etc.). So when you want to replace your values in the result, then I can say it is not at all 'safe' as you are by mistake trying to place the floats into the array of ints.