code: def __new__(cls, value):
      # NumPy scalars are modelled as 0-D arrays
      # so a call to np.float32(4) produces a 0-D array.
  
      from ._ndarray import asarray, ndarray
  
      if isinstance(value, str) and value in ["inf", "nan"]:
          value = {"inf": torch.inf, "nan": torch.nan}[value]
  
      if isinstance(value, ndarray):
          return value.astype(cls)
      else:
          return asarray(value, dtype=cls)
  
imports: import builtins
  import torch
  from .None import _dtypes_impl
label_desc: Use image node_id 1 for calling the generic obj's underlying member method code with example usage: obj.__new__(cls, value) and returns: value, asarray