mvpa2.misc.surfing.volgeom.distance¶
-
mvpa2.misc.surfing.volgeom.
distance
(p, q, r=2)¶ Returns the distances between vectors in two arrays
Parameters: p: np.ndarray (PxM)
first array
q: np.ndarray (QxM)
second array
nrm: float (default: 2)
Norm used for distance computation. By default Euclidean distances are computed.
Returns: pq: np.ndarray (PxQ)
Distance between p[j] and q[j] is in pq[i,j]
Notes
If p or q are vectors (one-dimensional) then pq is also a vector