Commit 6694be52 authored by Florent Jaillet's avatar Florent Jaillet

Remove sphinx-paramlinks which doesn't work when using numpydoc syntax

parent af54a8ae
Pipeline #613 passed with stage
in 21 seconds
# run the test suite # run the test suite
tests: tests:
image: registry.gitlab.lis-lab.fr:5005/skmad-suite/madarrays/ubuntu:18.04 image: registry.gitlab.lis-lab.fr:5005/skmad-suite/madarrays/ubuntu:18.04
tags: tags:
- docker - docker
script: script:
- pip3 install . --no-deps - pip3 install --no-deps .
- pytest-3 - pytest-3
# generate the documentation # generate the documentation
pages: pages:
image: registry.gitlab.lis-lab.fr:5005/skmad-suite/madarrays/ubuntu:18.04 image: registry.gitlab.lis-lab.fr:5005/skmad-suite/madarrays/ubuntu:18.04
tags: tags:
...@@ -18,7 +15,7 @@ pages: ...@@ -18,7 +15,7 @@ pages:
only: only:
- master - master
script: script:
- pip3 install . --no-deps - pip3 install --no-deps .
- python3 setup.py build_sphinx - python3 setup.py build_sphinx
- cp -r build/sphinx/html public - cp -r build/sphinx/html public
artifacts: artifacts:
......
...@@ -25,7 +25,6 @@ extensions = ['sphinx.ext.autodoc', ...@@ -25,7 +25,6 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.coverage', 'sphinx.ext.coverage',
'sphinx.ext.mathjax', 'sphinx.ext.mathjax',
'sphinx.ext.viewcode', 'sphinx.ext.viewcode',
'sphinx_paramlinks',
'numpydoc', 'numpydoc',
'nbsphinx', 'nbsphinx',
'IPython.sphinxext.ipython_console_highlighting', 'IPython.sphinxext.ipython_console_highlighting',
...@@ -48,7 +47,7 @@ master_doc = 'index' ...@@ -48,7 +47,7 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = 'madarrays' project = 'madarrays'
author = 'V. Emiya and R. Hamon' author = 'V. Emiya, R. Hamon, F. Jaillet'
copyright = '2017-{}, {}'.format(date.today().year, author) copyright = '2017-{}, {}'.format(date.today().year, author)
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
...@@ -217,7 +216,7 @@ latex_elements = { ...@@ -217,7 +216,7 @@ latex_elements = {
# author, documentclass [howto, manual, or own class]). # author, documentclass [howto, manual, or own class]).
latex_documents = [ latex_documents = [
(master_doc, 'madarray.tex', 'madarray Documentation', (master_doc, 'madarray.tex', 'madarray Documentation',
'V. Emiya, R. Hamon.', 'manual'), 'V. Emiya, R. Hamon., F. Jaillet', 'manual'),
] ]
# The name of an image file (relative to this directory) to place at the top of # The name of an image file (relative to this directory) to place at the top of
......
...@@ -4,7 +4,7 @@ WORKDIR / ...@@ -4,7 +4,7 @@ WORKDIR /
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
# In the following "apt-get install ..." command, cmake, make, g++, # In the following "apt-get install ..." command, cmake, make, g++,
# libfftw3-dev, and liblapack-dev are not needed for madarrays but are added # libfftw3-dev, and liblapack-dev are not needed for madarrays but are added
# to be able to install ltfatpy via pip # to be able to install ltfatpy in the container via pip
RUN apt-get update && \ RUN apt-get update && \
apt-get upgrade -y && \ apt-get upgrade -y && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
...@@ -25,7 +25,6 @@ RUN apt-get update && \ ...@@ -25,7 +25,6 @@ RUN apt-get update && \
python3-pytest \ python3-pytest \
python3-pytest-cov \ python3-pytest-cov \
python3-sphinx \ python3-sphinx \
python3-sphinx-paramlinks \
python3-numpydoc \ python3-numpydoc \
python3-nbsphinx \ python3-nbsphinx \
jupyter-client \ jupyter-client \
......
...@@ -116,8 +116,8 @@ class MadArray(np.ndarray): ...@@ -116,8 +116,8 @@ class MadArray(np.ndarray):
whose entries are equal to True if the corresponding data entry is whose entries are equal to True if the corresponding data entry is
masked, or False otherwise. masked, or False otherwise.
This is the default mode and the mode selected when specifying This is the default mode and the mode selected when specifying ``mask``
:paramref:`mask` during creation. during creation.
* Complex entries can have only the magnitude or phase component masked, or * Complex entries can have only the magnitude or phase component masked, or
both. The resulting mask has integers entries, equal to: both. The resulting mask has integers entries, equal to:
...@@ -129,13 +129,12 @@ class MadArray(np.ndarray): ...@@ -129,13 +129,12 @@ class MadArray(np.ndarray):
* *3* if the magnitude and the phase are masked (unknown magnitude and * *3* if the magnitude and the phase are masked (unknown magnitude and
phase). phase).
This mode is selected when specifying :paramref:`mask_magnitude` and/or This mode is selected when specifying ``mask_magnitude`` and/or
:paramref:`mask_phase` during creation. ``mask_phase`` during creation.
Entries are converted to a complex type. Entries are converted to a complex type.
If entries are complex values and :paramref:`mask` is given during If entries are complex values and ``mask`` is given during creation, both
creation, both the magnitude and phase are masked and the boolean mask the magnitude and phase are masked and the boolean mask mode is used.
mode is used.
.. _indexing_madarray: .. _indexing_madarray:
...@@ -145,35 +144,34 @@ class MadArray(np.ndarray): ...@@ -145,35 +144,34 @@ class MadArray(np.ndarray):
* a :class:`MadArray` object with shape corresponding to the indices is * a :class:`MadArray` object with shape corresponding to the indices is
returned, with both the data matrix and the mask properly indexed. This returned, with both the data matrix and the mask properly indexed. This
is the default mode; is the default mode;
* a :class:`MadArray` object with unchanged shape is returned, * a :class:`MadArray` object with unchanged shape is returned, where
where non-indexed entries are set as masked. This mode is selected by non-indexed entries are set as masked. This mode is selected by setting
setting the parameter :paramref:`masked_indexing` to True. the parameter ``masked_indexing`` to True.
.. _numpy_behaviour_madarray: .. _numpy_behaviour_madarray:
**Numpy behaviour**: it is possible to use standard operations (+, -, /, **Numpy behaviour**: it is possible to use standard operations (+, -, /,
//, \*, T) between two :class:`MadArray` objects, likewise operations //, \*, T) between two :class:`MadArray` objects, likewise operations
between numpy between numpy arrays. The resulting object has a mask consisting of the
arrays. The resulting object has a mask consisting of the union of the union of the operands. It is also possible to use pickle operations to
operands. It is also possible to use pickle operations to jointly store the jointly store the data and the mask.
data and the mask.
Parameters Parameters
---------- ----------
data : array_like data : array_like
Multidimensional array. See :ref:`Type of Entry<type_entry_madarray>`. Multidimensional array. See :ref:`Type of Entry<type_entry_madarray>`.
mask : boolean array_like, optional mask : boolean array_like, optional
Mask for boolean masking mode. See Mask for boolean masking mode.
:ref:`Masking<masking_madarray>`. See :ref:`Masking<masking_madarray>`.
mask_magnitude : boolean array_like or None, optional mask_magnitude : boolean array_like or None, optional
Magnitude mask for masking with complex data. See Magnitude mask for masking with complex data.
:ref:`Masking<masking_madarray>`. See :ref:`Masking<masking_madarray>`.
mask_phase : boolean or array_like or None, optional mask_phase : boolean or array_like or None, optional
Phase mask for masking with complex data. See Phase mask for masking with complex data.
:ref:`Masking<masking_madarray>`. See :ref:`Masking<masking_madarray>`.
masked_indexing : bool or None, optional masked_indexing : bool or None, optional
Indicate how the indexing is performed. If None, set to False. See Indicate how the indexing is performed. If None, set to False.
:ref:`Indexing<indexing_madarray>`. See :ref:`Indexing<indexing_madarray>`.
Warnings Warnings
-------- --------
...@@ -189,7 +187,7 @@ class MadArray(np.ndarray): ...@@ -189,7 +187,7 @@ class MadArray(np.ndarray):
Notes Notes
----- -----
This class implements an alternative masked array different from This class implements an alternative masked array different from
:class:`np.ma.MaskedArray`. The reason of this choice is that it is only :class:`numpy.ma.MaskedArray`. The reason of this choice is that it is only
used as a container of a ndarray and a mask. No masked operations are used as a container of a ndarray and a mask. No masked operations are
needed. needed.
""" """
...@@ -385,8 +383,7 @@ class MadArray(np.ndarray): ...@@ -385,8 +383,7 @@ class MadArray(np.ndarray):
"""Number of missing data (double or tuple). """Number of missing data (double or tuple).
Number of masked coefficients if dtype is int or float. Number of Number of masked coefficients if dtype is int or float. Number of
masked coefficients in phase and magnitude masks if dtype is masked coefficients in phase and magnitude masks if dtype is complex.
complex.
""" """
if self._complex_masking: if self._complex_masking:
return (np.sum(self.get_unknown_mask('magnitude')), return (np.sum(self.get_unknown_mask('magnitude')),
...@@ -399,8 +396,7 @@ class MadArray(np.ndarray): ...@@ -399,8 +396,7 @@ class MadArray(np.ndarray):
"""Ratio of missing data (double or tuple). """Ratio of missing data (double or tuple).
Ratio of masked coefficients if dtype is int or float. Ratio of Ratio of masked coefficients if dtype is int or float. Ratio of
masked coefficients in phase and magnitude masks if dtype is masked coefficients in phase and magnitude masks if dtype is complex.
complex.
""" """
if self._complex_masking: if self._complex_masking:
return (np.average(self.get_unknown_mask('magnitude')), return (np.average(self.get_unknown_mask('magnitude')),
...@@ -415,16 +411,16 @@ class MadArray(np.ndarray): ...@@ -415,16 +411,16 @@ class MadArray(np.ndarray):
def to_np_array(self, fill_value=None): def to_np_array(self, fill_value=None):
"""Return a numpy array. """Return a numpy array.
If :paramref:`fill_value` is not None, masked elements are replaced If ``fill_value`` is not None, masked elements are replaced according
according to the type of entries: to the type of entries:
* :paramref:`fill_value` if the type of entries is *int* or *float*; * ``fill_value`` if the type of entries is *int* or *float*;
* If the type is *complex*, missing entries are replaced either by: * If the type is *complex*, missing entries are replaced either by:
* a complex number with the known magnitude value without the phase * a complex number with the known magnitude value without the phase
information if only the phase is masked; information if only the phase is masked;
* a complex number of magnitude 1 with the known phase if only the * a complex number of magnitude 1 with the known phase if only the
magnitude is masked; magnitude is masked;
* by :paramref:`fill_value` if both magnitude and phase are masked. * by ``fill_value`` if both magnitude and phase are masked.
Parameters Parameters
---------- ----------
......
...@@ -136,11 +136,11 @@ class Waveform(MadArray): ...@@ -136,11 +136,11 @@ class Waveform(MadArray):
[N, 2]-shape array for a stereo signal [N, 2]-shape array for a stereo signal
fs : int or float, optional fs : int or float, optional
Sampling frequency of the original signal, in Hz. If float, truncated. Sampling frequency of the original signal, in Hz. If float, truncated.
If None and :paramref:`data` is a Waveform, use `data.fs`, otherwise it If None and ``data`` is a Waveform, use ``data.fs``, otherwise it
is set to 1. is set to 1.
mask : nd-array, optional mask : nd-array, optional
Boolean mask with True values for missing samples. Its shape must be Boolean mask with True values for missing samples. Its shape must be
the same as :paramref:`data`. the same as ``data``.
indexing : indexing :
See :class:`MadArray`. See :class:`MadArray`.
""" """
......
...@@ -4,4 +4,3 @@ sphinx ...@@ -4,4 +4,3 @@ sphinx
nbsphinx nbsphinx
numpydoc numpydoc
jupyter jupyter
sphinx-paramlinks
...@@ -73,7 +73,7 @@ CLASSIFIERS = [ ...@@ -73,7 +73,7 @@ CLASSIFIERS = [
PYTHON_REQUIRES = '>=3.5' PYTHON_REQUIRES = '>=3.5'
EXTRAS_REQUIRE = { EXTRAS_REQUIRE = {
'dev': ['coverage', 'pytest', 'pytest-cov', 'pytest-randomly', 'ipython'], 'dev': ['coverage', 'pytest', 'pytest-cov', 'pytest-randomly', 'ipython'],
'doc': ['sphinx', 'nbsphinx', 'numpydoc', 'sphinx-paramlinks']} 'doc': ['sphinx', 'nbsphinx', 'numpydoc']}
PROJECT_URLS = {'Bug Reports': URL + '/issues', PROJECT_URLS = {'Bug Reports': URL + '/issues',
'Source': URL} 'Source': URL}
KEYWORDS = 'audio, data structures, missing data' KEYWORDS = 'audio, data structures, missing data'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment