def split_array_as_array(self, values):
    'Group ndarray into ndarray by means of reshaping\n\n        Parameters\n        ----------\n        values : ndarray_like, [index.size, ...]\n\n        Returns\n        -------\n        ndarray, [groups, group_size, ...]\n            values grouped by key\n\n        Raises\n        ------\n        AssertionError\n            This operation is only possible if index.uniform==True\n        '
    if (not self.index.uniform):
        raise ValueError('Array can only be split as array if all groups have the same size')
    values = np.asarray(values)
    values = values[self.index.sorter]
    return values.reshape(self.groups, (- 1), *values.shape[1:])
Group ndarray into ndarray by means of reshaping

Parameters
----------
values : ndarray_like, [index.size, ...]

Returns
-------
ndarray, [groups, group_size, ...]
    values grouped by key

Raises
------
AssertionError
    This operation is only possible if index.uniform==True
def split_array_as_array(self, values):
    'Group ndarray into ndarray by means of reshaping\n\n        Parameters\n        ----------\n        values : ndarray_like, [index.size, ...]\n\n        Returns\n        -------\n        ndarray, [groups, group_size, ...]\n            values grouped by key\n\n        Raises\n        ------\n        AssertionError\n            This operation is only possible if index.uniform==True\n        '
    if (not self.index.uniform):
        raise ValueError('Array can only be split as array if all groups have the same size')
    values = np.asarray(values)
    values = values[self.index.sorter]
    return values.reshape(self.groups, (- 1), *values.shape[1:])