Conversation
MultinomialSampler expects a Vector
|
Here are some points for discussion. There are some distributions (e.g. There are other distributions like For more complete support, a PR to PDMats is probably needed to ensure that |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2009 +/- ##
=======================================
Coverage 86.45% 86.45%
=======================================
Files 147 147
Lines 8838 8846 +8
=======================================
+ Hits 7641 7648 +7
- Misses 1197 1198 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
A review. |
As discussed in #734, this PR adds
axes(::Sampleable{<:ArraylikeVariate})to the API. It also makes the following changes:axesnow returns axes from a parameter array when reasonablerandnow initializes the container usingsimilarand the distribution's axesmean,var,cov,cor,minimum, andmaximum, when implemented, now use the distribution's axes (or are rewritten so that they preserve the parameter array's axes already)For non-1-based indexed arrays (e.g. OffsetArrays), these changes cause some methods to fail that previously succeeded; this seems to be due to many methods in LinearAlgebra requiring 1-based indexing.
Example
Here's an example of the new behavior using
DimensionalData.DimArray, which has its own custom axis type:To-Do
axesfor distributionsaxesinrandaxesin estimates