docstr: Parameters
  ----------
  data
      Data to discretize.
  
  Returns
  -------
  Discretized version of data with the same dimension.
code: def discretize(self, data: np.ndarray) -> np.ndarray:
      """
      Parameters
      ----------
      data
          Data to discretize.
  
      Returns
      -------
      Discretized version of data with the same dimension.
      """
  
      data_disc = data.copy()
      for feature in self.lambdas:
          if len(data.shape) == 1:
              data_disc[feature] = int(
                  self.lambdas[feature](data_disc[feature])
              )
          else:
              data_disc[:, feature] = self.lambdas[feature](
                  data_disc[:, feature]
              ).astype(int)
  
      return data_disc
  
file_path: alibi/alibi/utils/discretizer.py
imports: import numpy
  from alibi.tests.utils import issorted
  from functools import partial
  from typing import Dict, Callable, List, Sequence, Union
label_desc: Use image node_id 4 for calling the Discretizer obj's underlying member method code with example usage: obj.discretize(data) and returns: data_disc