简体   繁体   English

点与点之间的最近距离、索引距离和最小距离

[英]Closest, index and minimum distance between points

I have a code that calculates the distance between closest points in a list, by using cdist.我有一个代码可以使用 cdist 计算列表中最近点之间的距离。

However, I would like an improved version also gives me the index of the Points .但是,我想改进的版本也给我Points的索引。

    distance.cdist(Coordinates,Points).min(axis=1)

Use argmin instead.请改用argmin

( padding) (填充)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 检查点之间最近距离的最快方法 - The fastest way of checking the closest distance between points 在Python中查找两个列表的点之间的最小距离 - Find minimum distance between points of two lists in Python 对于 dataframe 中的点与另一个 dataframe 中的多边形之间的最小距离循环 - For loop for minimum distance between points in dataframe and polygon in another dataframe 优化器在某些点上失败的点和曲线之间的最小距离 - Minimum distance between a point and a curve with optimiser failing for some points 生成 50 个点,它们之间的最小距离为 0.1 - generate 50 points with minimum distance between them is 0.1 两个不同 Numpy 数组中的点之间的最小欧几里得距离,不在 - Minimum Euclidean distance between points in two different Numpy arrays, not within 多维点之间的最小欧几里得距离路径 - Minimum Euclidean distance path between multi-dimensional points Python 3-D点之间的最小,平均和最大距离 - Minimum, mean and maximum distance between points 3-D in Python 原子之间的最小距离 - Minimum distance between atoms 从 3D 空间采样 N 个点的有效方法,约束条件是 Python 中两点之间的最小距离 - Efficient way to sample N points from a 3D space with the constraint of a minimum distance between two points in Python
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM