A scipy-distance like pdist function for the haversine method
- Parameters:
X (numpy.array) – An m by 2 array of coordinates in a geographical space.
compact (bool) – Compact the distance matrix to remove duplicate and zeros.
It is the strict upper triangle of the distance matrix.
radius (float) – Radius of the sphere which defaults to the earth radius
- Returns:
numpy.array – Either 2D (square form) or 1D (compact form) the distance matrix