You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even if there are many NaN in model_to_adapt, the condition len(np.where(nan_mod_ind is False)[0]) == 0 will always be True. This is because nan_mod_ind is an ndarray so it will never be False. The test is False is extremely specific: it means that nan_mod_ind must be the object False.
Looking at the
adapt_grid.py
module I think there are some problems with conditions that can never be met:https://github.com/exoAtmospheres/ForMoSA/blob/aa43396a094aff925af8456eff2d7d4d46083156/ForMoSA/adapt/adapt_grid.py#L97C1-L98C1
Even if there are many NaN in
model_to_adapt
, the conditionlen(np.where(nan_mod_ind is False)[0]) == 0
will always beTrue
. This is becausenan_mod_ind
is an ndarray so it will never beFalse
. The testis False
is extremely specific: it means thatnan_mod_ind
must be the objectFalse
.Proposed solution:
np.any(nan_mod_ind)
check if any of the elements innan_mod_ind
isTrue
.The text was updated successfully, but these errors were encountered: