scipp.nanhist#

scipp.nanhist(x, arg_dict=None, /, *, dim=None, **kwargs)#

Compute a histogram, skipping NaN values.

Like scipp.hist(), but NaN values are skipped. See there for details and examples.

Parameters:
  • x (DataArray) – Input data.

  • arg_dict (Optional[dict[str, int | Variable]], default: None) – Dictionary mapping dimension labels to binning parameters.

  • dim (Union[str, tuple[str, ...], None], default: None) – Dimension(s) to sum over when histogramming. If None (the default), the dimensions of the coordinate used for histogramming are summed over.

  • **kwargs (int | Variable) – Mapping of dimension label to corresponding binning parameters.

Returns:

DataArray – Histogrammed data.