Commit 7704233
Benjamin Moody
adc (inplace=True, expanded=False): correctly handle NaNs.
When converting physical to digital sample arrays, we must replace NaN
values (which represent a missing sample) with the appropriate
invalid-sample sentinel value.
This is done correctly for normal uses of the package, but if the
application directly invoked adc(inplace=True), NaNs would not have
been handled (and were instead set to an implementation-defined
value.)
(Note that we don't use inplace=True internally because this
overwrites the original floating-point array. Applications may want
to use inplace=True to save memory, but this requires knowing that the
original array is no longer needed.)1 parent 2eabaa5 commit 7704233
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
565 | 571 | | |
566 | 572 | | |
567 | 573 | | |
| |||
0 commit comments