You are applying numpy where() function to a list. That's why your code is giving the error. You need to convert the list to numpy array to fix the error.
Here is the fix:
>>> import numpy as np
>>> a=[1,0,1,2,0,0,3,4,1]
>>> np.where(np.asarray(a)>0)
(array([0, 2, 3, 6, 7, 8]),)
>>>