simpeg.utils.validate_direction#

simpeg.utils.validate_direction(property_name, obj, dim=3)[source]#

Validate if an object represents a direction.

Parameters:
property_namestr

The name of the property being set

obj{“x”, “y”, “z”} or (dim) numpy.ndarray

The object to test

dimint, optional

The dimension of the vector

Returns:
(dim) numpy.ndarray