For loop and ‘numpy.float64’ object is not iterable error
Remove that sum, each element of Cl is a float so you can’t possibly call sum on them: If you intend to invoke numpy’s broadcasting to perform the power operation then you don’t need to index the array.