Skip to content

Commit

Permalink
[doc][api][info] Provide machine-independant docstrings.
Browse files Browse the repository at this point in the history
  • Loading branch information
SepandKashani committed Sep 15, 2023
1 parent ff7b16b commit 3f0e8f6
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/api/info.deps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ pyxu.info.deps

.. automodule:: pyxu.info.deps
:members:
:exclude-members: CUPY_ENABLED
:undoc-members:
:show-inheritance:

.. autodata:: CUPY_ENABLED
:no-value:
48 changes: 48 additions & 0 deletions doc/api/info.ptype.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,52 @@
pyxu.info.ptype
===============

.. [Sepand, 2023.09.15]
.. `pyxu.info.ptype` contains alias types for Python type checkers. When auto-documented via Sphinx, alias types
.. contain "alias of ..." as part of their docstring, which depends on the machine config. (Was unable to remove them
.. via Sphinx's `autodoc-process-docstring` event.) To avoid machine-dependant outputs in HTML docs, we provide custom
.. machine-agnostic documentation for some aliases as required. Provided descriptions match those given as comments in
.. `pyxu.info.ptype`.
.. automodule:: pyxu.info.ptype
:exclude-members: NDArray, ArrayModule, SparseArray, SparseModule, OpT, Property, SolverT, SolverM, Real, DType

.. class:: NDArray

Supported dense array types.

.. class:: ArrayModule

Supported dense array modules.

.. class:: SparseArray

Supported sparse array types.

.. class:: SparseModule

Supported sparse array modules.

.. class:: OpT

Top-level abstract :py:class:`~pyxu.abc.Operator` interface exposed to users.

.. autodata:: Property
:no-value:

.. class:: SolverT

Top-level abstract :py:class:`~pyxu.abc.Solver` interface exposed to users.

.. class:: SolverM

Solver run-mode(s).

.. class:: Real

Alias of :py:class:`numbers.Real`.

.. data:: DType

:py:attr:`~pyxu.info.ptype.NDArray` dtype specifier.

0 comments on commit 3f0e8f6

Please sign in to comment.