-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Shape mismatch when using pm.Data #3631
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
Comments
5 tasks
@fonnesbeck to reproduce this, one needs to replace |
Closed
This has been fixed with the lazy initial point computation in #4983, including this test that covers the same issue as here: pymc/pymc/tests/test_initvals.py Lines 102 to 113 in 3c87e7d
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm following the example for
pm.Data
given here: https://medium.com/@pymc_devs/pymc-3-7-making-data-a-first-class-citizen-7ed87fe4bcc5.The following adaptation works. Note that I have scaled spin_rate in the DataFrame, rather than scaling it when calculating the latent θ. To compensate I have specified
(spin / 1)
instead of(spin / 1000)
.Now surely, dividing
spin
by 1 is unnecessary, so we can replace that line with:θ = β[0] + β[1] * spin
. But, when I do this (keeping every other line exactly the same), I get the following error:Where 6 is the shape of the new data and 5 is the shape of the old data.
This seems like a rather bizarre error. Any ideas what's going on?
Versions and main components
The text was updated successfully, but these errors were encountered: