Add docstring content to docs website#2047
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2047 +/- ##
=======================================
Coverage 86.62% 86.62%
=======================================
Files 148 148
Lines 8903 8903
=======================================
Hits 7712 7712
Misses 1191 1191 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| `MatrixDistribution`s can be reshaped. | ||
|
|
||
| ```@docs | ||
| Distributions.ReshapedDistribution |
There was a problem hiding this comment.
This is internal, users should only use reshape.
| Distributions.ReshapedDistribution |
There was a problem hiding this comment.
The docstring for reshape does link to ReshapedDistribution, and I added this so that the cross-reference link has a target. Should I remove the @ref to ReshapedDistribution from the reshape docstring instead?
There was a problem hiding this comment.
Yes, probably it should be removed from the docstring. I assume the intention was to explain the default fallback but as mentioned in the docstring that one is not exported and its constructor shouldn't be used.
| """ | ||
| loglikelihood(d::UnivariateDistribution, x) | ||
|
|
||
| The log-likelihood of distribution `d` with respect to `x`. | ||
|
|
||
| Here, `x` can be any output of `rand(d, dims...)` and `rand!(d, x)`. | ||
| For univariate distributions, `x` therfore must be a scalar or | ||
| an array with an arbitrary number of dimensions. | ||
| """ |
There was a problem hiding this comment.
This is already covered by
Distributions.jl/src/common.jl
Lines 450 to 460 in 8c7dd0d
There was a problem hiding this comment.
Hmm. I did basically copy it from that docstring, to cover the docstring requested in univariate.md, line 76. Should the signature for that method be replaced with the method defined in common.jl? It did seem weird that there was a docstring listing for a method that didn't have those specific types, but I wasn't sure if there was a specific documentation need that was served, with the implementation still being the same somehow.
There was a problem hiding this comment.
Hmm, no, the generic method is the relevant one in this case as well. I'm not sure what's the best way to handle this.
loglikelihoodmethodfit(D, x)method