Fixes #15 handling of scalar np.nan