diff --git a/mhcflurry/antigen_presentation/presentation_model.py b/mhcflurry/antigen_presentation/presentation_model.py index 33e3e7099d9a9bc49fdf4e9eee09054932cc96dd..25506498024e2575073b473e4ba169a1450cd5f0 100644 --- a/mhcflurry/antigen_presentation/presentation_model.py +++ b/mhcflurry/antigen_presentation/presentation_model.py @@ -579,5 +579,5 @@ def ensemble_predictions(models, peptides_df, mask_indices_list=None): values = panel.ix[:, :, col] assert values.shape == (len(peptides_df), len(models)) result[col] = model.combine_ensemble_predictions(col, values.values) - assert_no_null(result[col]) + assert_no_null(pandas.Series(result[col])) return result diff --git a/mhcflurry/common.py b/mhcflurry/common.py index cc21280eea4e3e5ccd8a2b3ab1007a4292ccc2da..da205c34d910740c32fbe421df9c7ec485d50180 100644 --- a/mhcflurry/common.py +++ b/mhcflurry/common.py @@ -188,8 +188,8 @@ def describe_nulls(df, related_df_with_same_index_to_describe=None): if isinstance(df, pandas.Series): df = df.to_frame() with pandas.option_context('mode.use_inf_as_null', True): - null_counts_by_col = df.isnull().sum(axis=0) - null_rows = df.isnull().sum(axis=1) > 0 + null_counts_by_col = pandas.isnull(df).sum(axis=0) + null_rows = pandas.isnull(df).sum(axis=1) > 0 return ( "Columns with nulls:\n%s, related rows with nulls:\n%s, " "full df:\n%s" % (