def n_spikes(self, cluster=None):
    if (cluster is None):
        return len(self.spike_times)
    elif (self.spk_clusters is None):
        warnings.warn('No clusters available, please load some.')
        return
    else:
        return np.count_nonzero((self._spk_clusters == cluster))
def n_spikes(self, cluster=None):
    if (cluster is None):
        return len(self.spike_times)
    elif (self.spk_clusters is None):
        warnings.warn('No clusters available, please load some.')
        return
    else:
        return np.count_nonzero((self._spk_clusters == cluster))