Applying a measure throws an error if impact function id is not of type int #925
Labels
accepting pull request
Contribute by raising a pull request to resolve this issue!
bug
documentation
Describe the bug
When applying a measure that aims to map from one impact function to another, error is thrown if impact functions
id
are not of typeint
. Yet from the docs,id
could be of typeint | str
.To Reproduce
Steps to reproduce the behavior/error:
imp_fun_map
set to change a impact function with a strid
, i.e., "HZtoHZ1"Why doesn't the param
imp_fun_map
receive atuple(int | str, int |str)
, just like the other params:hazard_inten_imp
:tuple(float, float)
mdd_impact
:tuple(float, float)
paa_impact
:tuple(float, float)
This would enable having either int or str as types of impact functions
id
, and one would bypass the need to parse the stringimp_fun_map
as well?Code example (following the first example on the docs)
Expected behavior
Impact function
id
on the new exposure objecto should be mapped to newid
even ifid
s are strings.Screenshots
Climada Version: 4.1.0
System Information (please complete the following information):
Additional context
None
The text was updated successfully, but these errors were encountered: