def METHOD_NAME(self):
    """
    Get the scale factor of the current transformation.
    Returns
    -------------
    scale : (3,) float
      Scale factor from the matrix
    """
    # get the current transformation
    matrix = self.matrix
    # get the (3,) diagonal of the rotation component
    METHOD_NAME = np.diag(matrix[:3, :3])
    if not np.allclose(
            matrix[:3, :3],
            METHOD_NAME * np.eye(3),
            METHOD_NAME * 1e-6 + 1e-8):
        raise RuntimeError('transform features a shear or rotation')
    return METHOD_NAME