-
Notifications
You must be signed in to change notification settings - Fork 422
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
DiscreteNonParametric
and Categorical
Construction Issue
#1832
Comments
Just an anecdote, I'm hitting the performance implication of this issue. I'm running discrete event simulations that construct |
Did you compare it with #1908? |
Yes PR 1908 looks like it fixes this issue, thanks. Is there anything blocking it being merged? |
It hasn't been approved yet. |
Construction of a
Categorical
distribution seems to make a copy of thep
vector. I see this through profiling,@btime
and the fact that I can't see changes in the original vector after I create theCategorical
. There are three issues I see:Categorical
docstring includes the following: "Note: The input vectorp
is directly used as a field of the constructed distribution, without being copied." which seems incorrect.I believe the underlying issue is that the
DiscreteNonParametric
inner constructor tries to sort and reorder everything, which creates a copy and then the constructor doesn't update the type.The text was updated successfully, but these errors were encountered: