Skip to content

Commit 8bac623

Browse files
author
Daniel Crepeau
committed
Removed obsolete code to increase efficiency.
1 parent d7f46ee commit 8bac623

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

neo/rawio/medrawio.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,7 @@ def _get_analogsignal_chunk(self, block_index, seg_index, i_start, i_stop,
241241
start_sample_offset = self._stream_info[stream_index]['contigua'][seg_index]['start_index']
242242
self.sess.read_by_index(i_start + start_sample_offset, i_stop + start_sample_offset)
243243

244-
# Create "sample_major" 2D numpy array from the result of read_by_index()
245-
samps_returned = len(self.sess.data['channels'][0]['data'])
246-
raw_signals = np.array([], dtype=np.int32)
247-
248-
raw_signals = np.empty((i_stop - i_start, num_channels))
244+
raw_signals = np.empty((i_stop - i_start, num_channels), dtype=np.int32)
249245
for i, chan in enumerate(self.sess.data['channels']):
250246
raw_signals[:,i] = chan['data']
251247

0 commit comments

Comments
 (0)