ak.zeros_like — Awkward Array documentation

# ak.zeros_like

Defined in awkward.operations.structure on line 1115.

ak.zeros_like(array, highlevel=True, behavior=None, dtype=None)
  Parameters:

    - array – Array to use as a model for a replacement that contains only `0`.

    - highlevel (bool, default is True) – If True, return an `ak.Array`; otherwise, return a low-level `ak.layout.Content` subclass.

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

    - dtype (None or type) – Overrides the data type of the result.

This is the equivalent of NumPy’s `np.zeros_like` for Awkward Arrays.

See `ak.full_like` for details, and see also `ak.ones_like`.

(There is no equivalent of NumPy’s `np.empty_like` because Awkward Arrays are immutable.)