Comments (1)
Thanks for reporting this, and sorry it's taken me so long to come around to responding.
This is definitely more than a floating point precision issue. What you're seeing here is a boundary effect arising from a sharp discontinuity at the end of the signal, x[-1] = 49.9, transitioning implicitly to zero outside of the signal's domain. This discontinuity induces ringing in the filter response, which shows up as ripples near the end of the signal.
This is more or less expected behavior in general, but for the specific case where the input and output sampling rates are identical, I agree that it should be avoided by not doing any interpolation whatsoever. In fact, the librosa resampling interface (which can use resampy, among other backends) does perform this check:
which is probably why I didn't implement it here as well.
As an aside, the way you're checking for equivalence isn't stable:
r = y_same == x r.all()
Instead, you should use np.allclose(y_same, x)
which checks for equivalence down to floating point precision. For the specific case here, it shouldn't matter, but something to be aware of in general.
from resampy.
Related Issues (20)
- v0.3.0 produces other results than v0.2.2 HOT 3
- Resampy 0.3.0 is slow for multi-dimensional input HOT 5
- Issues with Numba 0.55.2 HOT 4
- Resampy 0.3.1 slows down other libraries HOT 43
- Use parallel=True by default can be problematic in multiprocessing applications HOT 8
- Bringing import time back down
- Edge Case, rounding error in length calculation HOT 3
- Missing argument in guvectorize decorator ? HOT 2
- Quality issues? HOT 5
- Incompatible with latest numba HOT 3
- Best quality resampling?
- PyPI status HOT 2
- Add linting CI
- Add pypi packaging workflow HOT 1
- Drop legacy python support
- Fix documentation builds HOT 1
- Update README badges
- Improve default filters and make the whole process reproducible HOT 14
- Cache filters on load
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from resampy.