pyhf
pyhf copied to clipboard
Make `model.config.par_names()` a property?
Summary
Currently model.config.par_names()
takes no arguments and returns a list of parameter names. The behavior slightly differs from model.config.channels
and model.config.samples
, which are properties. For consistency, it may be useful to turn par_names
into a property as well.
Additional Information
model.config.par_names()
used to take an argument to set formatting, which required it to be a function. Since that has been dropped in the meantime, this opens up the possibility of using @property
.
I don't know whether both par_names
and par_names()
can be supported simultaneously, which would allow to not break existing workflows with par_names()
, but it may be better to only have a single API regardless.
Code of Conduct
- [X] I agree to follow the Code of Conduct
Similarly to this, suggested_init
, suggested_bounds
and suggested_fixed
currently take no arguments either. One other consideration is that maybe some of these parts of the API are meant to eventually support kwargs, in which case switching to a property would not be useful.
Similarly to this,
suggested_init
,suggested_bounds
andsuggested_fixed
currently take no arguments either. One other consideration is that maybe some of these parts of the API are meant to eventually support kwargs, in which case switching to a property would not be useful.
I like this idea, but would table it until v0.8.0
. So I've moved this to Issue #2028.