class_docstr: Simple class to handle the experimental paradigm in one session
      
docstr: Parameters
  ----------
  con_id: array of shape (n_events), type = string, optional
         identifier of the events
  onset: array of shape (n_events), type = float, optional,
         onset time (in s.) of the events
  amplitude: array of shape (n_events), type = float, optional,
             amplitude of the events (if applicable)
docstr_tok: ["Parameters","--","--","--","--","--","con_id",":","array","of","shape","(","n_events",")",",","type","=","string",",","optional","identifier","of","the","events","onset",":","array","of","shape","(","n_events",")",",","type","=","float",",","optional",",","onset","time","(","in","s.",")","of","the","events","amplitude",":","array","of","shape","(","n_events",")",",","type","=","float",",","optional",",","amplitude","of","the","events","(","if","applicable",")"]
code: def __init__(self, con_id=None, onset=None, amplitude=None):
      """
      Parameters
      ----------
      con_id: array of shape (n_events), type = string, optional
             identifier of the events
      onset: array of shape (n_events), type = float, optional,
             onset time (in s.) of the events
      amplitude: array of shape (n_events), type = float, optional,
                 amplitude of the events (if applicable)
      """
      self.con_id = con_id
      self.onset = onset
      self.amplitude = amplitude
      if con_id is not None:
          self.n_events = len(con_id)
          self.con_id = np.ravel(np.array(con_id)).astype("str")
      if onset is not None:
          if len(onset) != self.n_events:
              raise ValueError(
                  "inconsistent definition of ids and onsets"
              )
          self.onset = np.ravel(np.array(onset)).astype(np.float64)
      if amplitude is not None:
          if len(amplitude) != self.n_events:
              raise ValueError("inconsistent definition of amplitude")
          self.amplitude = np.ravel(np.array(amplitude))
      self.type = "event"
      self.n_conditions = len(np.unique(self.con_id))
  
file_path: nipy/nipy/modalities/fmri/experimental_paradigm.py
imports: import numpy
label_desc: Use image node_id 1 to create a new Paradigm object  with example: obj = Paradigm(con_id, onset, amplitude)