-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Posterior sampling from pm.Categorical results in strange "ValueError: Need at least 1 and at most 32 array objects" #3567
Comments
Oh no, PR #3563 brought some unforseen problems with it... This was an incredibly obscure error! It looks like theano uses numpy's implementation of Taken verbatim from the numpy docs:
So the The conclusion is that switching to |
reverting in #3568 |
@twiecki, Or maybe we could bring something like this up at numpy as an issue and hope they fix it? There shouldn't be a problem for them to get a multiindex out of a single array. |
I opened an issue at numpy asking for them to lift the limit for arrays. |
Thank you especially for quick response - my code works again! |
Be aware that with #3535 open again, multidimensional categoricals don't only use up more memory than they should, they also produce incorrect |
@lucianopaz Thank you for worrying As for my situation, my code for sampling from a categorical distribution was not involved in inference. So I assumed I was safe. However, I will keep in mind your notion for the future |
While doing posterior sampling from Categorical, I get a strange Value error. The same code works on previous version of PyMC3 3.7.rc1, but not working with the latest version 3.7.
Description of your problem
Please provide a minimal, self-contained, and reproducible example.
Here, I will omit most of the code, but mainly I create a matrix p that consists of values between zero and one. I add the column to the right to make sure that every row contains at least one value greater than zero.
Please provide the full traceback.
Please provide any additional information below.
I have seen a similar complaint on discorse https://discourse.pymc.io/t/random-method-for-interpolated-rvs/3205/2, but I was unable to find if that reported bug was fixed. Maybe @lucianopaz would be kind to give some update. Thanks a lot in advance.
Versions and main components
The text was updated successfully, but these errors were encountered: