diff --git a/caput/weighted_median.pyx b/caput/weighted_median.pyx index 95be780c..0d3fca6e 100644 --- a/caput/weighted_median.pyx +++ b/caput/weighted_median.pyx @@ -12,6 +12,9 @@ from MedianTree cimport Tree, Data cimport numpy as np cimport cython +# Required for numpy 2.0 compatibility +np.import_array() + # Define the fused types that can be used for the data or weights in the median routine ctypedef fused data_t: int