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
I don't know if I would consider this a "bug", but whenever I run zscore I get
/home/jared/MatsenGroup/Projects/phippery/phippery/phippery/zscore.py:125: RuntimeWarning: invalid value encountered in divide
zs = (data - null_means) / null_stds
/home/jared/MatsenGroup/Projects/phippery/phippery/phippery/zscore.py:125: RuntimeWarning: divide by zero encountered in divide
zs = (data - null_means) / null_stds
I've tried doing a safer divide strategy by replacing this chunk with:
else:
data=data_df.loc[pid].to_numpy()
null_means=means_df.loc[ibin].to_numpy()
null_stds=stds_df.loc[ibin].to_numpy()
# Replace invalid values in null_stds with NaNnull_stds=np.where(
np.isfinite(null_stds) & (null_stds!=0), null_stds, np.nan
)
# Compute zs safely; np.nan_to_num replaces NaNs with 0 in the resultzs=np.nan_to_num((data-null_means) /null_stds, nan=0.0)
assertzs.dtype==np.float64zscore_df.loc[pid] =zsreturnzscore_df, means_df, stds_df
but for some strange reason the enrichment table comes out as an object datatype in the xarray object. This isn't really problem so instead I'll just be adding a warning catch to #189
The text was updated successfully, but these errors were encountered:
I don't know if I would consider this a "bug", but whenever I run zscore I get
I've tried doing a safer divide strategy by replacing this chunk with:
but for some strange reason the enrichment table comes out as an object datatype in the xarray object. This isn't really problem so instead I'll just be adding a warning catch to #189
The text was updated successfully, but these errors were encountered: