Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC/WIP: coercion "cascades" for MvNormal #1823

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Jan 12, 2024

  1. 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).
    timholy committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    dfc4fec View commit details
    Browse the repository at this point in the history
  2. fix pdmat call

    timholy committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    b186342 View commit details
    Browse the repository at this point in the history