-
Notifications
You must be signed in to change notification settings - Fork 28
Setters for TH1? #79
Comments
The classes in here are simple and flat, so you're free to suggest any improvements via pull request. It would be something like @values.setter
def values(self, new_values):
sanity_checks(new_values)
self._f??? = new_values (I don't remember the ROOT name for the values, or if she transformation is needed in the case of Some of these methods strip off the underflow (first) and overflow (last) bins. If that's what Since these are tiny objects maybe they shouldn't have mutable setters but functions that return a copy with the items set (i.e. |
Setting values would be equivalent to One can always call |
It's up to you to decide how you want the interface to be. The only constraint is that the data model matches ROOT's: it has a single array of all bins, including overflow and underflow, and you can't change the Mutability often leads into these thorny issues, which is why some languages/libraries avoid it completely. Maybe you want |
Could TH1 (or other methods) as well grow some setters, such that things like this might be possible?
The text was updated successfully, but these errors were encountered: