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