pyvista.core._validation.validate

pyvista.core._validation.validate#

Functions that validate input and return a standard representation.

Added in version 0.43.0.

A validate function typically:

  • Uses check functions to check the type and/or value of input arguments.

  • Applies (optional) constraints, e.g. input or output must have a specific length, shape, type, data-type, etc.

  • Accepts many different input types or values and standardizes the output as a single representation with known properties.

Functions

validate_array(arr, /, *[, must_have_shape, ...])

Check and validate a numeric array meets specific requirements.

validate_array3(arr, /, *[, reshape, broadcast])

Validate a numeric 1D array with 3 elements.

validate_arrayN(arr, /, *[, reshape])

Validate a numeric 1D array.

validate_arrayN_unsigned(arr, /, *[, reshape])

Validate a numeric 1D array of non-negative (unsigned) integers.

validate_arrayNx3(arr, /, *[, reshape])

Validate an array is numeric and has shape Nx3.

validate_axes(*axes[, normalize, ...])

Validate 3D axes vectors.

validate_data_range(rng, /, **kwargs)

Validate a data range.

validate_dimensionality(dimensionality, /, *)

Validate a dimensionality.

validate_number(num, /, *[, reshape])

Validate a real, finite number.

validate_transform3x3(transform, /, *[, ...])

Validate transform-like input as a 3x3 ndarray.

validate_transform4x4(transform, /, *[, ...])

Validate transform-like input as a 4x4 ndarray.