Skip to content

Commit e8df746

Browse files
Niharika KarnikNiharika Karnik
authored andcommitted
Changing np.in1d to np.isin
1 parent 6f78cd8 commit e8df746

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pysensors/utils/_constraints.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,10 +556,10 @@ def plot_selected_sensors(
556556
n_samples, n_features = self.data.shape
557557
n_sensors = len(sensors)
558558
constrained = sensors[
559-
np.where(np.in1d(all_sensors[:n_sensors], sensors) is False)[0]
559+
np.where(np.isin(all_sensors[:n_sensors], sensors) is False)[0]
560560
]
561561
unconstrained = sensors[
562-
np.where(np.in1d(all_sensors[:n_sensors], sensors) is True)[0]
562+
np.where(np.isin(all_sensors[:n_sensors], sensors) is True)[0]
563563
]
564564
if isinstance(self.data, np.ndarray):
565565
xconst = np.mod(constrained, np.sqrt(n_features))

0 commit comments

Comments
 (0)