class_docstr: Base class for anisotropic stationary kernels, i.e. kernels that only
  depend on
  
      d = x - x'
  
  Derived classes should implement K_d(self, d): Returns the kernel evaluated
  on d, which is the pairwise difference matrix, scaled by the lengthscale
  parameter ℓ (i.e. [(X - X2ᵀ) / ℓ]). The last axis corresponds to the
  input dimension.
class_docstr_tok: ["Base","class","for","anisotropic","stationary","kernels",",","i.e",".","kernels","that","only","depend","on","d","=","x","-","x'","Derived","classes","should","implement","K_d","(","self",",","d",")",":","Returns","the","kernel","evaluated","on","d",",","which","is","the","pairwise","difference","matrix",",","scaled","by","the","lengthscale","parameter","\u2113","(","i.e",".","[","(","X","-","X2\u1d40",")","\/","\u2113","]",")",".","The","last","axis","corresponds","to","the","input","dimension","."]
docstr: :param variance: the (initial) value for the variance parameter.
  :param lengthscales: the (initial) value for the lengthscale
      parameter(s), to induce ARD behaviour this must be initialised as
      an array the same length as the number of active dimensions
      e.g. [1., 1., 1.]. Note that anisotropic kernels can possess
      negative lengthscales. If only a single value is passed, this
      value is used as the lengthscale of each dimension.
  :param kwargs: accepts `name` and `active_dims`, which is a list or
      slice of indices which controls which columns of X are used (by
      default, all columns are used).
docstr_tok: [":","param","variance",":","the","(","initial",")","value","for","the","variance","parameter",".",":","param","lengthscales",":","the","(","initial",")","value","for","the","lengthscale","parameter","(","s",")",",","to","induce","ARD","behaviour","this","must","be","initialised","as","an","array","the","same","length","as","the","number","of","active","dimensions","e.g",".","[","1.",",","1.",",","1.","]",".","Note","that","anisotropic","kernels","can","possess","negative","lengthscales",".","If","only","a","single","value","is","passed",",","this","value","is","used","as","the","lengthscale","of","each","dimension",".",":","param","kwargs",":","accepts","`","name","`","and","`","active_dims","`",",","which","is","a","list","or","slice","of","indices","which","controls","which","columns","of","X","are","used","(","by","default",",","all","columns","are","used",")","."]
code: def __init__(
      self,
      variance: TensorType = 1.0,
      lengthscales: TensorType = 1.0,
      **kwargs: Any,
  ) -> None:
      """
      :param variance: the (initial) value for the variance parameter.
      :param lengthscales: the (initial) value for the lengthscale
          parameter(s), to induce ARD behaviour this must be initialised as
          an array the same length as the number of active dimensions
          e.g. [1., 1., 1.]. Note that anisotropic kernels can possess
          negative lengthscales. If only a single value is passed, this
          value is used as the lengthscale of each dimension.
      :param kwargs: accepts `name` and `active_dims`, which is a list or
          slice of indices which controls which columns of X are used (by
          default, all columns are used).
      """
      super().__init__(variance, lengthscales, **kwargs)
  
      if self.ard:
          self.lengthscales = Parameter(self.lengthscales.numpy())
  
imports: from typing import Any, Optional
  import numpy
  import tensorflow
  from check_shapes import check_shapes, inherit_check_shapes
  from ..base import Parameter, TensorType
  from ..utilities import positive
  from ..utilities.ops import difference_matrix, square_distance
  from .base import ActiveDims, Kernel
label_desc: Use image node_id 1 to create a new AnisotropicStationary object from inherited base classes: Stationary with example: obj = AnisotropicStationary(variance, lengthscales)