SciML / DiffEqNoiseProcess.jl

A library of noise processes for stochastic systems like stochastic differential equations (SDEs) and other systems that are present in scientific machine learning (SciML)
https://docs.sciml.ai/DiffEqNoiseProcess/stable/
Other
63 stars 29 forks source link

fixed dispatch wiener_rand #157

Closed Jonas-a-Zimmermann closed 1 year ago

Jonas-a-Zimmermann commented 1 year ago

Solves the issue #156

Fixes Dispatch issue of function wiener_randn(rng::AbstractRNG, proto::Array{T}) where {T} where this would always be invoked, even for complexvalued arrays.

Furthermore Random.randn(Complex) includes the normation factor 1/sqrt(2), such that no specialisation is nececcary.

ChrisRackauckas commented 1 year ago

Was that ever fixed in Base? I was the one doing the PR and forgot about it 😅

ChrisRackauckas commented 1 year ago

https://github.com/JuliaLang/julia/issues/21859 https://github.com/JuliaLang/julia/pull/21858 https://github.com/JuliaLang/julia/pull/21973

Okay yeah the randn part was added.