Want to do calculation using the numbers in 2D array
import math
result = 0
data = [[0],[1],[1],[1],[0],[1],[1],[1]]
for i in data:
result += (math.log(i[0], 2))
The reported error is ValueError: math domain error
Could someone show me what's wrong with this code?