diff --git a/src/probeinterface/probe.py b/src/probeinterface/probe.py index eccc7e0..22bcd18 100644 --- a/src/probeinterface/probe.py +++ b/src/probeinterface/probe.py @@ -199,7 +199,7 @@ def set_contacts(self, positions, shapes="circle", shape_params={"radius": 10}, if isinstance(shapes, str): shapes = [shapes] * n shapes = np.array(shapes) - if not np.all(np.in1d(shapes, _possible_contact_shapes)): + if not np.all(np.isin(shapes, _possible_contact_shapes)): raise ValueError(f"contacts shape must be in {_possible_contact_shapes}") if shapes.shape[0] != n: raise ValueError("contacts shape must have same length as posistions") diff --git a/tests/test_io/test_io.py b/tests/test_io/test_io.py index a1b9ee4..662a341 100644 --- a/tests/test_io/test_io.py +++ b/tests/test_io/test_io.py @@ -99,7 +99,7 @@ def test_BIDS_format(tmp_path): assert probe_orig.annotations.items() <= probe_read.annotations.items() # check if the same attribute lists are present (independent of order) assert len(probe_orig.contact_ids) == len(probe_read.contact_ids) - assert all(np.in1d(probe_orig.contact_ids, probe_read.contact_ids)) + assert all(np.isin(probe_orig.contact_ids, probe_read.contact_ids)) # the transformation of contact order between the two probes t = np.array(