code: def nanmin(
      a: torch.Tensor,
      /,
      *,
      axis: Optional[Union[int, Tuple[int]]] = None,
      keepdims: Optional[bool] = False,
      initial: Optional[
          Union[int, float, complex, ivy.Container]
      ] = None,
      where: Optional[torch.Tensor] = None,
      out: Optional[torch.Tensor] = None,
  ) -> torch.Tensor:
      nan_mask = torch.isnan(a)
      if where is not None:
          nan_mask = torch.logical_or(
              nan_mask, torch.logical_not(where)
          )
      a_copy = a.clone()
      a_copy[nan_mask] = float("inf")
      if axis is None:
          result, _ = a_copy.min(), None
      else:
          result, _ = a_copy.min(dim=axis, keepdim=keepdims)
      if initial is not None:
          initial = torch.tensor(initial)
          result = torch.minimum(result, initial)
      return result
  
imports: from typing import Optional, Union, Tuple, Sequence
  import torch
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
  from .None import backend_version
  import ivy
  from ..statistical import _infer_dtype
  from copy import deepcopy
label_desc: Use image node_id 4 for calling a global function with example usage: nanmin() and returns: result