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
{{ message }}
Repository navigation
Physical writes of unsupported formats fail with an unrelated TypeError #777
File ".../wfdb/io/record.py", line 1080, in wrsamp
self.d_signal = self.adc()
File ".../wfdb/io/_signal.py", line 624, in adc
return adc_inplace(
File ".../wfdb/io/_signal.py", line 583, in adc_inplace
np.copyto(p_signal, d_nan, where=nanlocs)
TypeError: Cannot cast array data from dtype('O') to dtype('float64') according to the rule 'same_kind'
binformats includes formats 8, 61, 160, 310 and 311, which the writer doesn't support. A digital write of the same record fails as it should, with "This library currently only supports writing the following formats". The physical write never reaches that check because it fails earlier, while converting to digital values.
Expected: the same unsupported-format ValueError for physical and digital writes, raised before the conversion. The same failure shows up through SignalRead.write (#776) with kind="physical".
Activity