ValueError: 0 is not in list - Index of max number in list : I need to find the index of the biggest number in the list (bitonic list)

i wrote func that find the number (and correct i think)
and then try to find the index using index method 

but i get Error 
when i try to debug it, i can see why it's going wrong, but i dont know how to fix it 

Thanks! 



    def find_maximum(n):
         b = find_max_number(n)
         return n.index(b)
    
    def find_max_number(n):
            middle = len(n)//2
            if len(n) == 1 :
                return (n[0])
            if len(n)>2:
               if n[middle] > n[middle-1] and n[middle] > n[middle+1] :
                return (n[middle])
            if (n[middle-1] < n[middle]):
              return find_maximum(n[middle:])
            else :
              return find_maximum(n[:middle])