File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -820,6 +820,13 @@ def get_slice(self, selection):
820820 if isinstance (v , np .ndarray ):
821821 assert v .shape [0 ] == n
822822 d [k ] = v [selection ].copy ()
823+
824+ if k == 'contact_annotations' :
825+ print (type (v ))
826+ for kk , vv in v .items ():
827+ print (type (vv ))
828+ print (vv .shape , selection .shape , selection .dtype , n )
829+ d [k ][kk ] = vv [selection ].copy ()
823830
824831 sliced_probe = Probe .from_dict (d )
825832
Original file line number Diff line number Diff line change @@ -109,10 +109,13 @@ def test_probe():
109109 other_3d = Probe .from_dataframe (df )
110110 assert other_3d .ndim == 3
111111
112+ print ('ici' , probe .contact_annotations ['impedance' ].shape )
112113 # slice handling
113114 selection = np .arange (0 ,18 ,2 )
114115 # print(selection.dtype.kind)
115116 sliced_probe = probe .get_slice (selection )
117+ print ('lai' , probe .contact_annotations ['impedance' ].shape )
118+ print ('yep' , sliced_probe .contact_annotations ['impedance' ].shape )
116119
117120 #~ from probeinterface.plotting import plot_probe_group, plot_probe
118121 #~ import matplotlib.pyplot as plt
@@ -148,3 +151,4 @@ def test_set_shanks():
148151
149152 test_set_shanks ()
150153
154+
You can’t perform that action at this time.
0 commit comments