sknano.core.atoms.Atoms.filter¶
-
Atoms.filter(condition, invert=False)[source][source]¶ Filter
Atomsby condition.Parameters: condition : array_like, bool
Boolean index array having same shape as the initial dimensions of the list of
Atomsbeing indexed.invert : bool, optional
If True, the boolean array condition is inverted element-wise.
Returns: filtered_atoms :
AtomsIf invert is False, return the elements where condition is True.
If invert is True, return the elements where condition (i.e., numpy.invert(condition)) is True.