DiagonalMatrix

Workspace.DiagonalMatrix(self: pyarts.arts._Workspace, output: pyarts.arts.WorkspaceVariable | pyarts.arts.Matrix | pyarts.arts.Sparse, v: pyarts.arts.WorkspaceVariable | pyarts.arts.Vector, verbosity: pyarts.arts.WorkspaceVariable | pyarts.arts.Verbosity | None = self.verbosity) None

Create a diagonal matrix from a vector.

This creates a dense or sparse diagonal matrix with the elements of the given vector on the diagonal.

Author(s): Simon Pfreundschuh

Parameters:
  • output (Matrix or Sparse) – The diagonal matrix. [OUT]

  • v (Vector) – The vector containing the diagonal elements. [IN]

  • verbosity (Verbosity) – ARTS verbosity. See verbosity, defaults to self.verbosity [IN]