SimPEG.utils.validate_list_of_types#

SimPEG.utils.validate_list_of_types(property_name, var, class_type, ensure_unique=False)[source]#

Validate list of instances of a certain class

Parameters:
property_namestr

The name of the property being set

varobject or a list of object

A list of objects

class_typeclass or tuple of class types

Class type(s) that are allowed in the list

ensure_uniquebool, optional

Checks if all items in the var are unique items.

Returns:
list

Returns the list once validated