<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def transform(self, x, use_spln=False, **kwargs):
 """ Apply transform to x Parameters x : float-array-convertible Data to be transformed. Should support conversion to an array of floats. use_spln: bool True - transform using the spline specified in self.slpn. If self.spln is None, set the spline. False - transform using self.tfun kwargs: Keyword arguments to be passed to self.set_spline. Only used if use_spln=True & self.spln=None. Returns ------- Array of transformed values. """

        x = asarray(x, dtype=float)

        if use_spln:
            if self.spln is None:
                self.set_spline(x.min(), x.max(), **kwargs)
            return apply_along_axis(self.spln, 0, x)
        else:
            return self.tfun(x, *self.args, **self.kwargs)