question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve documentation for the resample function

See original GitHub issue

Environment

0.10.0.dev0 https://librosa.org/doc/main/generated/librosa.resample.html

Describe the bug

There is an inconsistency among the res_type options for the resample function. While some are safe to use without an anti-aliasing filter, others are not.

The ones that are not safe include:

  • soxr_qq
  • polyphase
  • linear
  • zero_order_hold

To Reproduce

Run the following notebook. https://colab.research.google.com/drive/1VNS8O494CYocHrilUc7lZ_hKltNqb_PG?usp=sharing

Suggested fix

I suggest improving the documentation with a more explicit mention of the options that require anti-aliasing filtering. Not just stating that the quality is low. I will create a PR for this.

Sidenote: The documentation text talks about the kaiser_best being the default option, while the code states that soxr_hq is the default. This should probably be fixed in the same go.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jpaasencommented, Dec 5, 2022

Yes. I’m on it

1reaction
jpaasencommented, Dec 5, 2022

Do you mean to ask if soxr_hq is anti-aliasing? The answer is yes. (We should also drop the “relatively slow” language, since soxr_hq is quite speedy.)

Sorry. Yes, I was thinking about the “relatively slow” wording.

Read more comments on GitHub >

github_iconTop Results From Across the Web

DOC: improve documentation for Series.resample · Issue #5023
In every case, that label='right' is default as stated in the docs (http://pandas.pydata.org/pandas-docs/dev/timeseries.html#up-and-downsampling) is not true.
Read more >
Resample function—ArcGIS Pro | Documentation
The Resample function changes the raster pixel size, the resampling type, or both. Before combining and analyzing rasters with different resolutions and map ......
Read more >
Using the Pandas “Resample” Function - Towards Data Science
This article is an introductory dive into the technical aspects of the pandas resample function for datetime manipulation.
Read more >
pandas.DataFrame.resample — pandas 1.5.2 documentation
Convenience method for frequency conversion and resampling of time series. ... Group DataFrame by mapping, function, label, or list of labels.
Read more >
resample function - RDocumentation
The function resample fits a model specified by Learner on a Task and calculates predictions and performance measures for all training and all...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found