// For linked variables, the index might not have been there
// yet at the time of the creation of the indexing object
if var_index in self.index_variables:
start, stop, step = item.indices(self.index_variables[var_index].size)
else:
start, stop, step = item.indices(self.group.variables[var_index].size)
return np.arange(start, stop, step)
After Change
// slices never lead to IndexErrors, instead they return an
// empty array if they don"t match anything
if isinstance(item, slice):
return np.array([], dtype=np.int32)
else:
raise ex
else: