parameters: (array, axistags='', force=False, order=None, noChannels=False)
return_statement: return array
docstring: Create a view to the given array with type :class:`~vigra.VigraArray` and
      desired axistags.
  
      You can either explicitly provide axistags to be imposed on the array
      (parameter ``axistags``), or a general description for the desired axis
      ordering (parameters ``order`` and ``noChannels``). It is an error to
      specify axistags and order simultaneously. In addition, the effect of
      ``taggedView()`` depends on whether ``array`` already has axistags or not.
  
      1. If ``array`` has no axistags or ``force=True`` (i.e. existing axistags
         shall be ignored) and neither the ``axistags`` nor the ``order`` parameters
         are given, the function acts as if ``order="C"`` was specified (case 2 below).
  
      2. If ``array`` has no axistags or ``force=True`` (i.e. existing axistags
         shall be ignored) and the ``order`` parameter is given, the function
         constructs appropriate axistags via :meth:`~vigra.VigraArray.defaultAxistags`::
  
         >>> view = array.view(VigraArray)
         >>> view.axistags = VigraArray.defaultAxistags(view.ndim, order, noChannels)
  
      3. If ``array`` has no axistags (or ``force=True``) and the ``axistags`` parameter
         is given, the function transforms this specification into an object of type
         :class:`~vigra.AxisTags` and attaches the result to the view::
  
         >>> view = array.view(VigraArray)
         >>> view.axistags = makeAxistags(axistags)
  
      4. If ``array`` has axistags (and ``force=False``) and the ``order`` parameter is
         given, the function transposes the array into the desired order::
  
         >>> view = array.transposeToOrder(order)
         >>> if noChannels:
         ...     view = view.dropChannelAxis()
  
      5. If ``array`` has axistags (and ``force=False``) and the ``axistags`` parameter
         is given, the function calls :meth:`~vigra.VigraArray.withAxes` to transforms
         the present axistags into the desired ones::
  
         >>> view = array.withAxes(axistags)
  
      The function raises a RuntimeError when the axistag specification is incompatible
      with the array.
docstring_summary: Create a view to the given array with type :class:`~vigra.VigraArray` and
      desired axistags.
docstring_tokens: Create a view to the given array with type : class : ~vigra . VigraArray and desired axistags .
function: def taggedView(array, axistags='', force=False, order=None, noChannels=False):
      '''
      Create a view to the given array with type :class:`~vigra.VigraArray` and
      desired axistags.
  
      You can either explicitly provide axistags to be imposed on the array
      (parameter ``axistags``), or a general description for the desired axis
      ordering (parameters ``order`` and ``noChannels``). It is an error to
      specify axistags and order simultaneously. In addition, the effect of
      ``taggedView()`` depends on whether ``array`` already has axistags or not.
  
      1. If ``array`` has no axistags or ``force=True`` (i.e. existing axistags
         shall be ignored) and neither the ``axistags`` nor the ``order`` parameters
         are given, the function acts as if ``order="C"`` was specified (case 2 below).
  
      2. If ``array`` has no axistags or ``force=True`` (i.e. existing axistags
         shall be ignored) and the ``order`` parameter is given, the function
         constructs appropriate axistags via :meth:`~vigra.VigraArray.defaultAxistags`::
  
         >>> view = array.view(VigraArray)
         >>> view.axistags = VigraArray.defaultAxistags(view.ndim, order, noChannels)
  
      3. If ``array`` has no axistags (or ``force=True``) and the ``axistags`` parameter
         is given, the function transforms this specification into an object of type
         :class:`~vigra.AxisTags` and attaches the result to the view::
  
         >>> view = array.view(VigraArray)
         >>> view.axistags = makeAxistags(axistags)
  
      4. If ``array`` has axistags (and ``force=False``) and the ``order`` parameter is
         given, the function transposes the array into the desired order::
  
         >>> view = array.transposeToOrder(order)
         >>> if noChannels:
         ...     view = view.dropChannelAxis()
  
      5. If ``array`` has axistags (and ``force=False``) and the ``axistags`` parameter
         is given, the function calls :meth:`~vigra.VigraArray.withAxes` to transforms
         the present axistags into the desired ones::
  
         >>> view = array.withAxes(axistags)
  
      The function raises a RuntimeError when the axistag specification is incompatible
      with the array.
      '''
      if axistags and order:
          raise RuntimeError("vigra.taggedView(): you cannot specify 'axistags' and 'order' at the same time.")
      if hasattr(array, 'axistags') and not force:
          if not axistags:
              array = array.transposeToOrder(order)
              if noChannels:
                  array = array.dropChannelAxis()
          else:
              array = array.withAxes(axistags)
      else:
          if not axistags:
              if not order:
                  order = 'C'
              axistags = VigraArray.defaultAxistags(array.ndim, order, noChannels)
          else:
              axistags = makeAxistags(axistags)
          if array.ndim != len(axistags):
              raise RuntimeError('vigra.taggedView(): array.ndim must match len(axistags).')
          array = array.view(VigraArray)
          array.axistags = axistags
      return array
function_tokens: def taggedView ( array , axistags = '' , force = False , order = None , noChannels = False ) : if axistags and order : raise RuntimeError ( "vigra.taggedView(): you cannot specify 'axistags' and 'order' at the same time." ) if hasattr ( array , 'axistags' ) and not force : if not axistags : array = array . transposeToOrder ( order ) if noChannels : array = array . dropChannelAxis ( ) else : array = array . withAxes ( axistags ) else : if not axistags : if not order : order = 'C' axistags = VigraArray . defaultAxistags ( array . ndim , order , noChannels ) else : axistags = makeAxistags ( axistags ) if array . ndim != len ( axistags ) : raise RuntimeError ( 'vigra.taggedView(): array.ndim must match len(axistags).' ) array = array . view ( VigraArray ) array . axistags = axistags return array