pyvista.core._validation.check.check_nonnegative#
- check_nonnegative(array: _ArrayLikeOrScalar[NumberType], /, *, name: str = 'Array')[source]#
Check if an array’s elements are all nonnegative.
- Parameters:
- Raises:
ValueError
If the array has any negative values.
See also
Examples
Check if an array’s values are non-negative.
>>> from pyvista import _validation >>> _validation.check_nonnegative([1, 2, 3])