Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing @stencil docs to correctly reflect func_or_mode param #3594

Merged
merged 4 commits into from
Dec 18, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 8 additions & 7 deletions docs/source/user/stencil.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,10 @@ simple expressions if possible. For example::
Stencil decorator options
=========================

While the stencil decorator may be augmented in the future to
provide additional mechanisms for border handling, at the moment
the stencil decorator currently supports only one option.
.. note::
The stencil decorator may be augmented in the future to provide additional
mechanisms for border handling. At present, only one behaviour is
implemented, ``"constant"`` (see ``func_or_mode`` below for details).

.. _stencil-neighborhood:

Expand Down Expand Up @@ -171,10 +172,10 @@ specified neighborhood, **the behavior is undefined.**

.. _stencil-mode:

``mode``
--------
``func_or_mode``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Title underline needs extending to the same number of chars as the title. Docs are built with warning-as-error so I think this will fail to build.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AaronCritchley, I've fixed this in b7d223f.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing, sorry for not catching this, I didn't build the docs after my change, lesson learnt 馃槃

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem. Thanks for instigating these changes, the stencil options read better now!

----------------

The optional mode parameter controls how the border of the output array
The optional ``func_or_mode`` parameter controls how the border of the output array
is handled. Currently, there is only one supported value, ``"constant"``.
In ``constant`` mode, the stencil kernel is not applied in cases where
the kernel would access elements outside the valid range of the input
Expand All @@ -186,7 +187,7 @@ to a constant value, as specified by the ``cval`` parameter.

The optional cval parameter defaults to zero but can be set to any
desired value, which is then used for the border of the output array
if the mode parameter is set to ``constant``. The cval parameter is
if the ``func_or_mode`` parameter is set to ``constant``. The cval parameter is
ignored in all other modes. The type of the cval parameter must match
the return type of the stencil kernel. If the user wishes the output
array to be constructed from a particular type then they should ensure
Expand Down