points_in_path can fail with NaN data

```python

from matplotlib.path import Path
import numpy as np
box = np.array([[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]])
p = Path(box)
test = np.array([[np.nan, 0.5]])
p.contains_points(test)  # array([ True], dtype=bool)
```

Because "test" is length 1

On Fri, Nov 7, 2014 at 9:05 AM, Thomas A Caswell <notifications@github.com>
wrote:

> In lib/matplotlib/tests/test_path.py:
>
> > @@ -61,6 +61,15 @@ def test_path_clipping():
> >              xy, facecolor='none', edgecolor='red', closed=True))
> >
> >
> > +def test_point_in_path_nan():
> > +    box = np.array([[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]])
> > +    p = Path(box)
> > +    test = np.array([[np.nan, 0.5]])
> > +    contains = p.contains_points(test)
> > +    assert len(contains) == 1
>
> why isn't the length 2?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/matplotlib/matplotlib/pull/3759/files#r20011300>.
>