class_docstr: Turn a vector into a diagonal matrix.
code: def __new__(cls, vector):
      vector = _sympify(vector)
      obj = MatrixExpr.__new__(cls, vector)
      shape = vector.shape
      dim = shape[1] if shape[0] == 1 else shape[0]
      if vector.shape[0] != 1:
          obj._iscolumn = True
      else:
          obj._iscolumn = False
      obj._shape = (dim, dim)
      obj._vector = vector
      return obj
  
imports: from sympy.core.sympify import _sympify
  from sympy.matrices.expressions import MatrixExpr
  from sympy.core import S, Eq, Ge
  from sympy.core.mul import Mul
  from sympy.functions.special.tensor_functions import KroneckerDelta
label_desc: Use image node_id 1 for calling the DiagMatrix obj's underlying member method code with example usage: obj.__new__(cls, vector) and returns: obj