Returns a fixed axis

def _get_axis(self, array, axis, slice_num,
                  extended=False,
                  transpose=True):
        """Returns a fixed axis"""

        slice_list = [slice(None)] * array.ndim
        slice_list[axis] = slice_num
        slice_data = array[tuple(slice_list)]
        if transpose:  # for proper orientation
            slice_data = slice_data.T

        if not extended:
            # return just the slice data
            return slice_data
        else:
            # additionally include which dim and which slice num
            return axis, slice_num, slice_data