class_docstr: Preserves the original input data without any transformations.
  
  Due to the restrictions of torch.Tensor, the encoding function only accepts types:
  
  - (nested) lists of numbers
  - np.ndarray of numbers, or
  - torch.Tensor
  
  Nonetypes are automatically converted into nans. This cannot be decoded.
  If self.handle_nan is True, then all nans are converted to zeros and not decoded back.
  
  The decode function takes in a torch.Tensor and converts it to a list of numbers.
docstr: :param is_target: Whether encoder represents the target column
  :param handle_nan: If True, converts any NaN values to 0 via `torch.nan_to_num`.
docstr_tok: [":","param","is_target",":","Whether","encoder","represents","the","target","column",":","param","handle_nan",":","If","True",",","converts","any","NaN","values","to","0","via","`","torch.nan_to_num","`","."]
code: def __init__(
      self, is_target: bool = False, handle_nan: bool = True
  ) -> None:
      """
      :param is_target: Whether encoder represents the target column
      :param handle_nan: If True, converts any NaN values to 0 via `torch.nan_to_num`.
      """
      super().__init__(is_target)
      self.handle_nan = handle_nan
  
file_path: lightwood/lightwood/encoder/identity/identity.py
imports: import numpy
  from typing import List, Iterable, Union
  import torch
  from lightwood.encoder.base import BaseEncoder
label_desc: Use image node_id 1 to create a new IdentityEncoder object from inherited base classes: BaseEncoder with example: obj = IdentityEncoder(is_target, handle_nan)