ak.nan_to_num
Defined in awkward.operations.structure on line 4484.
- ak.nan_to_num(array, copy=True, nan=0.0, posinf=None, neginf=None, highlevel=True, behavior=None)
- Parameters:
array – Array whose
NaNvalues should be converted to a number.copy (bool) – Ignored (Awkward Arrays are immutable).
nan (int, float, broadcastable array) – Value to be used to fill
NaNvalues.posinf (None, int, float, broadcastable array) – Value to be used to fill positive infinity values. If None, positive infinities are replaced with a very large number.
neginf (None, int, float, broadcastable array) – Value to be used to fill negative infinity values. If None, negative infinities are replaced with a very small number.
highlevel (bool) – If True, return an
ak.Array; otherwise, return a low-levelak.layout.Contentsubclass.behavior (None or dict) – Custom
ak.behaviorfor the output array, if high-level.
Implements np.nan_to_num for Awkward Arrays.