Validation#

Warning

This package is under active development and is unstable. The API may change without warning. It is currently intended for internal use by PyVista methods only but will be made public in a future version.

Input validation methods for checking and/or validating a variable has the correct type and/or for use by an algorithm. These methods can be useful when writing custom Python methods, VTK wrappers, and/or when Contributing to PyVista.

Some common use cases for input validation are:

Validate a 3-element vector:
  • Use validate_array3()

Validate an Nx3 point or vector array:
  • Use validate_arrayNx3()

Validate point or cell IDs:
  • Use validate_arrayN_unsigned()

Validate a transformation matrix:
  • Use validate_transform4x4()

API Reference#

check

Functions that check the type and/or value of inputs.

validate

Functions that validate input and return a standard representation.