Shouldn't `NaN` be `np.nan` instead?