class_docstr: Geometry on the Spider, induced by the rays Geometry.
class_docstr_tok: ["Geometry","on","the","Spider",",","induced","by","the","rays","Geometry","."]
docstr: Compute the distance between two points on the Spider using the ray geometry.
  
  The spider metric is the metric in each ray extended to the Spider:
  given two points x, y on different rays, d(x, y) = d(x, 0) + d(0, y).
  
  Parameters
  ----------
  point_a : SpiderPoint or list of SpiderPoint, shape=[...]
       Point in the Spider.
  point_b : SpiderPoint or list of SpiderPoint, shape=[...]
       Point in the Spider.
  
  Returns
  -------
  point_array : array-like, shape=[...]
      An array with the distance.
docstr_tok: ["Compute","the","distance","between","two","points","on","the","Spider","using","the","ray","geometry",".","The","spider","metric","is","the","metric","in","each","ray","extended","to","the","Spider",":","given","two","points","x",",","y","on","different","rays",",","d","(","x",",","y",")","=","d","(","x",",","0",")","+","d","(","0",",","y",")",".","Parameters","--","--","--","--","--","point_a",":","SpiderPoint","or","list","of","SpiderPoint",",","shape=","[","...","]","Point","in","the","Spider",".","point_b",":","SpiderPoint","or","list","of","SpiderPoint",",","shape=","[","...","]","Point","in","the","Spider",".","Returns","--","--","--","-","point_array",":","array-like",",","shape=","[","...","]","An","array","with","the","distance","."]
code: def dist(self, point_a, point_b):
      """Compute the distance between two points on the Spider using the ray geometry.
  
      The spider metric is the metric in each ray extended to the Spider:
      given two points x, y on different rays, d(x, y) = d(x, 0) + d(0, y).
  
      Parameters
      ----------
      point_a : SpiderPoint or list of SpiderPoint, shape=[...]
           Point in the Spider.
      point_b : SpiderPoint or list of SpiderPoint, shape=[...]
           Point in the Spider.
  
      Returns
      -------
      point_array : array-like, shape=[...]
          An array with the distance.
      """
      point_a, point_b = broadcast_lists(point_a, point_b)
  
      result = []
      for point_a_, point_b_ in zip(point_a, point_b):
          if (
              point_a_.stratum == point_b_.stratum
              or point_a_.stratum == 0
              or point_b_.stratum == 0
          ):
              result += [
                  self.ray_metric.norm(
                      gs.array(
                          [
                              point_a_.stratum_coord
                              - point_b_.stratum_coord
                          ]
                      )
                  )
              ]
          else:
              result += [
                  point_a_.stratum_coord + point_b_.stratum_coord
              ]
      return gs.array(result) if len(result) != 1 else result[0]
  
imports: import geomstats.backend
  from geomstats.geometry.euclidean import Euclidean
  from geomstats.geometry.stratified.point_set import Point, PointSet, PointSetMetric, _vectorize_point, broadcast_lists
label_desc: Use image node_id 3 for calling the SpiderMetric obj's underlying member method code with example usage: obj.dist(point_a, point_b) and returns: unknown