docstr: ivy.Container instance method variant of ivy.diagflat. This method
  simply wraps the function, and so the docstring for ivy.diagflat also
  applies to this method with minimal changes.
  
  Examples
  --------
  >>> x = ivy.Container(a=[1,2])
  >>> ivy.diagflat(x, k=1)
  {
      a: ivy.array([[0, 1, 0],
                    [0, 0, 2],
                    [0, 0, 0]])
  }
docstr_tok: ["ivy.Container","instance","method","variant","of","ivy.diagflat",".","This","method","simply","wraps","the","function",",","and","so","the","docstring","for","ivy.diagflat","also","applies","to","this","method","with","minimal","changes",".","Examples","--","--","--","--",">",">",">","x","=","ivy.Container","(","a=","[","1,2","]",")",">",">",">","ivy.diagflat","(","x",",","k=1",")","{","a",":","ivy.array","(","[","[","0",",","1",",","0","]",",","[","0",",","0",",","2","]",",","[","0",",","0",",","0","]","]",")","}"]
code: def diagflat(
      self: ivy.Container,
      /,
      *,
      offset: Union[int, ivy.Container] = 0,
      padding_value: Union[float, ivy.Container] = 0,
      align: Union[str, ivy.Container] = "RIGHT_LEFT",
      num_rows: Union[int, ivy.Container] = -1,
      num_cols: Union[int, ivy.Container] = -1,
      key_chains: Optional[
          Union[List[str], Dict[str, str], ivy.Container]
      ] = None,
      to_apply: Union[bool, ivy.Container] = True,
      prune_unapplied: Union[bool, ivy.Container] = False,
      map_sequences: Union[bool, ivy.Container] = False,
      out: Optional[ivy.Container] = None,
  ) -> ivy.Container:
      """ivy.Container instance method variant of ivy.diagflat. This method
      simply wraps the function, and so the docstring for ivy.diagflat also
      applies to this method with minimal changes.
  
      Examples
      --------
      >>> x = ivy.Container(a=[1,2])
      >>> ivy.diagflat(x, k=1)
      {
          a: ivy.array([[0, 1, 0],
                        [0, 0, 2],
                        [0, 0, 0]])
      }
      """
      return self.static_diagflat(
          self,
          offset=offset,
          padding_value=padding_value,
          align=align,
          num_rows=num_rows,
          num_cols=num_cols,
          key_chains=key_chains,
          to_apply=to_apply,
          prune_unapplied=prune_unapplied,
          map_sequences=map_sequences,
          out=out,
      )
  
imports: from typing import Union, Optional, List, Dict, Tuple, Sequence, Literal
  from ivy.data_classes.container.base import ContainerBase
  import ivy
label_desc: Use image node_id 4 for calling the _ContainerWithLinearAlgebraExperimental obj's underlying member method code with example usage: obj.diagflat() and returns: self