Skip to content

Representation for empty model raises ValueError #5568

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

Closed
ricardoV94 opened this issue Mar 8, 2022 · 1 comment · Fixed by #5577
Closed

Representation for empty model raises ValueError #5568

ricardoV94 opened this issue Mar 8, 2022 · 1 comment · Fixed by #5577

Comments

@ricardoV94
Copy link
Member

import pymc as pm
pm.Model().str_repr()
Traceback (most recent call last):
  File "/home/ricardo/miniconda3/envs/roche_preclinical_hd/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3444, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-5-fa2b838ad5d3>", line 1, in <module>
    pm.Model().str_repr()
  File "/home/ricardo/Documents/Projects/pymc/pymc/printing.py", line 82, in str_for_model
    maxlen = str(max(len(x) for x in names))
ValueError: max() arg is an empty sequence
@ricardoV94 ricardoV94 changed the title Representation for empty model raisse ValueError Representation for empty model raises ValueError Mar 8, 2022
@sagartomar
Copy link
Contributor

Hi, I would like to work on this. For an empty model is it ok to just return an empty string?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants