def _read_data(self):

        current_row = 0
        current_col = 0
        result = np.empty((self.nrow, self.ncol),self.realtype)
        # Loop until all data retreived or eof
        while (current_row < self.nrow or current_col < self.ncol) and self.file.tell() != self.totalbytes:
            line = self.file.readline()

            # Read data into 2-D array
            arrline = line.split()
            for val in arrline:
                if not is_float(val):
                    raise Exception('Invalid data encountered while reading data file.' +
                                    ' Unable to convert data to float.')
                result[current_row, current_col] = float(val)
                current_col += 1
                if current_col >= self.ncol:
                    current_row += 1
                    if current_row < self.nrow:
                       current_col = 0

        if current_row < self.nrow - 1 or current_col < self.ncol - 1:
            raise Exception('Unexpected end of file while reading data.')

        return result
If there aren't any exceptions, the data will get saved.
dataset/ETHPy150Open modflowpy/flopy/flopy/utils/formattedfile.py/FormattedLayerFile._read_data--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/tests/transactions/tests.py/TransactionTests.test_commit_on_success_succeed