In my case I have complex arrays with occasional np.nan*1j entries, as well as np.nan. Any suggestions on how to check for these?