Repository navigation
Calculate channel defaults from one snapshot - #847
Conversation
tompollard
left a comment
There was a problem hiding this comment.
Thanks. Output is unchanged: wrsamp writes byte-identical files for every record in sample-data, and the writes that fail on the merge base fail the same way here; module-level wfdb.wrsamp output also matches. Calling set_defaults directly now gives the must be a list TypeError for a NumPy fmt (previously "truth value of an array … is ambiguous") and for a tuple fmt (previously accepted, leaving adc_res unset until the write failed). Since every writer already required lists, no write that succeeds today is affected, and write_record still accepts NumPy fields through its list projection. A wrong-length samps_per_frame is still ignored by wrheader(expanded=False) and still gets the same channel-count error from wrsamp. The offline suite, Ruff and the strict docs build pass locally.
Ready to merge.
Summary
Recordlists as the source of truth; supplied lists retain their identity and partial lists are not filled in.This is a small step toward #749 and #744. It does not change the public record model.
Verification
main; all were byte-identical.This PR is independent of #846.