def size(self, gather=True): """ Return the total number of connections. - only local connections, if gather is False, - all connections, if gather is True (default) """ if gather: n = len(self) return recording.mpi_sum(n) else: return len(self)
def size(self, gather=True): """ Return the total number of connections. - only local connections, if gather is False, - all connections, if gather is True (default) """ if gather and self._simulator.state.num_processes > 1: n = len(self) return recording.mpi_sum(n) else: return len(self)