Closed
Description
add currently behaves like this:
def add(self, other):
if isinstance(other, Index):
return self.union(other)
else:
return Index(np.array(self) + other)
but subtraction falls straight through to diff.
so if index_object is an Int64Index, the following behavior takes place:
index_object + 1 => add one to all indices
index_object - 1 => error in diff
index_object + -1 => subtract one from all indices