def write_ints(self, data, order='C', fmt='%d', sep=' ', linecount=0,
                   full_record=False):
        if not isinstance(data, numpy.ndarray):
            data = numpy.array(data)

        if self.binary:
            if full_record and self.unformatted:
                self.write_recordmark(self.reclen_ints(data.size))

            arr = data
            if self.integer_8:
                if data.itemsize != _SZ_LONG:
                    arr = numpy.array(data, dtype=numpy.int64)
            elif data.itemsize != _SZ_INT:
                arr = numpy.array(data, dtype=numpy.int32)

            if self.need_byteswap:
                arr.byteswap(True)
            try:
                self.file.write(arr.tostring(order=order))
            finally:
                if self.need_byteswap:
                    arr.byteswap(True)

            if full_record and self.unformatted:
                self.write_recordmark(self.reclen_ints(data.size))
        else:
            self.write_array(data, order, fmt, sep, linecount)
Writes an integer array.
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.util/src/openmdao/util/stream.py/Stream.write_ints