Skip to content

Commit d4ccaa8

Browse files
Add tensor_like to glossary (#5498)
* Add tensor_like to glossary Inspired by numpy array_like Co-authored-by: Oriol Abril-Pla <[email protected]> * Add Model class to numpydoc aliases Co-authored-by: Oriol Abril-Pla <[email protected]> Co-authored-by: Oriol Abril-Pla <[email protected]>
1 parent f119345 commit d4ccaa8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docs/source/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"notfound.extension",
5050
"sphinx_copybutton",
5151
"sphinx_remove_toctrees",
52+
"jupyter_sphinx",
5253
]
5354

5455
# Don't auto-generate summary for class members.
@@ -74,8 +75,10 @@
7475
"MultiTrace": ":class:`~pymc.backends.base.MultiTrace`",
7576
"BaseTrace": ":class:`~pymc.backends.base.BaseTrace`",
7677
"Point": ":class:`~pymc.Point`",
78+
"Model": ":class:`~pymc.Model`",
7779
"SMC_kernel": ":ref:`SMC Kernel <smc_kernels>`",
7880
"Aesara_Op": ":class:`Aesara Op <aesara.graph.op.Op>`",
81+
"tensor_like": ":term:`tensor_like`",
7982
}
8083

8184
# Show the documentation of __init__ and the class docstring

docs/source/glossary.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,13 @@ Hierarchical Ordinary Differential Equation
124124
[MCMC](https://en.wikipedia.org/wiki/Markov_chain_Monte_Carlo)
125125
Markov chain Monte Carlo (MCMC) methods comprise a class of algorithms for sampling from a probability distribution. By constructing a {term}`Markov Chain` that has the desired distribution as its equilibrium distribution, one can obtain a sample of the desired distribution by recording states from the chain. Various algorithms exist for constructing chains, including the Metropolis–Hastings algorithm.
126126

127+
tensor_like
128+
Any scalar or sequence that can be interpreted as a {class}`~aesara.tensor.TensorVariable`. In addition to TensorVariables, this includes NumPy ndarrays, scalars, lists and tuples (possibly nested). Any argument accepted by `aesara.tensor.as_tensor_variable` is tensor_like.
129+
130+
```{jupyter-execute}
131+
import aesara.tensor as at
132+
133+
at.as_tensor_variable([[1, 2.0], [0, 0]])
134+
```
135+
127136
:::::

0 commit comments

Comments
 (0)