(self, opt_selectors=None, opt_names=None, *args)
return apifunction.ApiFunction.apply_('Image.select', algorithm_args)
Selects bands from an image.

    Can be called in one of two ways:
      - Passed any number of non-list arguments. All of these will be
        interpreted as band selectors. These can be band names, regexes, or
        numeric indices. E.g.
        selected = image.select('a', 'b', 3, 'd');
      - Passed two lists. The first will be used as band selectors and the
        second as new names for the selected bands. The number of new names
        must match the number of selected bands. E.g.
        selected = image.select(['a', 4], ['newA', 'newB']);

    Args:
      opt_selectors: An array of names, regexes or numeric indices specifying
          the bands to select.
      opt_names: An array of strings specifying the new names for the
          selected bands.
      *args: Selector elements as varargs.

    Returns:
      An image with the selected bands.
Selects bands from an image.
Selects bands from an image .
def select(self, opt_selectors=None, opt_names=None, *args):
    """Selects bands from an image.

    Can be called in one of two ways:
      - Passed any number of non-list arguments. All of these will be
        interpreted as band selectors. These can be band names, regexes, or
        numeric indices. E.g.
        selected = image.select('a', 'b', 3, 'd');
      - Passed two lists. The first will be used as band selectors and the
        second as new names for the selected bands. The number of new names
        must match the number of selected bands. E.g.
        selected = image.select(['a', 4], ['newA', 'newB']);

    Args:
      opt_selectors: An array of names, regexes or numeric indices specifying
          the bands to select.
      opt_names: An array of strings specifying the new names for the
          selected bands.
      *args: Selector elements as varargs.

    Returns:
      An image with the selected bands.
    """
    if opt_selectors is not None:
      args = list(args)
      if opt_names is not None:
        args.insert(0, opt_names)
      args.insert(0, opt_selectors)
    algorithm_args = {
        'input': self,
        'bandSelectors': args[0] if args else [],
    }
    if args:
      # If the user didn't pass an array as the first argument, assume
      # that everything in the arguments array is actually a selector.
      if (len(args) > 2 or
          ee_types.isString(args[0]) or
          ee_types.isNumber(args[0])):
        # Varargs inputs.
        selectors = args
        # Verify we didn't get anything unexpected.
        for selector in selectors:
          if (not ee_types.isString(selector) and
              not ee_types.isNumber(selector) and
              not isinstance(selector, computedobject.ComputedObject)):
            raise ee_exception.EEException(
                'Illegal argument to select(): ' + selector)
        algorithm_args['bandSelectors'] = selectors
      elif len(args) > 1:
        algorithm_args['newNames'] = args[1]
    return apifunction.ApiFunction.apply_('Image.select', algorithm_args)
def select ( self , opt_selectors = None , opt_names = None , * args ) : if opt_selectors is not None : args = list ( args ) if opt_names is not None : args . insert ( 0 , opt_names ) args . insert ( 0 , opt_selectors ) algorithm_args = { 'input' : self , 'bandSelectors' : args [ 0 ] if args else [ ] , } if args : # If the user didn't pass an array as the first argument, assume # that everything in the arguments array is actually a selector. if ( len ( args ) > 2 or ee_types . isString ( args [ 0 ] ) or ee_types . isNumber ( args [ 0 ] ) ) : # Varargs inputs. selectors = args # Verify we didn't get anything unexpected. for selector in selectors : if ( not ee_types . isString ( selector ) and not ee_types . isNumber ( selector ) and not isinstance ( selector , computedobject . ComputedObject ) ) : raise ee_exception . EEException ( 'Illegal argument to select(): ' + selector ) algorithm_args [ 'bandSelectors' ] = selectors elif len ( args ) > 1 : algorithm_args [ 'newNames' ] = args [ 1 ] return apifunction . ApiFunction . apply_ ( 'Image.select' , algorithm_args )