nispace.stats.effectsize.zscore_nan

nispace.stats.effectsize.zscore_nan(a, b=None)[source]

NaN-aware standard z-score of a, optionally against a reference b.

Parameters:
  • a (array_like, shape (n_obs_a, n_features)) – Values to standardize.

  • b (array_like, shape (n_obs_b, n_features), optional) – Reference sample supplying the mean/SD, reduced along axis=0 via nanmean/nanstd (NaN entries excluded per-column). If None (default), a is standardized against its own NaN-aware mean/SD.

Returns:

z

Return type:

np.ndarray, shape (n_obs_a, n_features)

Notes

Called directly (not via a numba _fast twin) by api.NiSpace.normalize_colocalizations(z_method=”standard”) to z-score observed colocalization values against the corresponding null distribution array.