ak.nan_to_none#

Defined in awkward.operations.ak_nan_to_none on line 17.

ak.nan_to_none(array, *, highlevel=True, behavior=None, attrs=None)#
Parameters:
  • array – Array-like data (anything ak.to_layout recognizes).

  • highlevel (bool) – If True, return an ak.Array; otherwise, return a low-level ak.contents.Content subclass.

  • behavior (None or dict) – Custom ak.behavior for the output array, if high-level.

  • attrs (None or dict) – Custom attributes for the output array, if high-level.

Converts NaN (“not a number”) into None, i.e. missing values with option-type.

See also ak.nan_to_num to convert NaN or infinity to specified values.