-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add experimental dims
module with objects that follow dim-based semantics (like xarray without coordinates)
#7820
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
base: main
Are you sure you want to change the base?
Changes from all commits
97cd9e1
d82330e
80a9fef
21647e4
3869723
954c33c
4817507
a149644
a4032a1
341ffca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ API | |
api/backends | ||
api/misc | ||
api/testing | ||
api/dims | ||
|
||
------------------ | ||
Dimensionality | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,18 @@ | ||||||||||||
.. _api_dims: | ||||||||||||
|
||||||||||||
Dims | ||||||||||||
==== | ||||||||||||
|
||||||||||||
This submodule contains functions for defining distributions and operations that use explicit dimensions. | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would probably add a warning about the module here too |
||||||||||||
|
||||||||||||
The module is presented in :ref:`dims_module`. | ||||||||||||
|
||||||||||||
.. currentmodule:: pymc.dims | ||||||||||||
|
||||||||||||
.. autosummary:: | ||||||||||||
:toctree: generated/ | ||||||||||||
Comment on lines
+10
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should be a toctree directive only as (for now) it is listing other doc pages, not yet pymc objects There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you propose the changes with github comment thing? I'm not sure if I should take autosummary or something else? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried to and didn't work, now it does allow me:
Suggested change
|
||||||||||||
|
||||||||||||
dims/model | ||||||||||||
dims/math | ||||||||||||
dims/distributions | ||||||||||||
dims/transforms |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
******************** | ||
Scalar distributions | ||
******************** | ||
|
||
.. currentmodule:: pymc.dims | ||
.. autosummary:: | ||
:toctree: generated/ | ||
:template: distribution.rst | ||
|
||
Flat | ||
HalfFlat | ||
Normal | ||
HalfNormal | ||
LogNormal | ||
StudentT | ||
HalfStudentT | ||
Cauchy | ||
HalfCauchy | ||
Beta | ||
Laplace | ||
Gamma | ||
InverseGamma | ||
|
||
|
||
******************** | ||
Vector distributions | ||
******************** | ||
|
||
.. currentmodule:: pymc.dims | ||
.. autosummary:: | ||
:toctree: generated/ | ||
:template: distribution.rst | ||
|
||
Categorical | ||
MvNormal | ||
ZeroSumNormal |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*************************************** | ||
Mathematical operations with dimensions | ||
*************************************** | ||
|
||
This module wraps all the mathematical operations defined in :doc:`pytensor.xtensor.math <pytensor:libdoc_xtensor_math>`. | ||
|
||
It includes a ``linalg`` submodule that wraps all the operations defined in :doc:`pytensor.xtensor.linalg <pytensor:libdoc_xtensor_linalg>`. | ||
|
||
Operations defined at the module level in :doc:`pytensor.xtensor <pytensor:libdoc_xtensor_module_function>` are available at the parent model in ``pymc.dims`` instead of in here. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
****************** | ||
Model constructors | ||
****************** | ||
|
||
.. currentmodule:: pymc.dims | ||
.. autosummary:: | ||
:toctree: generated/ | ||
|
||
Data | ||
Deterministic | ||
Potential |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
*********************** | ||
Distribution Transforms | ||
*********************** | ||
|
||
.. currentmodule:: pymc.dims.transforms | ||
.. autosummary:: | ||
:toctree: generated/ | ||
|
||
LogTransform | ||
LogOddsTransform | ||
ZeroSumTransform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current preview of this page: https://pymcio--7820.org.readthedocs.build/projects/docs/en/7820/api/dims.html. I had to enter the url manually because it is not part of the toctree, it should be added to https://github.com/pymc-devs/pymc/blob/main/docs/source/api.rst?plain=1#L7-L25 (adding it here will also make the page have a sidebar like the other api pages)