the error has something to do with the built in complex assignment. If you use something like np.complex128(1+1j) the error is corrected. as to why this is the case, I am not sure but it worked for me.