class_docstr: 3D boxes containing N or BxN boxes.
  
  Args:
      boxes: 3D boxes, shape of :math:`(N,8,3)` or :math:`(B,N,8,3)`. See below for more details.
      raise_if_not_floating_point: flag to control floating point casting behaviour when `boxes` is not a floating
          point tensor. True to raise an error when `boxes` isn't a floating point tensor, False to cast to float.
  
  Note:
      **3D boxes format** is defined as a floating data type tensor of shape ``Nx8x3`` or ``BxNx8x3`` where each box
      is a `hexahedron <https://en.wikipedia.org/wiki/Hexahedron>`_ defined by it's 8 vertices coordinates.
      Coordinates must be in ``x, y, z`` order. The height, width and depth of a box is defined as
      ``width = xmax - xmin + 1``, ``height = ymax - ymin + 1`` and ``depth = zmax - zmin + 1``. Examples of
      `hexahedrons <https://en.wikipedia.org/wiki/Hexahedron>`_ are cubes and rhombohedrons.
class_docstr_tok: ["3D","boxes","containing","N","or","BxN","boxes",".","Args",":","boxes",":","3D","boxes",",","shape","of",":","math",":","`","(","N,8,3",")","`","or",":","math",":","`","(","B",",","N,8,3",")","`",".","See","below","for","more","details",".","raise_if_not_floating_point",":","flag","to","control","floating","point","casting","behaviour","when","`","boxes","`","is","not","a","floating","point","tensor",".","True","to","raise","an","error","when","`","boxes","`","is","n't","a","floating","point","tensor",",","False","to","cast","to","float",".","Note",":","*","*","3D","boxes","format","*","*","is","defined","as","a","floating","data","type","tensor","of","shape","``","Nx8x3","``","or","``","BxNx8x3","``","where","each","box","is","a","`","hexahedron","<","https",":","\/\/en.wikipedia.org\/wiki\/Hexahedron",">","`","_","defined","by","it","'s","8","vertices","coordinates",".","Coordinates","must","be","in","``","x",",","y",",","z","``","order",".","The","height",",","width","and","depth","of","a","box","is","defined","as","``","width","=","xmax","-","xmin","+","1","``",",","``","height","=","ymax","-","ymin","+","1","``","and","``","depth","=","zmax","-","zmin","+","1","``",".","Examples","of","`","hexahedrons","<","https",":","\/\/en.wikipedia.org\/wiki\/Hexahedron",">","`","_","are","cubes","and","rhombohedrons","."]
docstr: Like :func:`torch.nn.Module.to()` method.
code: def to(
      self,
      device: Optional[torch.device] = None,
      dtype: Optional[torch.dtype] = None,
  ) -> Boxes3D:
      """Like :func:`torch.nn.Module.to()` method."""
      # In torchscript, dtype is a int and not a class. https://github.com/pytorch/pytorch/issues/51941
      if dtype is not None and not _is_floating_point_dtype(dtype):
          raise ValueError("Boxes must be in floating point")
      self._data = self._data.to(device=device, dtype=dtype)
      return self
  
imports: from __future__ import annotations
  from typing import Optional, cast
  import torch
  from torch import Size
  from kornia.core import Tensor, stack, zeros
  from kornia.geometry.bbox import validate_bbox
  from kornia.geometry.linalg import transform_points
  from kornia.utils import eye_like
label_desc: Use image node_id 15 for calling the Boxes3D obj's underlying member method code with example usage: obj.to(device, dtype) and returns: self