Defined in awkward.operations.convert on line 1264.

ak.from_awkward0(array, keep_layout=False, regulararray=False, recordarray=True, highlevel=True, behavior=None)
  • array (Awkward 0.x or Awkward 1.x array) – Data to convert to Awkward 1.x.

  • keep_layout (bool) – If True, stay true to the Awkward 0.x layout, ensuring zero-copy; otherwise, allow transformations that copy data for more flexibility.

  • regulararray (bool) – If True and the array is multidimensional, the dimensions are represented by nested ak.layout.RegularArray nodes; if False and the array is multidimensional, the dimensions are represented by a multivalued ak.layout.NumpyArray.shape. If the array is one-dimensional, this has no effect.

  • recordarray (bool) – If True and the array is a NumPy structured array (dtype.names is not None), the fields are represented by an ak.layout.RecordArray; if False and the array is a structured array, the structure is left in the ak.layout.NumpyArray format, which some functions do not recognize.

  • highlevel (bool) – 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.

Converts an array from Awkward 0.x to Awkward 1.x.

This is only needed during the transition from the old library to the new library.

If array is already an Awkward 1.x Array, it is simply passed through this function (so that interfaces that scripts don’t need to remove this function when their 0.x sources are replaced by 1.x).