class_docstr: Scalar types defined in torch.
  
  Use ``JitScalarType`` to convert from torch and JIT scalar types to ONNX scalar types.
  
  Examples:
      >>> # xdoctest: +REQUIRES(env:TORCH_DOCTEST_ONNX)
      >>> # xdoctest: +IGNORE_WANT("win32 has different output")
      >>> JitScalarType.from_value(torch.ones(1, 2)).onnx_type()
      TensorProtoDataType.FLOAT
  
      >>> JitScalarType.from_value(torch_c_value_with_type_float).onnx_type()
      TensorProtoDataType.FLOAT
  
      >>> JitScalarType.from_dtype(torch.get_default_dtype).onnx_type()
      TensorProtoDataType.FLOAT
class_docstr_tok: ["Scalar","types","defined","in","torch",".","Use","``","JitScalarType","``","to","convert","from","torch","and","JIT","scalar","types","to","ONNX","scalar","types",".","Examples",":",">",">",">","#","xdoctest",":","+REQUIRES","(","env",":","TORCH_DOCTEST_ONNX",")",">",">",">","#","xdoctest",":","+IGNORE_WANT","(","``","win32","has","different","output","''",")",">",">",">","JitScalarType.from_value","(","torch.ones","(","1",",","2",")",")",".onnx_type","(",")","TensorProtoDataType.FLOAT",">",">",">","JitScalarType.from_value","(","torch_c_value_with_type_float",")",".onnx_type","(",")","TensorProtoDataType.FLOAT",">",">",">","JitScalarType.from_dtype","(","torch.get_default_dtype",")",".onnx_type","(",")","TensorProtoDataType.FLOAT"]
docstr: Convert a JitScalarType to a torch dtype.
docstr_tok: ["Convert","a","JitScalarType","to","a","torch","dtype","."]
code: def dtype(self) -> torch.dtype:
      """Convert a JitScalarType to a torch dtype."""
      return _SCALAR_TYPE_TO_DTYPE[self]
  
file_path: pytorch/torch/onnx/_type_utils.py
imports: from __future__ import annotations
  import enum
  import typing
  from typing import Dict, Literal, Optional, Union
  import torch
  from torch._C import _onnx
  from torch.onnx import errors
  from torch.onnx._internal import _beartype
label_desc: Use image node_id 6 for calling the JitScalarType obj's underlying member method code with example usage: obj.dtype() and returns: _SCALAR_TYPE_TO_DTYPE