(self, value, param, ctx)
Validate and parse band index.
Validate and parse band index.
Validate and parse band index .
def convert(self, value, param, ctx):
        """Validate and parse band index."""
        try:
            if value.lower() == "nan":
                return numpy.nan
            elif value.lower() in ["nil", "none", "nada"]:
                return None
            else:
                return float(value)
        except (TypeError, ValueError):
            raise click.ClickException("{} is not a valid nodata value.".format(value))
def convert ( self , value , param , ctx ) : try : if value . lower ( ) == "nan" : return numpy . nan elif value . lower ( ) in [ "nil" , "none" , "nada" ] : return None else : return float ( value ) except ( TypeError , ValueError ) : raise click . ClickException ( "{} is not a valid nodata value." . format ( value ) )