Solved by ptrblck in post #10 
              
              
                The error is regarding the shallow/deep copy. 
If you add a copy() after assigning the numpy arrays, your code runs fine with an error of ~2e-7: 
    adj_k_prob = adj_prob.copy()
    adj_k_pow =  adj_prob.copy()