ak.zeros_like#
Defined in awkward.operations.ak_zeros_like on line 18.
- ak.zeros_like(array, *, dtype=None, including_unknown=False, highlevel=True, behavior=None, attrs=None)#
- Parameters:
array – Array-like data (anything
ak.to_layoutrecognizes).dtype (None or NumPy dtype) – Overrides the data type of the result.
including_unknown (bool) – If True, the
unknowntype is considered a value type and is converted to a zero-length array of the specified dtype; if False,unknownwill remainunknown.highlevel (bool, default is True) – If True, return an
ak.Array; otherwise, return a low-levelak.contents.Contentsubclass.behavior (None or dict) – Custom
ak.behaviorfor the output array, if high-level.attrs (None or dict) – Custom attributes for the output array, if high-level.
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.)