dist_matrix
- nrv.nmod.utils.dist_matrix(X: tuple[ndarray, ndarray, ndarray]) ndarray[source]
Get a matrix containing the distance of three array containg the position and radius of various circles.
Note
For n circles the matrix return is of dimension (n,n) and the index (i,j) contains the distance between the ith and jth circles.
Tip
By definition, the returned matrix is symetric and with a zero diagonal.
- Parameters:
X (tuple[np.ndarray, np.ndarray, np.ndarray]) –
- Tuple of 1D-
ndarrayof same lengh containing the respectively: the y position of each circle
the z position of each circle
the radius of each circle
- Tuple of 1D-
- Return type:
np.ndarray