David Widmann

Results 1463 comments of David Widmann

There are two different aspects: The `len` precomputation for repeated calls of `rand` should be addressed separately from the general `rand` interface design question. IMO the most natural way to...

Possibly duplicate of https://github.com/JuliaStats/Distributions.jl/issues/1611?

The main reason for the current behaviour is rooted in the historical development process. Initially, only Float64 was supported and was hardcoded in many places. Over time these restrictions were...

> One challenge is that eltype for a distribution d doesn't tell us what type rand(d) will return. The worst case here is LKJCholesky, for which the eltype is Float64,...

No, that's not what `eltype` is supposed to give you currently. It is intended to return the element type of a single variate (e.g., `Float64` for a `MvNormal` whose variates...

> In which package is randtype defined? I have not heard of it. Sorry, I misremembered, it's called `gentype`. It's defined in Random, it also appeared in some discussion in...

> what do you think about this proposed docs restructure? I think it's reasonable to move it.

IMO this needs more thought as it affects much more than just `Exponential` (see https://github.com/JuliaStats/Distributions.jl/issues/1684). I also agree that the checks introduced in this PR are suboptimal.

Presumably there's no documentation because people strongly disagree about the design and its implications, as shown in #1071 and its many duplicates. I had a go at it (and some...

It's a deliberate design choice that `rand` returns samples of type `Float64`. There are multiple discussions in this repo about `eltype`/`partype` and `rand`, that also explain and discuss the current...