docstr: ivy.Array instance method variant of ivy.trilu. This method simply
  wraps the function, and so the docstring for ivy.trilu also applies to
  this method with minimal changes.
  
  Parameters
  ----------
  self
      input array having shape (..., M, N) and whose innermost two dimensions form
      MxN matrices.    *,
  k
      diagonal below or above which to zero elements. If k = 0, the diagonal is
      the main diagonal. If k < 0, the diagonal is below the main diagonal. If
      k > 0, the diagonal is above the main diagonal. Default: ``0``.
  upper
      indicates whether upper or lower part of matrix is retained.
      Default: ``True``.
  out
      optional output array, for writing the result to. It must have a shape that
      the inputs broadcast to.
  
  Returns
  -------
  ret
      an array containing the upper triangular part(s). The returned array must
      have the same shape and data type as ``self``. All elements below the
      specified diagonal k must be zeroed. The returned array should be allocated
      on the same device as ``self``.
docstr_tok: ["ivy.Array","instance","method","variant","of","ivy.trilu",".","This","method","simply","wraps","the","function",",","and","so","the","docstring","for","ivy.trilu","also","applies","to","this","method","with","minimal","changes",".","Parameters","--","--","--","--","--","self","input","array","having","shape","(","...",",","M",",","N",")","and","whose","innermost","two","dimensions","form","MxN","matrices",".","*",",","k","diagonal","below","or","above","which","to","zero","elements",".","If","k","=","0",",","the","diagonal","is","the","main","diagonal",".","If","k","<","0",",","the","diagonal","is","below","the","main","diagonal",".","If","k",">","0",",","the","diagonal","is","above","the","main","diagonal",".","Default",":","``","0","``",".","upper","indicates","whether","upper","or","lower","part","of","matrix","is","retained",".","Default",":","``","True","``",".","out","optional","output","array",",","for","writing","the","result","to",".","It","must","have","a","shape","that","the","inputs","broadcast","to",".","Returns","--","--","--","-","ret","an","array","containing","the","upper","triangular","part","(","s",")",".","The","returned","array","must","have","the","same","shape","and","data","type","as","``","self","``",".","All","elements","below","the","specified","diagonal","k","must","be","zeroed",".","The","returned","array","should","be","allocated","on","the","same","device","as","``","self","``","."]
code: def trilu(
      self: ivy.Array,
      /,
      *,
      k: int = 0,
      upper: bool = True,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """ivy.Array instance method variant of ivy.trilu. This method simply
      wraps the function, and so the docstring for ivy.trilu also applies to
      this method with minimal changes.
  
      Parameters
      ----------
      self
          input array having shape (..., M, N) and whose innermost two dimensions form
          MxN matrices.    *,
      k
          diagonal below or above which to zero elements. If k = 0, the diagonal is
          the main diagonal. If k < 0, the diagonal is below the main diagonal. If
          k > 0, the diagonal is above the main diagonal. Default: ``0``.
      upper
          indicates whether upper or lower part of matrix is retained.
          Default: ``True``.
      out
          optional output array, for writing the result to. It must have a shape that
          the inputs broadcast to.
  
      Returns
      -------
      ret
          an array containing the upper triangular part(s). The returned array must
          have the same shape and data type as ``self``. All elements below the
          specified diagonal k must be zeroed. The returned array should be allocated
          on the same device as ``self``.
      """
      return ivy.trilu(self._data, k=k, upper=upper, out=out)
  
file_path: ivy/ivy/data_classes/array/experimental/creation.py
imports: import abc
  from typing import Optional, Union
  import ivy
label_desc: Use image node_id 5 for calling the _ArrayWithCreationExperimental obj's underlying member method code with example usage: obj.trilu() and returns: ivy