larray.Axis.difference
- Axis.difference(other) Axis [source]
Return axis with the (set) difference of this axis labels and other labels.
In other words, this will use labels from this axis if they are not in other. Labels relative order will be kept intact.
- Parameters
- otherAxis, Group or any sequence of labels
other labels
- Returns
- Axis
Examples
>>> a = Axis('a=a0..a2') >>> a.difference('a1') Axis(['a0', 'a2'], 'a') >>> a.difference('a3') Axis(['a0', 'a1', 'a2'], 'a') >>> a.difference(Axis('a=a1..a3')) Axis(['a0'], 'a') >>> a.difference('a1..a3') Axis(['a0'], 'a') >>> a.difference(['a1', 'a2', 'a3']) Axis(['a0'], 'a')