Closed mjskay closed 1 year ago
Another minor bugfix on categorical dists. Probably not worthy of a news item (but I can write one if you'd like).
Basically, there's some weird behavior in density.dist_categorical() due to R's indexing rules when i <= 0:
density.dist_categorical()
i <= 0
> density(dist_categorical(list(1:3)), -1) [1] 0.3333333 0.5000000 > density(dist_categorical(list(1:3)), 0) numeric(0)
With the fix:
> density(dist_categorical(list(1:3)), -1) [1] NA > density(dist_categorical(list(1:3)), 0) [1] NA
Great, thanks! I'll summarise the NEWS as bug fixes with links to the PR when I prepare a release.
Cool thanks!
Another minor bugfix on categorical dists. Probably not worthy of a news item (but I can write one if you'd like).
Basically, there's some weird behavior in
density.dist_categorical()
due to R's indexing rules wheni <= 0
:With the fix: