Skip to content

Commit 1342ed3

Browse files
committed
fix: add numpy 2.4 in1d compatibility shim
1 parent fb55def commit 1342ed3

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

supervised/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
11
__version__ = "1.2.0"
22

3+
import numpy as np
4+
5+
6+
def _ensure_numpy_compat():
7+
if not hasattr(np, "in1d"):
8+
# NumPy 2.4 removed np.in1d; some dependencies still use it.
9+
np.in1d = np.isin
10+
11+
12+
_ensure_numpy_compat()
13+
314
from supervised.automl import AutoML

0 commit comments

Comments
 (0)