class_docstr: This is a container for a light-weight class for design matrices
  
  This class is only used to make IO and visualization.
  
  Attributes
  ----------
  matrix: array of shape (n_scans, n_regressors)
      the numerical specification of the matrix.
  names: list of len (n_regressors)
      the names associated with the columns.
  frametimes: array of shape (n_scans), optional
      the occurrence time of the matrix rows.
class_docstr_tok: ["This","is","a","container","for","a","light-weight","class","for","design","matrices","This","class","is","only","used","to","make","IO","and","visualization",".","Attributes","--","--","--","--","--","matrix",":","array","of","shape","(","n_scans",",","n_regressors",")","the","numerical","specification","of","the","matrix",".","names",":","list","of","len","(","n_regressors",")","the","names","associated","with","the","columns",".","frametimes",":","array","of","shape","(","n_scans",")",",","optional","the","occurrence","time","of","the","matrix","rows","."]
docstr: write self.matrix as a csv file with appropriate column names
  
  Parameters
  ----------
  path: string, path of the resulting csv file
  
  Notes
  -----
  The frametimes are not written
docstr_tok: ["write","self.matrix","as","a","csv","file","with","appropriate","column","names","Parameters","--","--","--","--","--","path",":","string",",","path","of","the","resulting","csv","file","Notes","--","--","-","The","frametimes","are","not","written"]
code: def write_csv(self, path):
      """write self.matrix as a csv file with appropriate column names
  
      Parameters
      ----------
      path: string, path of the resulting csv file
  
      Notes
      -----
      The frametimes are not written
      """
      import csv
  
      with open(path, "w", newline="") as fid:
          writer = csv.writer(fid)
          writer.writerow(self.names)
          writer.writerows(self.matrix)
  
file_path: nipy/nipy/modalities/fmri/design_matrix.py
imports: from warnings import warn
  import numpy
  from .hemodynamic_models import _orthogonalize, compute_regressor
label_desc: Use image node_id 2 for calling the DesignMatrix obj's underlying member method code with example usage: obj.write_csv(path) without return types