forked from JuliaStats/Distributions.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RFC/WIP: coercion "cascades" for MvNormal
This redesigns the constructors of `MvNormal` to: - check argument consistency in the inner constructor - support "coercion," for example `MvNormal{Float32}(μ, Σ)` will enforce that the result has eltype `Float32` - cascade coercion among the multiple type parameters The benefits of this design are subtle but significant, as it allows the user to specify intent, allows the constructors to accept input arguments that are not (yet) consistent with the desired output types (e.g., `MvNormal{Float64}(Any[1,2], I)`), and makes it easy for developers to "propagate" consistent types across the code base (e.g., fixes JuliaStats#1544).
- Loading branch information
Showing
1 changed file
with
41 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters