Skip to content

Add tensor_like to glossary #5498

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"notfound.extension",
"sphinx_copybutton",
"sphinx_remove_toctrees",
"jupyter_sphinx",
]

# Don't auto-generate summary for class members.
Expand All @@ -74,8 +75,10 @@
"MultiTrace": ":class:`~pymc.backends.base.MultiTrace`",
"BaseTrace": ":class:`~pymc.backends.base.BaseTrace`",
"Point": ":class:`~pymc.Point`",
"Model": ":class:`~pymc.Model`",
"SMC_kernel": ":ref:`SMC Kernel <smc_kernels>`",
"Aesara_Op": ":class:`Aesara Op <aesara.graph.op.Op>`",
"tensor_like": ":term:`tensor_like`",
}

# Show the documentation of __init__ and the class docstring
Expand Down
9 changes: 9 additions & 0 deletions docs/source/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,13 @@ Hierarchical Ordinary Differential Equation
[MCMC](https://en.wikipedia.org/wiki/Markov_chain_Monte_Carlo)
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.

tensor_like
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.

```{jupyter-execute}
import aesara.tensor as at

at.as_tensor_variable([[1, 2.0], [0, 0]])
```

:::::