flatten#
- autoplex.data.common.utils.flatten(atoms_object, recursive=False)[source]#
Flatten an iterable fully, but excluding Atoms objects.
- Parameters:
atoms_object (Atoms or Iterable) – An Atoms object or an iterable containing Atoms objects.
recursive (bool) – If set to True, the function will recursively flatten the iterable.
- Return type:
A flattened list containing only Atoms objects.