class_docstr: The LogCpTransformer() applies the transformation log(x + C), where C is a positive
  constant, to the input variable. It applies the natural logarithm or the base 10
  logarithm, where the natural logarithm is logarithm in base e.
  
  The logarithm can only be applied to numerical non-negative values. If the
  variable contains a zero or a negative value after adding a constant C, the
  transformer will return an error.
  
  A list of variables can be passed as an argument. Alternatively, the transformer
  will automatically select and transform all variables of type numeric.
  
  More details in the :ref:`User Guide <log_cp>`.
  
  Parameters
  ----------
  variables: list, default=None
      The list of numerical variables to transform. If None, the transformer
      will find and select all numerical variables. If C is a dictionary, then this
      parameter is ignored and the variables to transform are selected from the
      dictionary keys.
  
  base: string, default='e'
      Indicates if the natural or base 10 logarithm should be applied. Can take
      values 'e' or '10'.
  
  C: "auto", int or dict, default="auto"
      The constant C to add to the variable before the logarithm, i.e., log(x + C).
  
      - If int, then log(x + C)
      - If "auto", then C = abs(min(x)) + 1
      - If dict, dictionary mapping the constant C to apply to each variable.
  
      Note, when C is a dictionary, the parameter `variables` is ignored.
  
  Attributes
  ----------
  {variables_}
  
  C_:
      The constant C to add to each variable. If C = "auto" a dictionary with
      C = abs(min(variable)) + 1.
  
  {feature_names_in_}
  
  {n_features_in_}
  
  Methods
  -------
  fit:
      Learn the constant C.
  
  {fit_transform}
  
  {inverse_transform}
  
  transform:
      Transform the variables with the logarithm of x plus C.
code: def __init__(
      self,
      variables: Union[None, int, str, List[Union[str, int]]] = None,
      base: str = "e",
      C: Union[
          int, float, str, Dict[Union[str, int], Union[float, int]]
      ] = "auto",
  ) -> None:
      if base not in ["e", "10"]:
          raise ValueError("base can take only '10' or 'e' as values")
  
      if not isinstance(C, (int, float, dict)) and not C == "auto":
          raise ValueError("C can take only 'auto', integers or floats")
  
      self.variables = _check_init_parameter_variables(variables)
      self.base = base
      self.C = C
  
imports: from typing import Dict, List, Optional, Union
  import numpy
  import pandas
  from feature_engine._base_transformers.base_numerical import BaseNumericalTransformer
  from feature_engine._base_transformers.mixins import FitFromDictMixin
  from feature_engine._docstrings.fit_attributes import _feature_names_in_docstring, _n_features_in_docstring, _variables_attribute_docstring
  from feature_engine._docstrings.init_parameters import _variables_numerical_docstring
  from feature_engine._docstrings.methods import _fit_not_learn_docstring, _fit_transform_docstring, _inverse_transform_docstring
  from feature_engine._docstrings.substitute import Substitution
  from feature_engine._variable_handling.init_parameter_checks import _check_init_parameter_variables
  from feature_engine.tags import _return_tags
label_desc: Use image node_id 1 to create a new LogCpTransformer object from inherited base classes: BaseNumericalTransformer, FitFromDictMixin with example: obj = LogCpTransformer(variables, base, C)