L2Distance#
- class tinygp.kernels.distance.L2Distance[source]#
Bases:
DistanceThe L2 or Euclidean distance between two coordinates
- distance(X1: tinygp.helpers.JAXArray, X2: tinygp.helpers.JAXArray) tinygp.helpers.JAXArray[source]#
Compute the distance between two coordinates under this metric
- squared_distance(X1: tinygp.helpers.JAXArray, X2: tinygp.helpers.JAXArray) tinygp.helpers.JAXArray[source]#
Compute the squared distance between two coordinates
By default this returns the squared result of
tinygp.kernels.stationary.Distance.distance(), but some metrics can take advantage of these separate implementations to avoid unnecessary square roots.