ak._v2.ak_with_parameter.with_parameter¶
Defined in awkward._v2.operations.structure.ak_with_parameter on line 8.
- ak._v2.ak_with_parameter.with_parameter(array, parameter, value, highlevel=True, behavior=None)¶
- Parameters
array – Data convertible into an Awkward Array.
parameter (str) – Name of the parameter to set on that array.
value (JSON) – Value of the parameter to set on that array.
highlevel (bool) – If True, return an
ak.Array
; otherwise, return a low-levelak.layout.Content
subclass.behavior (None or dict) – Custom
ak.behavior
for the output array, if high-level.
This function returns a new array with a parameter set on the outermost
node of its ak.Array.layout
.
Note that a “new array” is a lightweight shallow copy, not a duplication of large data buffers.
You can also remove a single parameter with this function, since setting a parameter to None is equivalent to removing it.