Open
Description
Issue raised as follow-up to: pydata/xarray#6002
Reproduce
import numpy as np
import bottleneck as bn
n_time = 1
spec_data = np.random.random(size=(n_time,192,121))
bn.nanmax(spec_data.transpose(0, 2, 1))
---> Segmentation fault
numpy.transpose returns a view, so I guess that's what causes bottleneck to segfault? Not sure, though, especially since changing the order does not trigger the segfault: spec_data.transpose(1, 0, 2)... maybe bottleneck doesn't like views with a first dimension of size 1?
Expected behaviour
Should not crash
Environment
Confirmed Windows & Linux , P37 and P39.
confirmed with:
bottleneck: 1.3.2
numpy: 1.21.4
Activity