def _remove_ellipsis(self, index, numrows, numcols, numbands):
<EOL>rows = slice(<NUM_LIT:0>, numrows)<EOL>cols = slice(<NUM_LIT:0>, numcols)<EOL>bands = slice(<NUM_LIT:0>, numbands)<EOL>if index[<NUM_LIT:0>] is Ellipsis:<EOL><INDENT>if len(index) == <NUM_LIT:2>:<EOL><INDENT>newindex = (rows, cols, index[<NUM_LIT:1>])<EOL><DEDENT>else:<EOL><INDENT>newindex = (rows, index[<NUM_LIT:1>], index[<NUM_LIT:2>])<EOL><DEDENT><DEDENT>elif index[<NUM_LIT:1>] is Ellipsis:<EOL><INDENT>if len(index) == <NUM_LIT:2>:<EOL><INDENT>newindex = (index[<NUM_LIT:0>], cols, bands)<EOL><DEDENT>else:<EOL><INDENT>newindex = (index[<NUM_LIT:0>], cols, index[<NUM_LIT:2>])<EOL><DEDENT><DEDENT>else:<EOL><INDENT>newindex = (index[<NUM_LIT:0>], index[<NUM_LIT:1>], bands)<EOL><DEDENT>return newindex<EOL>
resolve the first ellipsis in the index so that it references the image

Parameters
----------
index : tuple
    tuple of index arguments, presumably one of them is the Ellipsis
numrows, numcols, numbands : int
    image dimensions

Returns
-------
tuple
    Same as index, except that the first Ellipsis is replaced with
    a proper slice whose start and stop members are not None