Closed
Description
When running the code below (boiled down from the original producer) I get a segmentation fault.
Reproducing code example:
import numpy as np
from scipy.spatial import KDTree
points = np.arange(34.).reshape(-1, 2)
points[0] = np.nan
points[8] = np.nan
KDTree(points)
Error message:
❯ python test_crash.py
[1] 89987 segmentation fault python test_crash.py
Scipy/Numpy/Python version information:
1.7.1 1.21.1 sys.version_info(major=3, minor=9, micro=6, releaselevel='final', serial=0)
I'm running this locally on macOS 11.5 (x86_64), but original issue was seen on Ubuntu 20.04.2 (GitHub Actions). The MetPy test that now segfaults passes fine with Scipy 1.7.0.