Skip to content

Commit

Permalink
Fix numpy 2.0 deprecation (#1184)
Browse files Browse the repository at this point in the history
fix deprecation
  • Loading branch information
Mathieu Scheltienne authored Oct 26, 2023
1 parent 24be254 commit 3a691db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mne_bids/tsv_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def _contains_row(data, row_data):
# https://github.com/mne-tools/mne-bids/pull/372
row_value = np.array(row_value, dtype=data_value.dtype)

column_mask = np.in1d(data_value, row_value)
column_mask = np.isin(data_value, row_value)
mask = column_mask if mask is None else (mask & column_mask)
return np.any(mask)

Expand Down Expand Up @@ -115,7 +115,7 @@ def _drop(data, values, column):
dtype = np.array(values).dtype
values = np.array(values, dtype=dtype)

mask = np.in1d(new_data_col, values, invert=True)
mask = np.isin(new_data_col, values, invert=True)
for key in new_data.keys():
new_data[key] = np.array(new_data[key])[mask].tolist()
return new_data
Expand Down

0 comments on commit 3a691db

Please sign in to comment.