pyvista.core._validation.check.check_sequence#

check_sequence(obj, /, *, name='Object')[source]#

Check if an object is an instance of Sequence.

Parameters:
objSequence

Object to check.

namestr, default: “Object”

Variable name to use in the error messages if any are raised.

Raises:
TypeError

If input is not an instance of Sequence.

Examples

Check if an object is a sequence.

>>> import numpy as np
>>> from pyvista import _validation
>>> _validation.check_sequence([1, 2, 3])
>>> _validation.check_sequence("A")