

def read_raw_buffer(self, nchan):
    "Read a single buffer with raw data\n\n        Parameters\n        ----------\n        nchan : int\n            The number of channels (info['nchan']).\n\n        Returns\n        -------\n        raw_buffer : float array, shape=(nchan, n_times)\n            The raw data.\n        "
    (tag, this_buff) = _recv_tag_raw(self._data_sock)
    while (tag.kind != FIFF.FIFF_DATA_BUFFER):
        (tag, this_buff) = _recv_tag_raw(self._data_sock)
    buff = StringIO(this_buff)
    tag = read_tag(buff)
    raw_buffer = tag.data.reshape((- 1), nchan).T
    return raw_buffer

dataset/ETHPy150Open mne-tools/mne-python/mne/realtime/client.py RtClient.read_raw_buffer/original