// Determine length of interval
// When first condition fails the second one is not checked,
// otherwise the second condition could throw IndexError
while stop < len(ids) and ids[stop] == ids[start]:
stop += 1
interval = data[start:stop]
if axis == None:
After Change
value = function(interval)
else:
value = function(interval, axis=axis)
value = function(interval, axis=axis)
// Identify the shape of the resulting array by evaluation
// of the function return value for the first interval
if processed_data is None:
if isinstance(value, np.ndarray):