From 4334b05a115a0647098af154d925f70b240c2b2d Mon Sep 17 00:00:00 2001 From: Isuru Fernando <isuruf@gmail.com> Date: Wed, 26 Aug 2020 18:17:26 -0500 Subject: [PATCH] More doc fixes --- doc/conf.py | 1 + doc/index.rst | 2 ++ doc/misc.rst | 6 ++++++ sumpy/kernel.py | 2 +- sumpy/point_calculus.py | 6 +++--- sumpy/tools.py | 14 ++++++++++++-- 6 files changed, 25 insertions(+), 6 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index df05aaa3..55d9766a 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -318,4 +318,5 @@ intersphinx_mapping = { 'https://documen.tician.de/pytential/': None, 'https://documen.tician.de/boxtree/': None, 'https://docs.sympy.org/latest/': None, + 'https://matplotlib.org/': None, } diff --git a/doc/index.rst b/doc/index.rst index 516a51a9..26dab1f8 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,6 +1,8 @@ Welcome to sumpy's documentation! ================================= +.. automodule:: sumpy + Example ------- diff --git a/doc/misc.rst b/doc/misc.rst index 113427ed..b728f098 100644 --- a/doc/misc.rst +++ b/doc/misc.rst @@ -1,3 +1,9 @@ +Misc Tools +========== + +.. automodule:: sumpy.tools + + Installation ============ diff --git a/sumpy/kernel.py b/sumpy/kernel.py index 53b8a550..bb96f598 100644 --- a/sumpy/kernel.py +++ b/sumpy/kernel.py @@ -81,7 +81,7 @@ class KernelArgument(object): """ .. attribute:: loopy_arg - A :class:`loopy.Argument` instance describing the type, + A :class:`loopy.KernelArgument` instance describing the type, name, and other features of this kernel argument when passed to a generated piece of code. """ diff --git a/sumpy/point_calculus.py b/sumpy/point_calculus.py index c6f9540d..38a5f05b 100644 --- a/sumpy/point_calculus.py +++ b/sumpy/point_calculus.py @@ -37,9 +37,9 @@ class CalculusPatch(object): """Sets up a grid of points on which derivatives can be calculated. Useful to verify that an evaluated potential actually solves a PDE. - .. attribute: dim + .. attribute:: dim - .. attribute: points + .. attribute:: points shape: ``(dim, npoints_total)`` @@ -118,7 +118,7 @@ class CalculusPatch(object): def basis(self): """ :returns: a :class:`list` containing functions that realize - a high-order interpolation basis on the :attr:`points`. + a high-order interpolation basis on the :py:attr:`points`. """ from pytools import indices_in_shape diff --git a/sumpy/tools.py b/sumpy/tools.py index e55906d0..2a0a8b22 100644 --- a/sumpy/tools.py +++ b/sumpy/tools.py @@ -25,6 +25,15 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +__doc__ = """ + + Misc tools + ========== + + .. autoclass:: BlockIndexRanges + .. autoclass:: MatrixBlockIndexRanges +""" + import six from six.moves import range, zip from pytools import memoize_method, memoize_in @@ -342,6 +351,7 @@ class MatrixBlockIndexRanges(object): .. automethod:: block_shape .. automethod:: block_take .. automethod:: get + .. autoattribute:: linear_row_indices .. automethod:: take """ @@ -392,8 +402,8 @@ class MatrixBlockIndexRanges(object): friends. :return: a copy of `self` in which all data lives on the host, i.e. - all :class:`pyopencl.array.Array` instances are replaces by - :class:`numpy.ndarray` instances. + all :class:`pyopencl.array.Array` instances are replaces by + :class:`numpy.ndarray` instances. """ return MatrixBlockIndexRanges(self.cl_context, row=self.row.get(queue=queue), -- GitLab