Skip to content

Commit a436d27

Browse files
committed
nanmean
1 parent f1a6b7d commit a436d27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

data_exploration_gui/data_class.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ def compute_depth_and_amplitudes(self):
104104
self.amps = []
105105
self.nspikes = []
106106
for clu in self.ids:
107-
self.depths = np.append(self.depths, np.mean(units_b.depths[str(clu)]))
108-
self.amps = np.append(self.amps, np.mean(units_b.amps[str(clu)]) * 1e6)
107+
self.depths = np.append(self.depths, np.nanmean(units_b.depths[str(clu)]))
108+
self.amps = np.append(self.amps, np.nanmean(units_b.amps[str(clu)]) * 1e6)
109109
self.nspikes = np.append(self.nspikes, len(units_b.amps[str(clu)]))
110110

111111
np.save((self.gui_path + '/cluster_depths'), self.depths)

0 commit comments

Comments
 (0)