-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add a type guard for intX
(#4569)
#6319
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
Conversation
* add type guard for inX * fix test for pandas * fix posterior test, ints passed for float data Closes pymc-devs#4279
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6319 +/- ##
===========================================
- Coverage 94.24% 82.41% -11.84%
===========================================
Files 111 111
Lines 23930 23936 +6
===========================================
- Hits 22553 19727 -2826
- Misses 1377 4209 +2832
|
70770e4
to
7c86ed7
Compare
The original issue was about not downcasting int64 to int32, I think it's fine to still apply the old rule in we don't have either of those |
I'm not sure what you mean. Should we proceed here, or close this and #4279 was wontfix? |
This issue was raised because of some discrete likelihoods were overflowed in float32 mode essentially due to int downcasting. The typeguard prevented unintentional downcast if input is already int |
Basically we want to prevent downcasting but not upcasting which the original fix also prevented. If you still allow upcasting you won't see the issues you were trying to fix in the new commit |
stale |
These are the changes from #4569 cherry-picked from 3447619 on the
v3
branch.Closes #4279
Checklist
intX
#4569)Major / Breaking Changes
Bugfixes / New features
Docs / Maintenance