class_docstr: The 'MinMax' scales the input data using a min-max approach along the
  specified axis.
docstr: Parameters
  ----------
  F
      A module that can either refer to the Symbol API or the NDArray
      API in MXNet.
  
  data
      tensor containing the data to be scaled.
  
  observed_indicator
      observed_indicator: binary tensor with the same shape as
      ``data``, that has 1 in correspondence of observed data points,
      and 0 in correspondence of missing data points.
  
  Returns
  -------
  Tensor
      shape (N, T, C) or (N, C, T) scaled along the specified axis.
docstr_tok: ["Parameters","--","--","--","--","--","F","A","module","that","can","either","refer","to","the","Symbol","API","or","the","NDArray","API","in","MXNet",".","data","tensor","containing","the","data","to","be","scaled",".","observed_indicator","observed_indicator",":","binary","tensor","with","the","same","shape","as","``","data","``",",","that","has","1","in","correspondence","of","observed","data","points",",","and","0","in","correspondence","of","missing","data","points",".","Returns","--","--","--","-","Tensor","shape","(","N",",","T",",","C",")","or","(","N",",","C",",","T",")","scaled","along","the","specified","axis","."]
code: def compute_scale(
      self, F, data: Tensor, observed_indicator: Tensor
  ) -> Tensor:
      """
      Parameters
      ----------
      F
          A module that can either refer to the Symbol API or the NDArray
          API in MXNet.
  
      data
          tensor containing the data to be scaled.
  
      observed_indicator
          observed_indicator: binary tensor with the same shape as
          ``data``, that has 1 in correspondence of observed data points,
          and 0 in correspondence of missing data points.
  
      Returns
      -------
      Tensor
          shape (N, T, C) or (N, C, T) scaled along the specified axis.
  
      """
  
      axis_zero = nd.prod(
          data == data.zeros_like(), self.axis, keepdims=True
      )  # Along the specified axis, which array are always at zero
      axis_zero = nd.broadcast_to(
          axis_zero, shape=data.shape
      )  # Broadcast it to the shape of data
  
      # return the min value along specified axis while ignoring value
      # according to observed_indicator
      min_val = nd.where(
          1 - observed_indicator,
          nd.broadcast_to(data.max(keepdims=True), shape=data.shape),
          data,
      ).min(axis=self.axis, keepdims=True)
  
      # return the max value along specified axis while ignoring value
      # according to observed_indicator
      max_val = nd.where(
          1 - observed_indicator,
          nd.broadcast_to(data.min(keepdims=True), shape=data.shape),
          data,
      ).max(axis=self.axis, keepdims=True)
  
      scaled_data = (data - min_val) / (max_val - min_val)  # Rescale
  
      # Clip Nan values to zero if the data was equal to zero along specified
      # axis
      scaled_data = nd.where(
          axis_zero, scaled_data.zeros_like(), scaled_data
      )
  
      # Clip the Nan values to one. scaled_date!=scaled_data tells us where
      # the Nan values are in scaled_data
      scaled_data = nd.where(
          scaled_data != scaled_data,
          scaled_data.ones_like(),
          scaled_data,
      )
  
      # Replace data with zero where observed_indicator tells us to.
      return nd.where(
          1 - observed_indicator, scaled_data.zeros_like(), scaled_data
      )
  
imports: from typing import Tuple, Optional
  import mxnet.ndarray
  from mxnet.gluon import nn
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
label_desc: Use image node_id 2 for calling the MinMax obj's underlying member method code with example usage: obj.compute_scale(F, data, observed_indicator) and returns: nd