class_docstr: Creates an PyTensor operation from scipy.interpolate.UnivariateSpline
class_docstr_tok: ["Creates","an","PyTensor","operation","from","scipy.interpolate.UnivariateSpline"]
code: def grad_op(self):
      if not hasattr(self, "_grad_op"):
          try:
              self._grad_op = SplineWrapper(self.spline.derivative())
          except ValueError:
              self._grad_op = None
  
      if self._grad_op is None:
          raise NotImplementedError(
              "Spline of order 0 is not differentiable"
          )
      return self._grad_op
  
imports: import warnings
  from functools import partial
  from typing import Iterable
  import numpy
  import pytensor
  import pytensor.tensor
  import scipy.linalg
  import scipy.stats
  from pytensor.graph.basic import Apply, Variable
  from pytensor.graph.op import Op
  from pytensor.scalar import UnaryScalarOp, upgrade_to_float_no_complex
  from pytensor.tensor import gammaln
  from pytensor.tensor.elemwise import Elemwise
  from pymc.distributions.shape_utils import to_tuple
  from pymc.logprob.utils import CheckParameterValue
  from pymc.pytensorf import floatX
label_desc: Use image node_id 3 for calling the SplineWrapper obj's underlying member method code with example usage: obj.grad_op() and returns: self