def sub_lists(self, idx_lists: list=None) -> numpy.ndarray:
    '\n        Get subspace of tensor by a set of index lists\n        according to hPQ.sub_lists(idx_lists=[p, q]) = [hPQ for P in p and Q in q]\n\n        This essentially is an implementation of a non-contiguous slicing using numpy.take\n\n        Parameters\n        ----------\n            idx_lists :\n                List of lists, each defining the desired subspace per axis\n                Size needs to match order of tensor, and lists successively correspond to axis=0,1,2,...,N\n\n        Returns\n        -------\n            out :\n                Sliced tensor as numpy.ndarray\n        '
    if (len(idx_lists) != self.order):
        raise Exception(('Need to pass an index list for each dimension!' + ' Length of idx_lists needs to match order of tensor.'))
    out = self.elems
    for ax in range(self.order):
        if (idx_lists[ax] is not None):
            out = numpy.take(out, idx_lists[ax], axis=ax)
    return out
Get subspace of tensor by a set of index lists
according to hPQ.sub_lists(idx_lists=[p, q]) = [hPQ for P in p and Q in q]

This essentially is an implementation of a non-contiguous slicing using numpy.take

Parameters
----------
    idx_lists :
        List of lists, each defining the desired subspace per axis
        Size needs to match order of tensor, and lists successively correspond to axis=0,1,2,...,N

Returns
-------
    out :
        Sliced tensor as numpy.ndarray
def sub_lists(self, idx_lists: list=None) -> numpy.ndarray:
    '\n        Get subspace of tensor by a set of index lists\n        according to hPQ.sub_lists(idx_lists=[p, q]) = [hPQ for P in p and Q in q]\n\n        This essentially is an implementation of a non-contiguous slicing using numpy.take\n\n        Parameters\n        ----------\n            idx_lists :\n                List of lists, each defining the desired subspace per axis\n                Size needs to match order of tensor, and lists successively correspond to axis=0,1,2,...,N\n\n        Returns\n        -------\n            out :\n                Sliced tensor as numpy.ndarray\n        '
    if (len(idx_lists) != self.order):
        raise Exception(('Need to pass an index list for each dimension!' + ' Length of idx_lists needs to match order of tensor.'))
    out = self.elems
    for ax in range(self.order):
        if (idx_lists[ax] is not None):
            out = numpy.take(out, idx_lists[ax], axis=ax)
    return out