docstr: A Transform3d representing a scaling operation, with different scale
  factors along each coordinate axis.
  
  Option I: Scale(s, dtype=torch.float32, device='cpu')
      s can be one of
          - Python scalar or torch scalar: Single uniform scale
          - 1D torch tensor of shape (N,): A batch of uniform scale
          - 2D torch tensor of shape (N, 3): Scale differently along each axis
  
  Option II: Scale(x, y, z, dtype=torch.float32, device='cpu')
      Each of x, y, and z can be one of
          - python scalar
          - torch scalar
          - 1D torch tensor
docstr_tok: ["A","Transform3d","representing","a","scaling","operation",",","with","different","scale","factors","along","each","coordinate","axis",".","Option","I",":","Scale","(","s",",","dtype=torch.float32",",","device='cpu","'",")","s","can","be","one","of","-","Python","scalar","or","torch","scalar",":","Single","uniform","scale","-","1D","torch","tensor","of","shape","(","N",",",")",":","A","batch","of","uniform","scale","-","2D","torch","tensor","of","shape","(","N",",","3",")",":","Scale","differently","along","each","axis","Option","II",":","Scale","(","x",",","y",",","z",",","dtype=torch.float32",",","device='cpu","'",")","Each","of","x",",","y",",","and","z","can","be","one","of","-","python","scalar","-","torch","scalar","-","1D","torch","tensor"]
code: def __init__(
      self,
      x,
      y=None,
      z=None,
      dtype: torch.dtype = torch.float32,
      device: Optional[Device] = None,
  ) -> None:
      """
      A Transform3d representing a scaling operation, with different scale
      factors along each coordinate axis.
  
      Option I: Scale(s, dtype=torch.float32, device='cpu')
          s can be one of
              - Python scalar or torch scalar: Single uniform scale
              - 1D torch tensor of shape (N,): A batch of uniform scale
              - 2D torch tensor of shape (N, 3): Scale differently along each axis
  
      Option II: Scale(x, y, z, dtype=torch.float32, device='cpu')
          Each of x, y, and z can be one of
              - python scalar
              - torch scalar
              - 1D torch tensor
      """
      xyz = _handle_input(
          x, y, z, dtype, device, "scale", allow_singleton=True
      )
      super().__init__(device=xyz.device, dtype=dtype)
      N = xyz.shape[0]
  
      # TODO: Can we do this all in one go somehow?
      mat = torch.eye(4, dtype=dtype, device=self.device)
      mat = mat.view(1, 4, 4).repeat(N, 1, 1)
      mat[:, 0, 0] = xyz[:, 0]
      mat[:, 1, 1] = xyz[:, 1]
      mat[:, 2, 2] = xyz[:, 2]
      self._matrix = mat
  
imports: import math
  import os
  import warnings
  from typing import List, Optional, Union
  import torch
  from ..common.datatypes import Device, get_device, make_device
  from ..common.workaround import _safe_det_3x3
  from .rotation_conversions import _axis_angle_rotation
  from .se3 import se3_log_map
label_desc: Use image node_id 1 to create a new Scale object from inherited base classes: Transform3d with example: obj = Scale(x, y, z, dtype, device)