xoa.geo.cdist

xoa.geo.cdist(XA, XB, radius=6371000.0, **kwargs)[source]

A scipy-distance like cdist function for the haversine method

Parameters:
  • XA (numpy.array) – An ma by 2 array of coordinates of the first dataset in a geographical space.

  • XB (numpy.array) – An mb by 2 array of coordinates of the second dataset in a geographical space.

  • radius (float) – Radius of the sphere which defaults to the earth radius

Returns:

numpy.array – 2D array of distances

See also

haversine, pdist, scipy.sparial.distances.cdist, scipy.sparial.distances.pdist