parameters: (self,
                       shape,
                       mclass,
                       is_complex=False,
                       is_logical=False,
                       nzmax=0)
docstring: 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
docstring_summary: 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
docstring_tokens: 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
function: def write_header(self,
                       shape,
                       mclass,
                       is_complex=False,
                       is_logical=False,
                       nzmax=0):
          ''' 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
          '''
          # get name and is_global from one-shot object store
          name = self._var_name
          is_global = self._var_is_global
          # initialize the top-level matrix tag, store position
          self._mat_tag_pos = self.file_stream.tell()
          self.write_bytes(self.mat_tag)
          # write array flags (complex, global, logical, class, nzmax)
          af = np.zeros((), NDT_ARRAY_FLAGS)
          af['data_type'] = miUINT32
          af['byte_count'] = 8
          flags = is_complex << 3 | is_global << 2 | is_logical << 1
          af['flags_class'] = mclass | flags << 8
          af['nzmax'] = nzmax
          self.write_bytes(af)
          # shape
          self.write_element(np.array(shape, dtype='i4'))
          # write name
          name = np.asarray(name)
          if name == '':  # empty string zero-terminated
              self.write_smalldata_element(name, miINT8, 0)
          else:
              self.write_element(name, miINT8)
          # reset the one-shot store to defaults
          self._var_name = ''
          self._var_is_global = False
function_tokens: def write_header ( self , shape , mclass , is_complex = False , is_logical = False , nzmax = 0 ) : # get name and is_global from one-shot object store name = self . _var_name is_global = self . _var_is_global # initialize the top-level matrix tag, store position self . _mat_tag_pos = self . file_stream . tell ( ) self . write_bytes ( self . mat_tag ) # write array flags (complex, global, logical, class, nzmax) af = np . zeros ( ( ) , NDT_ARRAY_FLAGS ) af [ 'data_type' ] = miUINT32 af [ 'byte_count' ] = 8 flags = is_complex << 3 | is_global << 2 | is_logical << 1 af [ 'flags_class' ] = mclass | flags << 8 af [ 'nzmax' ] = nzmax self . write_bytes ( af ) # shape self . write_element ( np . array ( shape , dtype = 'i4' ) ) # write name name = np . asarray ( name ) if name == '' : # empty string zero-terminated self . write_smalldata_element ( name , miINT8 , 0 ) else : self . write_element ( name , miINT8 ) # reset the one-shot store to defaults self . _var_name = '' self . _var_is_global = False