larray.IGroup.difference

IGroup.difference(other) LSet

Return (set) difference of this label group and other.

In other words, this will return labels from this group without those in other. Labels relative order will be kept intact, but only unique labels will be returned.

Parameters
otherGroup or any sequence of labels

other labels

Returns
LSet

Examples

>>> from larray import Axis
>>> a = Axis('a=a0..a2')
>>> a['a0', 'a1'].difference(a['a1', 'a2'])
a['a0'].set()
>>> a['a0', 'a1'].difference('a1,a2')
a['a0'].set()
>>> a['a0', 'a1'].difference(['a1', 'a2'])
a['a0'].set()