polyfit2d now accepts NaNs