Add gufunc signature to RandomVariable's docstrings#1160
Add gufunc signature to RandomVariable's docstrings#1160brandonwillard merged 1 commit intoaesara-devs:mainfrom
RandomVariable's docstrings#1160Conversation
RandomVariable\'s docstringsRandomVariable's docstrings
|
This work is part of #695. We need to create a single, consistent interface for this information and apply it to all the (effectively) block-wise |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1160 +/- ##
==========================================
+ Coverage 79.14% 79.35% +0.21%
==========================================
Files 173 161 -12
Lines 48528 48282 -246
Branches 10322 10962 +640
==========================================
- Hits 38408 38316 -92
+ Misses 7628 7454 -174
- Partials 2492 2512 +20
|
|
Regardless of how we implement the interface we need to communicate how the current shape systems works to the users in the documentation, and I think gufunc signatures are the right tool for that. |
ricardoV94
left a comment
There was a problem hiding this comment.
I think those two were wrong
|
They were! |
ac3e073 to
0dd1d51
Compare
|
Squashed the commits. |
8fd15a0 to
63410a7
Compare
|
Should we merge this? This documents the current behavior of |
brandonwillard
left a comment
There was a problem hiding this comment.
Given how many of these are scalars and, as a result, have trivial signatures, it's hard to say how useful those particular cases are.
Regardless, it doesn't hurt to add them, but we need to do something about the gufunc/RandomVariable comment before that.
63410a7 to
5b0a4bb
Compare
5b0a4bb to
52f5402
Compare
Co-authored-by: Ricardo Vieira <[email protected]>
52f5402 to
4b3af51
Compare
In this PR I add gufunc signatures to the
RandomVariables docstrings. The notation is clear and concise; with knoweldge of broadcasting rules and the definition ofsizethe signature makes shapes predictible.Most distributions behave like
ElemwiseOps, with the exception of:(), (n) -> (n)(k) -> (k)(n), (n,n) -> (n)(p) -> ()(x) -> ()(x) -> (x)