Closed aleksandra-kim closed 7 years ago
Original comment by Chris Mutel (Bitbucket: cmutel, GitHub: cmutel).
This is an annoying inconsistency. There are clear rules that distinguish between the two, but they are not properly explained in the documentation or code.
Brightway2-data uses the name uncertainty type
when defining an uncertain value. When this input data to converted to a parameter array, which can be an input to the RNG in stats_arrays, this field is named uncertainty_type
. uncertainty_type
is used exclusively in stats_arrays.
Both libraries are in widespread use now, and so introducing a breaking change would be difficult. Stats_arrays needs the underscore to allow attribute access, e.g. foo.uncertainty_type
. Updating Brightway2-data would require that everyone rewrites all their databases, which is also suboptimal. It would also make all the Excel import data spreadsheets obsolete. I guess you could write a function that would slowly introduce one form or the other, while still tolerating the older version.
Please post code that raises errors (rather than annoyances).
Original comment by Chris Mutel (Bitbucket: cmutel, GitHub: cmutel).
Closing for now. I made stats_arrays
be more forgiving in what it accepts in from_dicts
, and added a line to the documentation: https://bitbucket.org/cmutel/stats_arrays/commits/486e973e682ee07db39bc71788b7cda5e30f1509
Original report by Pascal Lesage (Bitbucket: MPa, ).
As reported here, Brightway and stats_arrays uncertainty dictionaries are different: one uses the key
uncertainty_type
, and the otheruncertainty type
.This sometimes causes confusion.
It also sometimes appear to cause errors when defining new distributions (code available upon request).
Harmonization would be great.