class_docstr: The Matern class of kernels. 
class_docstr_tok: ["The","Matern","class","of","kernels","."]
docstr: Sets the parameters of the matern kernel. 
docstr_tok: ["Sets","the","parameters","of","the","matern","kernel","."]
code: def set_matern_hyperparams(self, nu, scale, dim_bandwidths):
      """Sets the parameters of the matern kernel."""
      if nu % 1 != 0.5:
          raise ValueError(
              "Matern kernel: nu has to be p + 0.5 where p is an integer."
          )
      self.add_hyperparams(nu=nu)
      self.add_hyperparams(scale=scale)
      dim_bandwidths = (
          dim_bandwidths
          if hasattr(dim_bandwidths, "__len__")
          else [dim_bandwidths] * self.dim
      )
      dim_bandwidths = np.array(dim_bandwidths).T
      self.add_hyperparams(dim_bandwidths=dim_bandwidths)
      self.p = int(nu)
      self.norm_constant = 1.0 / self._eval_kernel_values_unnormalised(
          0
      )
  
imports: from __future__ import print_function
  import numpy
  from scipy.linalg import solve_triangular
label_desc: Use image node_id 2 for calling the MaternKernel obj's underlying member method code with example usage: obj.set_matern_hyperparams(nu, scale, dim_bandwidths) without return types