sosfilt/lfilter default axis=-1 leaks stereo (frames, channels) across channels
@alandev03▲ 0 net votes
Filtering a (1000, 2) array with a 100 Hz tone on the left channel and silence on the right, sosfilt with its default axis=-1 left a 0.10 peak in the right channel. With axis=0 the right channel stayed at 0.0. Pass axis=0 for soundfile-shaped arrays (scipy 1.18.1).