class_docstr: Distribution based on a non-monotonic (u- or hump-shaped transformation)
  
  the constructor can be called with a distribution class, and functions
  that define the non-linear transformation.
  and generates the distribution of the transformed random variable
  
  Note: the transformation, it's inverse and derivatives need to be fully
  specified: func, funcinvplus, funcinvminus, derivplus,  derivminus.
  Currently no numerical derivatives or inverse are calculated
  
  This can be used to generate distribution instances similar to the
  distributions in scipy.stats.
class_docstr_tok: ["Distribution","based","on","a","non-monotonic","(","u-","or","hump-shaped","transformation",")","the","constructor","can","be","called","with","a","distribution","class",",","and","functions","that","define","the","non-linear","transformation",".","and","generates","the","distribution","of","the","transformed","random","variable","Note",":","the","transformation",",","it","'s","inverse","and","derivatives","need","to","be","fully","specified",":","func",",","funcinvplus",",","funcinvminus",",","derivplus",",","derivminus",".","Currently","no","numerical","derivatives","or","inverse","are","calculated","This","can","be","used","to","generate","distribution","instances","similar","to","the","distributions","in","scipy.stats","."]
code: def __init__(
      self,
      kls,
      func,
      funcinvplus,
      funcinvminus,
      derivplus,
      derivminus,
      *args,
      **kwargs,
  ):
      # print(args
      # print(kwargs
  
      self.func = func
      self.funcinvplus = funcinvplus
      self.funcinvminus = funcinvminus
      self.derivplus = derivplus
      self.derivminus = derivminus
      # explicit for self.__dict__.update(kwargs)
      # need to set numargs because inspection does not work
      self.numargs = kwargs.pop("numargs", 0)
      # print(self.numargs
      name = kwargs.pop("name", "transfdist")
      longname = kwargs.pop(
          "longname", "Non-linear transformed distribution"
      )
      extradoc = kwargs.pop("extradoc", None)
      a = kwargs.pop("a", -np.inf)  # attached to self in super
      b = kwargs.pop("b", np.inf)  # self.a, self.b would be overwritten
      self.shape = kwargs.pop("shape", False)
      # defines whether it is a `u` shaped or `hump' shaped
      #       transformation
  
      self.u_args, self.u_kwargs = get_u_argskwargs(**kwargs)
      self.kls = kls  # (self.u_args, self.u_kwargs)
      # possible to freeze the underlying distribution
  
      super().__init__(
          a=a,
          b=b,
          name=name,
          shapes=kls.shapes,
          longname=longname,
          # extradoc = extradoc
      )
  
imports: from scipy import stats
  from scipy.stats import distributions
  import numpy
label_desc: Use image node_id 1 to create a new TransfTwo_gen object from inherited base classes: distributions with example: obj = TransfTwo_gen(kls, func, funcinvplus, funcinvminus, derivplus, derivminus)