提交 3e55a209 authored 作者: Virgile Andreani's avatar Virgile Andreani 提交者: Thomas Wiecki

Enable sphinx-lint pre-commit hook

上级 a8735971
......@@ -21,6 +21,11 @@ repos:
pytensor/tensor/variable\.py|
)$
- id: check-merge-conflict
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v1.0.0
hooks:
- id: sphinx-lint
args: ["."]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.5
hooks:
......
......@@ -152,7 +152,7 @@ This distance between consecutive elements of an array over a given dimension,
is called the stride of that dimension.
Accessing NumPy :class`ndarray`\s' data and properties
Accessing NumPy :class:`ndarray`'s data and properties
------------------------------------------------------
The following macros serve to access various attributes of NumPy :class:`ndarray`\s.
......
......@@ -60,7 +60,7 @@ could also have any data type (e.g. floats, ints), so our implementation
must be able to handle all the possible data types.
It also tells us that there's only one return value, that it has a data type
determined by :meth:`x.type()` i.e., the data type of the original tensor.
determined by :meth:`x.type` i.e., the data type of the original tensor.
This implies that the result is necessarily a matrix.
Some class may have a more complex behavior. For example, the :class:`CumOp`\ :class:`Op`
......
......@@ -333,7 +333,7 @@ returns eitehr a new transferred variable (which can be the same as
the input if no transfer is necessary) or returns None if the transfer
can't be done.
Then register that function by calling :func:`register_transfer()`
Then register that function by calling :func:`register_transfer`
with it as argument.
An example
......
......@@ -36,7 +36,7 @@ The ``inputs`` argument to ``pytensor.function`` is a list, containing the ``Var
``self.<name>``. The default value is ``None``.
``value``: literal or ``Container``. The initial/default value for this
input. If update is`` None``, this input acts just like
input. If update is ``None``, this input acts just like
an argument with a default value in Python. If update is not ``None``,
changes to this
value will "stick around", whether due to an update or a user's
......
......@@ -226,7 +226,7 @@ import ``pytensor`` and print the config variable, as in:
in the future.
The ``'numpy+floatX'`` setting attempts to mimic NumPy casting rules,
although it prefers to use ``float32` `numbers instead of ``float64`` when
although it prefers to use ``float32`` numbers instead of ``float64`` when
``config.floatX`` is set to ``'float32'`` and the associated data is not
explicitly typed as ``float64`` (e.g. regular Python floats). Note that
``'numpy+floatX'`` is not currently behaving exactly as planned (it is a
......
......@@ -1064,7 +1064,7 @@ Reductions
inner summation. This will not necessarily be the dtype of the
output (in particular if it is a discrete (int/uint) dtype, the
output will be in a float type). If None, then we use the same
rules as :func:`sum()`.
rules as :func:`sum`.
:Returns: mean value of *x* along *axis*
`axis` can be:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论