def add_array(self, name, values, array):
f = self.file<EOL>scs = self.summary_control_struct<EOL>record_number = self.bward<EOL>data = bytearray(self.read_record(record_number))<EOL>next_record, previous_record, n_summaries = scs.unpack(data[:<NUM_LIT>])<EOL>if n_summaries < self.summaries_per_record:<EOL><INDENT>summary_record = record_number<EOL>name_record = summary_record + <NUM_LIT:1><EOL>data[:<NUM_LIT>] = scs.pack(next_record, previous_record, n_summaries + <NUM_LIT:1>)<EOL>self.write_record(summary_record, data)<EOL><DEDENT>else:<EOL><INDENT>summary_record = ((self.free - <NUM_LIT:1>) * <NUM_LIT:8> + <NUM_LIT>) // <NUM_LIT> + <NUM_LIT:1><EOL>name_record = summary_record + <NUM_LIT:1><EOL>free_record = summary_record + <NUM_LIT:2><EOL>n_summaries = <NUM_LIT:0><EOL>data[:<NUM_LIT>] = scs.pack(summary_record, previous_record, n_summaries)<EOL>self.write_record(record_number, data)<EOL>summaries = scs.pack(<NUM_LIT:0>, record_number, <NUM_LIT:1>).ljust(<NUM_LIT>, b'<STR_LIT>')<EOL>names = b'<STR_LIT>' * <NUM_LIT><EOL>self.write_record(summary_record, summaries)<EOL>self.write_record(name_record, names)<EOL>self.bward = summary_record<EOL>self.free = (free_record - <NUM_LIT:1>) * <NUM_LIT> // <NUM_LIT:8> + <NUM_LIT:1><EOL><DEDENT>start_word = self.free<EOL>f.seek((start_word - <NUM_LIT:1>) * <NUM_LIT:8>)<EOL>array = numpy_array(array)  <EOL>f.write(array.view())<EOL>end_word = f.tell() // <NUM_LIT:8><EOL>self.free = end_word + <NUM_LIT:1><EOL>self.write_file_record()<EOL>values = values[:self.nd + self.ni - <NUM_LIT:2>] + (start_word, end_word)<EOL>base = <NUM_LIT> * (summary_record - <NUM_LIT:1>)<EOL>offset = int(n_summaries) * self.summary_step<EOL>f.seek(base + scs.size + offset)<EOL>f.write(self.summary_struct.pack(*values))<EOL>f.seek(base + <NUM_LIT> + offset)<EOL>f.write(name[:self.summary_length].ljust(self.summary_step, b'<STR_LIT:U+0020>'))<EOL>
Add a new array to the DAF file.

        The summary will be initialized with the `name` and `values`,
        and will have its start word and end word fields set to point to
        where the `array` of floats has been appended to the file.