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_tok: []
code: def __init__(self, matrix, names, frametimes=None):
      """ """
      matrix_ = np.atleast_2d(matrix)
      if matrix_.shape[1] != len(names):
          raise ValueError(
              "The number of names should equate the number of columns"
          )
      if frametimes is not None:
          if frametimes.size != matrix.shape[0]:
              raise ValueError(
                  "The number %d of frametimes is different from the"
                  + "number %d of rows"
                  % (frametimes.size, matrix.shape[0])
              )
  
      self.frametimes = np.asarray(frametimes, dtype=np.float64)
      self.matrix = matrix_
      self.names = names
  
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 1 to create a new DesignMatrix object  with example: obj = DesignMatrix(matrix, names, frametimes)