diff --git a/spiderexpress/strategies/spikyball.py b/spiderexpress/strategies/spikyball.py index 9b15fef..6b9f45f 100644 --- a/spiderexpress/strategies/spikyball.py +++ b/spiderexpress/strategies/spikyball.py @@ -96,7 +96,7 @@ def calc_norm(source: pd.Series, edge: pd.Series, target: pd.Series) -> float: float : the normalization constant """ - if any([source.hasnans, edge.hasnans, target.hasnans]): + if any([source.isna().any(), edge.isna().any(), target.isna().any()]): log.warning("Input contains NaN values which will be replaced with 1.") norm_const = (source.fillna(1) * edge.fillna(1) * target.fillna(1)).fillna(1).sum() return norm_const