class_docstr: 4x4 Transform matrix that can always be represented as a combination of 3 matrices: scale * rotate * translate
  This transform has no shear; angles are always preserved.
class_docstr_tok: ["4x4","Transform","matrix","that","can","always","be","represented","as","a","combination","of","3","matrices",":","scale","*","rotate","*","translate","This","transform","has","no","shear",";","angles","are","always","preserved","."]
code: def matrix(self, nd=3):
      if nd == 3:
          return np.array(self.copyDataTo()).reshape(4, 4)
      elif nd == 2:
          m = np.array(self.copyDataTo()).reshape(4, 4)
          m[2] = m[3]
          m[:, 2] = m[:, 3]
          return m[:3, :3]
      else:
          raise Exception("Argument 'nd' must be 2 or 3")
  
imports: from math import atan2, degrees
  import numpy
  from .Qt import QtGui
  from .Transform3D import Transform3D
  from .Vector import Vector
  from .None import SRTTransform
label_desc: Use image node_id 18 for calling the SRTTransform3D obj's underlying member method code with example usage: obj.matrix(nd) and returns: np, m