ak.validity_error

Defined in awkward.operations.describe on line 32.

ak.validity_error(array, exception=False)
Parameters
  • array (ak.Array, ak.Record, ak.layout.Content, ak.layout.Record, ak.ArrayBuilder, ak.layout.ArrayBuilder) – Array or record to check.

  • exception (bool) – If True, validity errors raise exceptions.

Returns None if there are no errors and a str containing the error message if there are.

Checks for errors in the structure of the array, such as indexes that run beyond the length of a node’s content, etc. Either an error is raised or a string describing the error is returned.

See also ak.is_valid.