You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Of course it gets even thornier if the record has multiple spf but you select signal(s) that have only one spf:
>>> wfdb.rdrecord('sample-data/03700181', smooth_frames=False, channels=[1])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/benjamin/wfdb-python/wfdb/io/record.py", line 3536, in rdrecord
expanded=False)
File "/home/benjamin/wfdb-python/wfdb/io/record.py", line 706, in _arrange_fields
if self.sig_len != self.d_signal.shape[0]:
AttributeError: 'list' object has no attribute 'shape'
(because then _rd_dat_signals and _rd_segment return a list of arrays but rdrecord is expecting a 2D array.)
If
rdrecord
is invoked with:smooth_frames=True
andphysical=True
(default), it should setrec.p_signal
to a two-dimensional floating-point array.smooth_frames=True
andphysical=False
, it should setrec.d_signal
to a two-dimensional integer array.smooth_frames=False
andphysical=True
, it should setrec.e_p_signal
to a list of floating-point arrays.smooth_frames=False
andphysical=False
, it should setrec.e_d_signal
to a list of integer arrays.For example:
However, if every signal in the record has exactly one sample per frame, this doesn't work:
The text was updated successfully, but these errors were encountered: