We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e57ce96 commit a6d8ea4Copy full SHA for a6d8ea4
src/probeinterface/probe.py
@@ -945,13 +945,19 @@ def from_dict(d: dict) -> "Probe":
945
"""
946
probe = Probe(ndim=d["ndim"], si_units=d["si_units"])
947
948
+
949
+ shank_ids=d.get("shank_ids", None)
950
+ if shank_ids is not None and np.all(shank_ids == ''):
951
+ # backward compatible hack with previous version
952
+ shank_ids = None
953
954
probe.set_contacts(
955
positions=d["contact_positions"],
956
plane_axes=d["contact_plane_axes"],
957
shapes=d["contact_shapes"],
958
shape_params=d["contact_shape_params"],
959
contact_ids=d.get("contact_ids", None),
- shank_ids=d.get("shank_ids", None),
960
+ shank_ids=shank_ids,
961
contact_sides=d.get("contact_sides", None),
962
)
963
0 commit comments