Skip to content

Commit

Permalink
Merge pull request #95 from bmcfee/docstring-formatting
Browse files Browse the repository at this point in the history
Docs updates
  • Loading branch information
bmcfee authored Jun 21, 2022
2 parents ee82e25 + 51110bd commit 5bfb438
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
[![GitHub license](https://img.shields.io/badge/license-ISC-blue.svg)](https://raw.githubusercontent.com/bmcfee/resampy/master/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/resampy.svg)](https://pypi.python.org/pypi/resampy)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/resampy/badges/version.svg)](https://anaconda.org/conda-forge/resampy)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/resampy/badges/downloads.svg)](https://anaconda.org/conda-forge/resampy)
[![Build Status](https://travis-ci.org/bmcfee/resampy.png?branch=master)](http://travis-ci.org/bmcfee/resampy?branch=master)
[![Circle CI](https://circleci.com/gh/conda-forge/resampy-feedstock.svg?style=svg)](https://circleci.com/gh/conda-forge/resampy-feedstock)
[![TravisCI](https://travis-ci.org/conda-forge/resampy-feedstock.svg?branch=master)](https://travis-ci.org/conda-forge/resampy-feedstock)
[![AppVeyor](https://ci.appveyor.com/api/projects/status/github/conda-forge/resampy-feedstock?svg=True)](https://ci.appveyor.com/project/conda-forge/resampy-feedstock/branch/master)
[![Coverage Status](https://coveralls.io/repos/github/bmcfee/resampy/badge.svg?branch=master)](https://coveralls.io/github/bmcfee/resampy?branch=master)
[![Dependency Status](https://dependencyci.com/github/bmcfee/resampy/badge)](https://dependencyci.com/github/bmcfee/resampy)
[![CI](https://github.com/bmcfee/resampy/actions/workflows/ci.yml/badge.svg)](https://github.com/bmcfee/resampy/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/bmcfee/resampy/branch/main/graph/badge.svg?token=o6a0xO89rz)](https://codecov.io/gh/bmcfee/resampy)
[![Documentation Status](https://readthedocs.org/projects/resampy/badge/?version=latest)](http://resampy.readthedocs.org/en/latest/?badge=latest)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.596633.svg)](https://doi.org/10.5281/zenodo.596633)

Expand Down
8 changes: 4 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
#html_static_path = ['_static']

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
Expand Down Expand Up @@ -277,6 +277,6 @@
numpydoc_show_class_members = False

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'python': ('http://docs.python.org/', None),
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None)}
intersphinx_mapping = {'python': ('https://docs.python.org/3', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'scipy': ('https://docs.scipy.org/doc/scipy/', None)}
8 changes: 4 additions & 4 deletions docs/example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Monophonic resampling

The following code block demonstrates how to resample an audio signal.

We use `librosa <https://bmcfee.github.io/librosa/>`_ for loading the audio,
We use `librosa <https://librosa.org/>`_ for loading the audio,
but this is purely for ease of demonstration. `resampy` does not depend on `librosa`.

.. code-block:: python
Expand All @@ -15,7 +15,7 @@ but this is purely for ease of demonstration. `resampy` does not depend on `lib
import resampy
# Load in librosa's example audio file at its native sampling rate
x, sr_orig = librosa.load(librosa.util.example_audio_file(), sr=None)
x, sr_orig = librosa.load(librosa.ex('trumpet'), sr=None)
# x is now a 1-d numpy array, with `sr_orig` audio samples per second
Expand All @@ -39,7 +39,7 @@ resampling, as demonstrated below.
# Load in librosa's example audio file at its native sampling rate.
# This time, also disable the stereo->mono downmixing
x, sr_orig = librosa.load(librosa.util.example_audio_file(), sr=None, mono=False)
x, sr_orig = librosa.load(librosa.ex('trumpet', hq=True), sr=None, mono=False)
# x is now a 2-d numpy array, with `sr_orig` audio samples per second
# The first dimension of x indexes the channels, the second dimension indexes
Expand Down Expand Up @@ -85,7 +85,7 @@ resampy allows you to control the design of the filters used in resampling opera
import resampy
# Load in some audio
x, sr_orig = librosa.load(librosa.util.example_audio_file(), sr=None, mono=False)
x, sr_orig = librosa.load(librosa.ex('trumpet'), sr=None, mono=False)
# Resample to 22050Hz using a Hann-windowed sinc-filter
y = resampy.resample(x, sr_orig, sr_new, filter='sinc_window', window=scipy.signal.hann)
Expand Down
2 changes: 1 addition & 1 deletion resampy/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
>>> resampy.resample(x, sr_orig, sr_new, filter='sinc_window',
... **kwargs) # doctest: +SKIP
where ``**kwargs`` are additional parameters to `resampy.filters.sinc_window`_.
where ``**kwargs`` are additional parameters to `sinc_window`.
'''

Expand Down

0 comments on commit 5bfb438

Please sign in to comment.