Closed dburov190 closed 4 years ago
I don't see how it is ambiguous. But if you would like to change it for better consistency, your suggestion is fine
well, in the current version a new boolean array is computed first, and then, regardless of the values of observation.obs_states
, the length of that array (equal to the length of the original one) is returned
then, the integer is implicitly converted to a boolean: if it's 0, then False
, if greater then zero, then True
So, there are extra mental operations you have to perform in order to understand what's going on (: and extra memory allocation, which is unnecessary here
Here: https://github.com/dburov190/risk-networks/blob/8d8bbfc0b61621d9ef48df22b33251dd8f386b64/epiforecast/data_assimilator.py#L314
it should be
instead