Skip to content

Debug message for scalar values fails #7429

Open
@ferrine

Description

@ferrine

for value, fn_eval in zip(values[mask], rv_fn_eval[mask]):

raises an error when variable is scalar

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
Cell In[23], line 1
----> 1 model.debug(fn="dlogp")

File [/dev/pymc/pymc/model/core.py#line=1965), in Model.debug(self, point, fn, verbose)
   1962 print_(
   1963     f"Some of the{observed}values of variable {rv} are associated with a non-finite {fn}:"
   1964 )
   1965 mask = ~np.isfinite(rv_fn_eval)
-> 1966 for value, fn_eval in zip(values[mask], rv_fn_eval[mask]):
   1967     print_(f" value = {value} -> {fn} = {fn_eval}")
   1968 print_()

IndexError: too many indices for array: array is 0-dimensional, but 1 were indexed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions