def write_header(self,<EOL>shape,<EOL>mclass,<EOL>is_complex=False,<EOL>is_logical=False,<EOL>nzmax=<NUM_LIT:0>):
<EOL>name = self._var_name<EOL>is_global = self._var_is_global<EOL>self._mat_tag_pos = self.file_stream.tell()<EOL>self.write_bytes(self.mat_tag)<EOL>af = np.zeros((), NDT_ARRAY_FLAGS)<EOL>af['<STR_LIT>'] = miUINT32<EOL>af['<STR_LIT>'] = <NUM_LIT:8><EOL>flags = is_complex << <NUM_LIT:3> | is_global << <NUM_LIT:2> | is_logical << <NUM_LIT:1><EOL>af['<STR_LIT>'] = mclass | flags << <NUM_LIT:8><EOL>af['<STR_LIT>'] = nzmax<EOL>self.write_bytes(af)<EOL>self.write_element(np.array(shape, dtype='<STR_LIT>'))<EOL>name = np.asarray(name)<EOL>if name == '<STR_LIT>':  <EOL><INDENT>self.write_smalldata_element(name, miINT8, <NUM_LIT:0>)<EOL><DEDENT>else:<EOL><INDENT>self.write_element(name, miINT8)<EOL><DEDENT>self._var_name = '<STR_LIT>'<EOL>self._var_is_global = False<EOL>
Write header for given data options
        shape : sequence
           array shape
        mclass      - mat5 matrix class
        is_complex  - True if matrix is complex
        is_logical  - True if matrix is logical
        nzmax        - max non zero elements for sparse arrays

        We get the name and the global flag from the object, and reset
        them to defaults after we've used them