class_docstr: A class representing binned representations with custom centers.
  
  Parameters
  ----------
  bin_centers
      The bins to be used to discretize the data.
      (default: 1024)
code: def __init__(self, bin_centers: np.ndarray, *args, **kwargs):
      super().__init__(*args, **kwargs)
  
      self.bin_edges = self.params.get_constant(
          "bin_edges",
          mx.nd.array(bin_edges_from_bin_centers(bin_centers)),
      )
      self.bin_centers = self.params.get_constant(
          "bin_centers", mx.nd.array(bin_centers)
      )
  
      self.num_bins = len(bin_centers)
  
file_path: gluonts/src/gluonts/mx/representation/custom_binning.py
imports: from typing import List, Optional, Tuple
  import mxnet
  import numpy
  from gluonts.core.component import validated
  from gluonts.dataset.common import Dataset
  from gluonts.mx import Tensor
  from gluonts.mx.context import get_mxnet_context
  from .binning_helpers import bin_edges_from_bin_centers
  from .representation import Representation
label_desc: Use image node_id 1 to create a new CustomBinning object from inherited base classes: Representation with example: obj = CustomBinning(bin_centers)