def _extract_rows(self, rows):
        """
        Extract an array of rows from an input scalar or sequence
        """
        if rows is not None:
            rows = numpy.array(rows, ndmin=1, copy=False, dtype='i8')
            # returns unique, sorted
            rows = numpy.unique(rows)

            maxrow = self._info['nrows']-1
            if rows[0] < 0 or rows[-1] > maxrow:
                raise ValueError("rows must be in [%d,%d]" % (0, maxrow))
        return rows
def _extract_rows ( self , rows ) : if rows is not None : rows = numpy . array ( rows , ndmin = 1 , copy = False , dtype = 'i8' ) rows = numpy . unique ( rows ) maxrow = self . _info [ 'nrows' ] - 1 if rows [ 0 ] < 0 or rows [ - 1 ] > maxrow : raise ValueError ( "rows must be in [%d,%d]" % ( 0 , maxrow ) ) return rows
Extract an array of rows from an input scalar or sequence