def read_ints(self, shape, order='C', full_record=False):
        """
        Returns integers as a :mod:`numpy` array of `shape`.

        shape: tuple(int)
            Dimensions of returned array.

        order: string
            If 'C', the data is in row-major order.
            If 'Fortran', the data is in column-major order.

        full_record: bool
            If True, then read surrounding recordmarks.
            Only meaningful if `unformatted`.
        """
        reshape = False
        count = 1
        try:
            for size in shape:
                count *= size
            reshape = True
        except __HOLE__:
            count = shape

        if full_record and self.unformatted:
            reclen = self.read_recordmark()
            if reclen != self.reclen_ints(count):
                raise RuntimeError('unexpected recordlength %d' % reclen)

        sep = '' if self.binary else ' '
        dtype = numpy.int64 if self.integer_8 else numpy.int32
        data = numpy.fromfile(self.file, dtype=dtype, count=count, sep=sep)
        if self.need_byteswap:
            data.byteswap(True)

        if full_record and self.unformatted:
            reclen2 = self.read_recordmark()
            if reclen2 != reclen:
                raise RuntimeError('mismatched recordlength %d vs. %d'
                                   % (reclen2, reclen))

        return data.reshape(shape, order=order) if reshape else data
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.util/src/openmdao/util/stream.py/Stream.read_ints