You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we are passing tuple (tuple is a valid data-structure for total_size) for total_size as an argument in _get_scaling() we are getting TypeError instead of ValueError even though it should raise a ValueError and this is all because of the use of old-style formatting.
Example:
When we pass a tuple containing more than one Ellipsis it should raise a ValueError but instead of that, it is throwing TypeError.
Please provide a minimal, self-contained, and reproducible example.
The text was updated successfully, but these errors were encountered:
ricardoV94
changed the title
Valid tuple input for total_size in _get_scaling (pymc.distributions.logprob._get_scaling()) is throwing an unexpected error.
_get_scaling raises TypeError due to misformatted message
Mar 6, 2022
Description of your problem
When we are passing tuple (tuple is a valid data-structure for total_size) for
total_size
as an argument in_get_scaling()
we are gettingTypeError
instead ofValueError
even though it should raise aValueError
and this is all because of the use of old-style formatting.Example:
When we pass a tuple containing more than one
Ellipsis
it should raise aValueError
but instead of that, it is throwingTypeError
.Please provide a minimal, self-contained, and reproducible example.
Please provide the full traceback.
pymc.distributions.logprob._get_scaling()
Please provide any additional information below.
The above-mentioned issue can be solved by replacing
in _get_scaling() by
Since in present version of code it is trying to unpack the tuple elements which leads to error.
Versions and main components
4.0.0b2
2.3.8
3.8.12
Windows 10 Pro, Version: 21H1, OS Build: 19043.1566
conda
Related To: #5544
The text was updated successfully, but these errors were encountered: