'Select a subset of elements from an array across an axis.
Arguments:
indices (Tensor, numpy ndarray): indicies of elements to select
axis (int): axis across which to select the values
Returns:
Tensor: Tensor with selected values'

def take(self, indices, axis=None):

    if (type(indices) == self.__class__):
        indices = indices._tensor
    if (type(indices) == np.ndarray):
        indices = indices.squeeze()
    new_shape = list(self.shape)
    new_shape[axis] = indices.size
    return self.__class__(backend=self.backend, ary=self._tensor.take(indices, axis).reshape(new_shape), dtype=self._tensor.dtype, base=self)
