Closed gdementen closed 4 months ago
FWIW, when doing the operation on a Group (instead of on the Axis), most cases work ?!?
>>> a[:].difference(a.i[0])
a['a1', 'a2'].set()
>>> a[:].difference(a.i[[0]])
a['a1', 'a2'].set()
>>> a[:].difference(a['a0'])
a['a1', 'a2'].set()
>>> a[:].difference('a0')
a['a1', 'a2'].set()
>>> a[:].difference([a['a0']])
a['a1', 'a2'].set()
Except:
>>> a[:].difference([a.i[0]])
a['a0', 'a1', 'a2'].set()
The following work fine:
But all the following do not:
priority high even though this is seldom used because it is a silent failure. There is most likely the same problem in Axis.intersection and Axis.union.
I am unsure all those cases should be supported but the asymmetry between string and groups, or even LGroup and IGroup is puzzling, and the unsupported cases (if any) must fail loudly instead of silently.