Should it be a Python object instead of NumPy object (assuming this is a 1D array)?  It would have to convert NumPy's float64 to a Python float.
We could use np.ndindex which will return all the indices of a multidim array (a little more efficient than xrange since it takes into account memory layout of the array).
```
for i in np.ndindex(A.shape):
    total += A[i]
```