aesara-devs / aesara

Aesara is a Python library for defining, optimizing, and efficiently evaluating mathematical expressions involving multi-dimensional arrays.
https://aesara.readthedocs.io
Other
1.18k stars 155 forks source link

Create a base type for shared RNG variables #1476

Closed brandonwillard closed 1 year ago

brandonwillard commented 1 year ago

This PR creates a base type for shared RNG variables (i.e. a base class for RandomStateSharedVariable and RandomGeneratorSharedVariable) and fills in some type hints for SharedVariable itself.

codecov[bot] commented 1 year ago

Codecov Report

Merging #1476 (7fa7024) into main (462d8d5) will increase coverage by 0.00%. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://codecov.io/gh/aesara-devs/aesara/pull/1476/graphs/tree.svg?width=650&height=150&src=pr&token=2HNzVWyxrA&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aesara-devs)](https://codecov.io/gh/aesara-devs/aesara/pull/1476?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aesara-devs) ```diff @@ Coverage Diff @@ ## main #1476 +/- ## ======================================= Coverage 75.02% 75.02% ======================================= Files 194 194 Lines 50099 50102 +3 Branches 12096 12096 ======================================= + Hits 37586 37589 +3 Misses 10189 10189 Partials 2324 2324 ``` | [Impacted Files](https://codecov.io/gh/aesara-devs/aesara/pull/1476?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aesara-devs) | Coverage Δ | | |---|---|---| | [aesara/compile/sharedvalue.py](https://codecov.io/gh/aesara-devs/aesara/pull/1476?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aesara-devs#diff-YWVzYXJhL2NvbXBpbGUvc2hhcmVkdmFsdWUucHk=) | `93.75% <100.00%> (ø)` | | | [aesara/tensor/random/var.py](https://codecov.io/gh/aesara-devs/aesara/pull/1476?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aesara-devs#diff-YWVzYXJhL3RlbnNvci9yYW5kb20vdmFyLnB5) | `96.00% <100.00%> (+0.54%)` | :arrow_up: |